From patchwork Mon Feb 12 18:13:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 872262 X-Patchwork-Delegate: ian.stokes@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="key not found in DNS" (0-bit key; unprotected) header.d=that.guru header.i=@that.guru header.b="pFa+K8E0"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zgDbN24L5z9s0Z for ; Tue, 13 Feb 2018 05:24:32 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 08606ED0; Mon, 12 Feb 2018 18:23:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C8DCBCBC for ; Mon, 12 Feb 2018 18:23:21 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from glass.birch.relay.mailchannels.net (glass.birch.relay.mailchannels.net [23.83.209.70]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id DF82F578 for ; Mon, 12 Feb 2018 18:23:20 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 29FAE3E0EFB; Mon, 12 Feb 2018 18:13:22 +0000 (UTC) Received: from one.mxroute.com (unknown [100.96.29.46]) (Authenticated sender: 5xi41l16bi) by relay.mailchannels.net (Postfix) with ESMTPA id 809E23E0E4C; Mon, 12 Feb 2018 18:13:21 +0000 (UTC) X-Sender-Id: 5xi41l16bi|x-authuser|stephen@that.guru Received: from one.mxroute.com (one-outgoing.mxroute.com [172.18.47.25]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.13.1); Mon, 12 Feb 2018 18:13:22 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: 5xi41l16bi|x-authuser|stephen@that.guru X-MailChannels-Auth-Id: 5xi41l16bi X-Left-Quick: 78e7f1c8738478d7_1518459201907_905736114 X-MC-Loop-Signature: 1518459201907:2291500097 X-MC-Ingress-Time: 1518459201907 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=that.guru; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: 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=TDASM9rO8V5BWtgJAtV1AETEPTWhW/bh3tRxMXwh7T4=; b=pFa+K8E0rwgj9QgJ737Wd7R1mS nPE34yP0fXVEoVSoJsyJbzMCdEMwCHHSJfZ3HGzXLZoqkFXxujUFccpXZxueKVLaYIrpQ01K1rOVh fyFHHuBSV/s8WiNinrzds+P1VHNz+uF760f2PynFh5qxPPV521gV5LRxzm0FslTmz8l/OcTWnpC1z k9H9ivs+sIuBVDvGIw7DAYDaVSfo10khAZekFY1plvpp/Jyau0KQAZ5+iHn1TiXnggPzPKLmTPxbs rtD4D3/gld8JgAqPJ2xxP/gnJsL3caT3331KrL0Fu7lgJ+n8mwfk52lajkP8BMUDEcgdmY35dhhhE +CZdPp4Q==; From: Stephen Finucane To: dev@openvswitch.org Date: Mon, 12 Feb 2018 18:13:05 +0000 Message-Id: <20180212181306.6674-8-stephen@that.guru> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212181306.6674-1-stephen@that.guru> References: <20180212181306.6674-1-stephen@that.guru> X-AuthUser: stephen@that.guru X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 7/8] doc: Split Jumbo Frames guide between two docs X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org While there is some duplication going on here, that's not necessarily a bad thing. If nothing else, it lets us remove one more overly-detailed step from the howto. Signed-off-by: Stephen Finucane --- Documentation/howto/dpdk.rst | 52 ++------------------------------ Documentation/topics/dpdk/phy.rst | 24 +++++++++++++++ Documentation/topics/dpdk/vhost-user.rst | 36 ++++++++++++++++++++++ 3 files changed, 63 insertions(+), 49 deletions(-) diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst index 1a72e90bf..ba01810f8 100644 --- a/Documentation/howto/dpdk.rst +++ b/Documentation/howto/dpdk.rst @@ -48,9 +48,9 @@ number of dpdk devices found in the log file:: $ ovs-vsctl add-port br0 dpdk-p1 -- set Interface dpdk-p1 type=dpdk \ options:dpdk-devargs=0000:01:00.1 -Some NICs (i.e. Mellanox ConnectX-3) have only one PCI address associated -with multiple ports. Using a PCI device like above won't work. Instead, below -usage is suggested:: +Some NICs (i.e. Mellanox ConnectX-3) have only one PCI address associated with +multiple ports. Using a PCI device like above won't work. Instead, below usage +is suggested:: $ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \ options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55:01" @@ -85,52 +85,6 @@ To stop ovs-vswitchd & delete bridge, run:: $ ovs-appctl -t ovsdb-server exit $ ovs-vsctl del-br br0 -Jumbo Frames ------------- - -By default, DPDK ports are configured with standard Ethernet MTU (1500B). To -enable Jumbo Frames support for a DPDK port, change the Interface's -``mtu_request`` attribute to a sufficiently large value. For example, to add a -DPDK Phy port with MTU of 9000:: - - $ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \ - options:dpdk-devargs=0000:01:00.0 mtu_request=9000 - -Similarly, to change the MTU of an existing port to 6200:: - - $ ovs-vsctl set Interface dpdk-p0 mtu_request=6200 - -Some additional configuration is needed to take advantage of jumbo frames with -vHost ports: - -1. *mergeable buffers* must be enabled for vHost ports, as demonstrated in the - QEMU command line snippet below:: - - -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ - -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=on - -2. Where virtio devices are bound to the Linux kernel driver in a guest - environment (i.e. interfaces are not bound to an in-guest DPDK driver), the - MTU of those logical network interfaces must also be increased to a - sufficiently large value. This avoids segmentation of Jumbo Frames received - in the guest. Note that 'MTU' refers to the length of the IP packet only, - and not that of the entire frame. - - To calculate the exact MTU of a standard IPv4 frame, subtract the L2 header - and CRC lengths (i.e. 18B) from the max supported frame size. So, to set - the MTU for a 9018B Jumbo Frame:: - - $ ip link set eth1 mtu 9000 - -When Jumbo Frames are enabled, the size of a DPDK port's mbuf segments are -increased, such that a full Jumbo Frame of a specific size may be accommodated -within a single mbuf segment. - -Jumbo frame support has been validated against 9728B frames, which is the -largest frame size supported by Fortville NIC using the DPDK i40e driver, but -larger frames and other DPDK NIC drivers may be supported. These cases are -common for use cases involving East-West traffic only. - .. _dpdk-ovs-in-guest: OVS with DPDK Inside VMs diff --git a/Documentation/topics/dpdk/phy.rst b/Documentation/topics/dpdk/phy.rst index 93aff628c..d49269567 100644 --- a/Documentation/topics/dpdk/phy.rst +++ b/Documentation/topics/dpdk/phy.rst @@ -216,3 +216,27 @@ Flow Control Flow control is available for DPDK physical ports. For more information, refer to :ref:`dpdk-flow-control`. + +Jumbo Frames +------------ + +By default, ``dpdk`` ports are configured with standard Ethernet MTU (1500B). +To enable Jumbo Frames support for such a port, change the interface's +``mtu_request`` attribute to a sufficiently large value. For example, to add a +``dpdk`` port with MTU of 9000, run:: + + $ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \ + options:dpdk-devargs=0000:01:00.0 mtu_request=9000 + +Similarly, to change the MTU of an existing port to 6200:: + + $ ovs-vsctl set Interface dpdk-p0 mtu_request=6200 + +When Jumbo Frames are enabled, the size of a DPDK port's mbuf segments are +increased, such that a full Jumbo Frame of a specific size may be accommodated +within a single mbuf segment. + +Jumbo frame support has been validated against 9728B frames, which is the +largest frame size supported by Fortville NIC using the DPDK i40e driver, but +larger frames and other DPDK NIC drivers may be supported. These cases are +common for use cases involving East-West traffic only. diff --git a/Documentation/topics/dpdk/vhost-user.rst b/Documentation/topics/dpdk/vhost-user.rst index d84d99246..7b2777121 100644 --- a/Documentation/topics/dpdk/vhost-user.rst +++ b/Documentation/topics/dpdk/vhost-user.rst @@ -458,6 +458,42 @@ Sample XML .. _QEMU documentation: http://git.qemu-project.org/?p=qemu.git;a=blob;f=docs/specs/vhost-user.txt;h=7890d7169;hb=HEAD +Jumbo Frames +------------ + +By default, vHost User ports are configured with standard Ethernet MTU (1500B). +To enable Jumbo Frames support for such a port, you must: + +- Enable *mergeable buffers* for the ports, as demonstrated in the QEMU + command line snippet below:: + + -netdev type=vhost-user,id=mynet1,chardev=char0,vhostforce \ + -device virtio-net-pci,mac=00:00:00:00:00:01,netdev=mynet1,mrg_rxbuf=on + +- Where virtio devices are bound to the Linux kernel driver in a guest + environment (i.e. interfaces are not bound to an in-guest DPDK driver), the + MTU of those logical network interfaces must also be increased to a + sufficiently large value. This avoids segmentation of Jumbo Frames received + in the guest. For example:: + + $ ip link set eth1 mtu 9000 + + .. note:: + + The 'MTU' refers to the length of the IP packet only, and not that of the + entire frame. To calculate the exact MTU of a standard IPv4 frame, + subtract the L2 header and CRC lengths (i.e. 18B) from the max supported + frame size. As a result, the actual size of the frame above is 9018B. + +When Jumbo Frames are enabled, the size of a DPDK port's mbuf segments are +increased, such that a full Jumbo Frame of a specific size may be accommodated +within a single mbuf segment. + +Jumbo frame support has been validated against 9728B frames, which is the +largest frame size supported by Fortville NIC using the DPDK i40e driver, but +larger frames and other DPDK NIC drivers may be supported. These cases are +common for use cases involving East-West traffic only. + vhost-user Dequeue Zero Copy (experimental) -------------------------------------------