From patchwork Tue Aug 11 08:01:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Durrant X-Patchwork-Id: 11708843 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 68E75109A for ; Tue, 11 Aug 2020 08:03:04 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4397020656 for ; Tue, 11 Aug 2020 08:03:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="3zpUIDAn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4397020656 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k5PEY-0003tk-C1; Tue, 11 Aug 2020 08:02:10 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k5PEX-0003tc-7o for xen-devel@lists.xenproject.org; Tue, 11 Aug 2020 08:02:09 +0000 X-Inumbo-ID: 24a6a5c4-9476-4a0d-bc69-354df03b0b8f Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 24a6a5c4-9476-4a0d-bc69-354df03b0b8f; Tue, 11 Aug 2020 08:02:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zLawH4FvOFWl21OKR3+ucyTpJY4mEJwrzwh5lh6ZTTM=; b=3zpUIDAnftjjPCSyjPccOSSNuY N7FS8KaWcFTUtzNJGrDqUyyZsCNVcP+qON9Ez4E01DcQMgcpZp+V8Adk75AkUFSG9y1gPmjRhPkzx ysZj/AHAueajNN/YwscPZxvGDbfYMbqVvip5iPfnGDQI9UKza8vfjcVymSLfvQhXUQEo=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1k5PEV-0003uZ-Cm; Tue, 11 Aug 2020 08:02:07 +0000 Received: from host86-143-223-30.range86-143.btcentralplus.com ([86.143.223.30] helo=u2f063a87eabd5f.home) by xenbits.xenproject.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k5PEV-0000k5-4z; Tue, 11 Aug 2020 08:02:07 +0000 From: Paul Durrant To: xen-devel@lists.xenproject.org Subject: [PATCH v3 1/8] public/io/netif: specify MTU override node Date: Tue, 11 Aug 2020 09:01:55 +0100 Message-Id: <20200811080202.31163-2-paul@xen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200811080202.31163-1-paul@xen.org> References: <20200811080202.31163-1-paul@xen.org> MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Paul Durrant , Ian Jackson , George Dunlap , Jan Beulich Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Paul Durrant There is currently no documentation to state what MTU a frontend should adertise to its network stack. It has however long been assumed that the default value of 1500 is correct. This patch specifies a mechanism to allow the tools to set the MTU via a xenstore node in the frontend area and states that the absence of that node means the frontend should assume an MTU of 1500 octets. NOTE: The Windows PV frontend has used an MTU sampled from the xenstore node specified in this patch. Signed-off-by: Paul Durrant Reviewed-by: Juergen Gross Reviewed-by: Ian Jackson Acked-by: Wei Liu --- Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Julien Grall Cc: Stefano Stabellini Cc: Wei Liu v2: - Add a note in xenstore-paths highlighting the new xenstore node --- docs/misc/xenstore-paths.pandoc | 3 +++ xen/include/public/io/netif.h | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/docs/misc/xenstore-paths.pandoc b/docs/misc/xenstore-paths.pandoc index 766e8008dc..5cd5c8a3b9 100644 --- a/docs/misc/xenstore-paths.pandoc +++ b/docs/misc/xenstore-paths.pandoc @@ -298,6 +298,9 @@ A virtual keyboard device frontend. Described by A virtual network device frontend. Described by [xen/include/public/io/netif.h][NETIF] +NOTE: ~/device/vif/$DEVID/mtu can be used to inform the frontend of an + increased MTU. (The default MTU is 1500 octets). + #### ~/device/vscsi/$DEVID/* [] A virtual scsi device frontend. Described by diff --git a/xen/include/public/io/netif.h b/xen/include/public/io/netif.h index 9fcf91a2fe..00dd258712 100644 --- a/xen/include/public/io/netif.h +++ b/xen/include/public/io/netif.h @@ -204,6 +204,18 @@ * present). */ +/* + * MTU + * === + * + * The toolstack may set a value of MTU for the frontend by setting the + * /local/domain//device/vif//mtu node with the MTU value in + * octets. If this node is absent the frontend should assume an MTU value + * of 1500 octets. A frontend is also at liberty to ignore this value so + * it is only suitable for informing the frontend that a packet payload + * >1500 octets is permitted. + */ + /* * Hash types * ==========