From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sessmg23.ericsson.net (sessmg23.ericsson.net [193.180.251.45]) by dpdk.org (Postfix) with ESMTP id B99751B7A4 for ; Wed, 25 Oct 2017 08:27:00 +0200 (CEST) X-AuditID: c1b4fb2d-bddff7000000268d-6e-59f02eb435c3 Received: from ESESSHC021.ericsson.se (Unknown_Domain [153.88.183.81]) by sessmg23.ericsson.net (Symantec Mail Security) with SMTP id A2.05.09869.4BE20F95; Wed, 25 Oct 2017 08:27:00 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (153.88.183.145) by oa.msg.ericsson.com (153.88.183.81) with Microsoft SMTP Server (TLS) id 14.3.352.0; Wed, 25 Oct 2017 08:26:59 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericsson.onmicrosoft.com; s=selector1-ericsson-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CyTjTqjC2uojLLpz+gZo6DmvOW2vYEPXdOsIrRKc9WQ=; b=PlZW6lWJF+2fukFfw4QIznQpiVsRMHEMuG+sQYWbckKLQwIFYe25w8eQN52lsUvv1SCnIGjmztZ6DM2Vl/E0qUegST5FA4bPtMfd//aEFnhBeESAMCAjairvTeWyOoleEkfOMmvrj7oftRihQ/XvDb+r9Hs3moDn1J8KZDFR9vo= Received: from AM4PR07MB3300.eurprd07.prod.outlook.com (10.171.189.29) by AM4PR07MB3297.eurprd07.prod.outlook.com (10.171.189.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.178.3; Wed, 25 Oct 2017 06:26:58 +0000 Received: from AM4PR07MB3300.eurprd07.prod.outlook.com ([fe80::a1e1:3b9c:edcd:31a5]) by AM4PR07MB3300.eurprd07.prod.outlook.com ([fe80::a1e1:3b9c:edcd:31a5%13]) with mapi id 15.20.0178.003; Wed, 25 Oct 2017 06:26:58 +0000 From: Nitin Katiyar To: Stephen Hemminger CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] Issue with MTU/max_rx_pkt_len handling by different NICs/PMD drivers Thread-Index: AdNMwgOEx2YlMXQMTkycBBMjdRRlvAABi58AACO9ZVA= Date: Wed, 25 Oct 2017 06:26:58 +0000 Message-ID: References: <20171024150124.6dbe211f@shemminger-XPS-13-9360> In-Reply-To: <20171024150124.6dbe211f@shemminger-XPS-13-9360> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=nitin.katiyar@ericsson.com; x-originating-ip: [125.16.128.122] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR07MB3297; 6:/UVp63DqHm05nNfQudZ36YzrDM4fzvzHVf2tWe3b5zV7qoQz48/1mae+Brz+xmISARYEnkgW35QkOGl++T+9jdChi6W6tNUgj/8IRqbvYQhtCZESaDaZ/5iu26FFSgvXaCDVx97ZFRgqqnC6zvkEBxAxrABRBLEMs3UJLnKOIRCELOoxXv/TUyUr5pnUB4KIm3fOb7+puBZ0XaKeBP/+6ro2DLx3cVabpK3FlZzIUr/OTms4I2klJNbsysQ3tEL4OBD+7y5LyitCoJ/QM63y4t9hEWmfLrqy6jzONC2Ya0mu2Lf52RcXSW/oxsgLT0ZLG2wnphKWnTwMFcGuuiAfiJynaolvxoPfMzKvyQbau1M=; 5:9y7K890lY0SLCWlKpxXKlt/c+GcuQNHF2ai6VjkloUz7XEns7vMJ5m+zX4x15T4CiMvYeWcFGSN4oy5WJilAQW6Re+xWrm30hCbDkJ2eOL15uBqN40U7OngvE9+Tq5i/TO2NNsMZWecq6E9GdSR1qKRERUe8+hyJ3LaMNqTF45k=; 24:DaRN6M6A6TUf+SjCNrNz0+d8UVrYdtDutZ9wSrOSpr54N7AK9iYf1xcyr+xY2CwVxiOfBTNiOv7ANTKUQ/aQ9fQ752uEiRVFT/0Z/baanhc=; 7:sFq9CgK5CkxA658yj32kz6GgkLY3icdl8iRep3sG/NzJzJzeN07A0mC5tgMEJeO0RpklZmIXUBGyyxyXS5CCfHOb30JLyw6G/PheTV6eaCiizGiV9izUWveYv+TfXibFABWgNc798UpT2dgy3Vk2cV+U6XZ28wV/Uh4D8euOWL8XMA+f46L604FeqKXp9qM511XLEg20arpwAwdtn88nmBQDS2Z1usXBfd9+rT1OSJBMHwW2/iEtIXv5RYjjrzG9 x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: f3759894-af0b-4900-4143-08d51b71654f x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627075)(201703031133081)(201702281549075)(2017052603199); SRVR:AM4PR07MB3297; x-ms-traffictypediagnostic: AM4PR07MB3297: x-exchange-antispam-report-test: UriScan:(37575265505322)(211171220733660); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(3231020)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:AM4PR07MB3297; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:AM4PR07MB3297; x-forefront-prvs: 0471B73328 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(346002)(376002)(199003)(24454002)(13464003)(189002)(3280700002)(6916009)(3660700001)(8936002)(105586002)(97736004)(478600001)(101416001)(2906002)(106356001)(33656002)(4326008)(2900100001)(53546010)(5660300001)(55016002)(66066001)(53936002)(99286003)(6246003)(5250100002)(9686003)(316002)(189998001)(7696004)(25786009)(14454004)(2950100002)(102836003)(3846002)(6116002)(8676002)(74316002)(68736007)(305945005)(7736002)(81156014)(86362001)(6506006)(81166006)(76176999)(229853002)(54356999)(6436002)(50986999); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR07MB3297; H:AM4PR07MB3300.eurprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: ericsson.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: f3759894-af0b-4900-4143-08d51b71654f X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Oct 2017 06:26:58.6959 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 92e84ceb-fbfd-47ab-be52-080c6b87953f X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR07MB3297 X-OriginatorOrg: ericsson.com X-Brightmail-Tracker: H4sIAAAAAAAAA02Sa0iTURjHPe9le52uXuftYdltUZGX5WUfLCwMCYRu+qVUMhv6pqZu9r4m 2YcwCBOvzS40MbfKibckzJqgCQ4RFWQpYjBKzE1NxUtGGkqW80zo2+95/v/zf85zOAwpK6Ll TKYmj+M16myFSELpE8zxIe3K5cTQt127IhdXzETk6y/7oonYdaOJji0bqCXiiCRJVBqXnZnP 8cdPX5dkLNj7yNyxgDubxR/oQmT2L0HuDLAq+NnSSpQgCSNjexEMD7SRuOhHoBubQM6CYstJ WP3RJ8bKMwI27v91FXYEVtNHkTNMxIaCebhK7GQfNhyaZoqRk0n2IKwYqygne7PX4EGjhcKe FDB1NJOYT8LUK8NWDrM17jBYn2udbSl7FSrqftN4ViWCxobSbb87ewqKns4TTkasH6wNthB4 lj/YHAYCL8dCXZeVxOwLs/ZNGvuTYdE+ReO+At7pv7v8e2HEULq9MrAWMXz+YxBhQQnvdQsI 8wXoXWqksEmP4Ktp2ZUUCKb+ndRzoK+pdXEWtJZPivCBURp6q21iLARAc7+VeISU1f/dHHMw GDtXRJiDoP7lPFm9/RxeMKB3UEZENSFfgROEnPTwCCXHZ6YKglaj1HB5bWjrd/S0b4R0oOb5 MxbEMkjhKb0Cy4kyWp0vFORYEDCkwkd6YG4pUSZNUxfc5XhtCn87mxMsaA9DKfyl0d2fEmRs ujqPy+K4XI7fUQnGXV6IkswGuXeFJdlvxu1omlttjOFYXI9N5aArHefbTDL5mi7sSHdOvW9q 7q/Hgx5D04upQ62LnlHTc7qVS0b2xf4a2+j4LZU24eKbG/c6D3XYPFa/mfk2OkiVNVdm0O3u iQ+OcVt/8lBvbSm+3DAyVzrhFXFic5JvgrP5szfH49KnFZSQoQ4LJHlB/Q+++21jGQMAAA== Subject: Re: [dpdk-dev] Issue with MTU/max_rx_pkt_len handling by different NICs/PMD drivers X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Oct 2017 06:27:00 -0000 Thanks Stephen for reply. I agree that it is advisory for device driver. I = am also reporting the issue with PMD dpdk drivers. We see different behavio= r with 2 NICs which we have tested with OVS-DPDK (i.e. Fortville and Nianti= c). And by looking at other PMD driver, there could be issue with other NIC= s also. If you look at *_dev_mtu_set then you can see that some driver adds= Vlan tag(s) while determining max_rx_pkt_len (which is MTU + ETH_HDR (14 b= ytes) + CRC(4 bytes) + VLAN (4 or 8 bytes) and some don't do that. But duri= ng *_rx_init() driver uses only max_rx_pkt_len (which does not have VLAN ad= ded into it which means MTU + ETH_HDR(14 bytes) + CRC (4bytes)) is used. OV= S doesn't use *_dev_mtu_set().=20 So, there is inconsistency with the maximum size tagged packet that differe= nt device can receive due to consideration of Vlan tag size in configuring = hw register for Max Frame Size. This should be addressed by drivers not the= application. Regards, Nitin -----Original Message----- From: Stephen Hemminger [mailto:stephen@networkplumber.org]=20 Sent: Tuesday, October 24, 2017 6:31 PM To: Nitin Katiyar Cc: dev@dpdk.org Subject: Re: [dpdk-dev] Issue with MTU/max_rx_pkt_len handling by different= NICs/PMD drivers On Tue, 24 Oct 2017 12:25:38 +0000 Nitin Katiyar wrote: > Hi, > While testing MTU configuration of physical ports using OVS-DPDK we have = found that Fortville and Niantic behaves differently for Tagged packets. Bo= th allows TX of packets with size up to programmed MTU value but in receive= direction Fortville drops packets of size equal to configured MTU. Additio= nally, Fortville does not report any error/drop counter if packets with siz= e more than configured MTU (max frame size) are received. In Niantic we can= see error counters getting incremented if packets of size more than MTU ar= e received. >=20 > When ports are started, device attribute max_rx_pkt_len is set during dev= ice/queue init by application (OVS in our case) and this max_rx_pkt_len is = used to program hardware register in device which in turn determines the ma= ximum size of packet/frame that it can receive. > What we have found during testing is that Niantic could receive tagged/un= tagged packets of size equal to max_rx_pkt_len but Fortville could only rec= eive tagged packets (single tag) up to size <=3D (max_rx_pkt_len - 4). Data= sheet of Niantic mentions that device implicitly accounts for VLAN tag(s) = in addition to Maximum Frame size programmed which is not the case for Fort= ville. This causes issue with MTU settings and maximum frame size that NIC = can receive with tagged and untagged traffic. > We have tested it with OVS-DPDK where it uses device attribute max_rx_pkt= _len to set max frame size in accordance with the configured MTU size of po= rt. However, Ixgbe (Niantic) and i40e (Fortville) interpret it differently.= I looked at some other PMD drivers and different drivers interpret dev_con= f.rxmode.max_rx_pkt_len differently i.e. some adds one or two VLAN, few don= 't include it and some use this field differently. It creates issue with MT= U while running same application on different NICs and PMD drivers need to = be fixed to have consistent behavior with MTU/Max Frame Size settings. >=20 > Regards, > Nitin Katiyar MTU on most operating systems is advisory to device driver. The device driver may receive packets up to that MTU or larger. How much bigger depends on how the hardware receive packet limit is impleme= nted. Same thing happens in Linux and BSD.