From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp97.ord1d.emailsrvr.com (smtp97.ord1d.emailsrvr.com [184.106.54.97]) by dpdk.org (Postfix) with ESMTP id 860DE8E5F for ; Thu, 19 Apr 2018 13:32:36 +0200 (CEST) Received: from smtp5.relay.ord1d.emailsrvr.com (localhost [127.0.0.1]) by smtp5.relay.ord1d.emailsrvr.com (SMTP Server) with ESMTP id 17D20A005C; Thu, 19 Apr 2018 07:32:36 -0400 (EDT) X-Auth-ID: padam.singh@inventum.net Received: by smtp5.relay.ord1d.emailsrvr.com (Authenticated sender: padam.singh-AT-inventum.net) with ESMTPSA id B7D6CA005F; Thu, 19 Apr 2018 07:32:34 -0400 (EDT) X-Sender-Id: padam.singh@inventum.net Received: from [172.16.1.38] ([UNAVAILABLE]. [103.25.205.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:25 (trex/5.7.12); Thu, 19 Apr 2018 07:32:36 -0400 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.7\)) From: Padam Jeet Singh In-Reply-To: <4DDAC118-3C5A-4144-A82A-D20150619246@inventum.net> Date: Thu, 19 Apr 2018 17:02:30 +0530 Cc: Yong Wang Content-Transfer-Encoding: quoted-printable Message-Id: <2ED18347-0871-4E2D-9DCE-59A727D37280@inventum.net> References: <27296DED-C9CF-41DA-AD23-61C58242E7E4@inventum.net> <972484AC-F35A-4E1B-B0F7-78DA8D24D20A@vmware.com> <5BFE1584-7B3A-43EA-B8FD-9FCABE831FDC@vmware.com> <4DDAC118-3C5A-4144-A82A-D20150619246@inventum.net> To: "dev@dpdk.org" X-Mailer: Apple Mail (2.3445.1.7) Subject: Re: [dpdk-dev] vmxnet3 RX VLAN Strip offload incorrect behaviour 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: Thu, 19 Apr 2018 11:32:36 -0000 Hi, Does anyone have a work-around for this? Should we debug the vmxnet3 = driver since for sure this issue is even coming in standard l2fwd = example. Thanks, Padam > On 12-Apr-2018, at 11:52 AM, Padam Jeet Singh = wrote: >=20 >=20 >=20 >> On 10-Apr-2018, at 11:43 AM, Yong Wang wrote: >>=20 >> When using 4095, I assume you enabled trunk mode on ESX vswitch. = What ESX version did you use? Is the vswitch standard switch or DVS? We = have tested over ESX6.0 and onwards plus DPDK 17.05 and it should work. >=20 > Yes, the 4095 enables trunk mode. ESXi version is "6.0.0 (Build = 3620759)=E2=80=9D, the switch is a =E2=80=9CStandard vSwitch=E2=80=9D. >=20 > I did a simple change to the standard l2fwd sample application. Then = tried the same app once with e1000e emulation driver, and then with the = vmxnet3 driver. Patch for changes done to the l2fwd code are available = here: https://pastebin.com/0RMJYKr0 >=20 > The change I did was enable hw_vlan_strip =3D 1 and also call = rte_eth_dev_set_vlan_offload both post configure and post start. >=20 > With e1000e driver, sample packets arriving with different VLANs: >=20 > mbuff->vlan_tci=3D500 vlan_tci_outer=3D0 ethertype=3D8=20 > mbuff->vlan_tci=3D500 vlan_tci_outer=3D0 ethertype=3D8=20 > mbuff->vlan_tci=3D105 vlan_tci_outer=3D0 ethertype=3D8=20 > mbuff->vlan_tci=3D100 vlan_tci_outer=3D0 ethertype=3D8=20 >=20 >=20 > With vmxnet3, packets arriving with different VLANs: >=20 > mbuff->vlan_tci=3D0 vlan_tci_outer=3D0 ethertype=3D81=20 > mbuff->vlan_tci=3D0 vlan_tci_outer=3D0 ethertype=3D81=20 > mbuff->vlan_tci=3D0 vlan_tci_outer=3D0 ethertype=3D81=20 > mbuff->vlan_tci=3D0 vlan_tci_outer=3D0 ethertype=3D81=20 > mbuff->vlan_tci=3D0 vlan_tci_outer=3D0 ethertype=3D81=20 >=20 > the ether type values are not printed byte-swapped =E2=80=A6 so = it=E2=80=99s 8100 (VLAN) and 0800 (IPv4). >=20 >=20 >=20 >=20 >>=20 >> =EF=BB=BFOn 4/8/18, 11:22 PM, "Padam Jeet Singh" = wrote: >>=20 >>=20 >>> On 06-Apr-2018, at 11:12 PM, Yong Wang wrote: >>>=20 >>> Padam, >>>=20 >>> As far as I know, this feature works. What DPDK version did you = use? >>=20 >> DPDK Version 17.05 >>=20 >>> Is there any port reconfiguration (stop/start/mtu change, etc) that = could lose your vlan offload settings (a dump of the port config at = runtime will be able to confirm this)? Can you also post a snippet of = packet capture of the vlan traffic received? >>>=20 >>=20 >> It=E2=80=99s a standard configure followed by start. No MTU = change/Stop. Here are the port configuration post the device start: >>=20 >> 2018-04-09T05:37:45.332573+00:00 INFO inventum fpnas : APP: -- = Ethernet Port Info (0) -- >> 2018-04-09T05:37:45.332729+00:00 INFO inventum fpnas : APP: = Driver net_vmxnet3 >> 2018-04-09T05:37:45.332822+00:00 INFO inventum fpnas : APP: = if_index 0 >> 2018-04-09T05:37:45.332926+00:00 INFO inventum fpnas : APP: = min_rx_bufsize 1646 >> 2018-04-09T05:37:45.333015+00:00 INFO inventum fpnas : APP: = max_rx_pktlen 16384 >> 2018-04-09T05:37:45.333102+00:00 INFO inventum fpnas : APP: = max_rx_queues supported 16 >> 2018-04-09T05:37:45.333218+00:00 INFO inventum fpnas : APP: = max_tx_queues supported 8 >> 2018-04-09T05:37:45.333305+00:00 INFO inventum fpnas : APP: = rx_queues configured 2 >> 2018-04-09T05:37:45.333390+00:00 INFO inventum fpnas : APP: = tx_queues configured 2 >> 2018-04-09T05:37:45.333475+00:00 INFO inventum fpnas : APP: = max_mac_addrs 1 >> 2018-04-09T05:37:45.333560+00:00 INFO inventum fpnas : APP: = max_vfs 0 >> 2018-04-09T05:37:45.333644+00:00 INFO inventum fpnas : APP: = max_vmdq_pools 0 >> 2018-04-09T05:37:45.333728+00:00 INFO inventum fpnas : APP: = rx_offload_cap 29 >> 2018-04-09T05:37:45.333832+00:00 INFO inventum fpnas : APP: = tx_offload_cap 45 >> 2018-04-09T05:37:45.333944+00:00 INFO inventum fpnas : APP: = vlan_offload_flags 1 >>=20 >>=20 >> And the VLAN offload setting while the device is running (with the = packet coming from the test PC): >>=20 >> vlan_offload_flag: 1 >>=20 >>=20 >> The configuration as is as follows: >>=20 >> [vmxnet3 based interface on VM with DPDK app] =E2=80=94=E2=80=94 [ = vswitch with VLAN 4095 and uplink using Intel igb based adaptor] =E2=80=94= =E2=80=94 [ test PC with VLAN interface ] >>=20 >> Packet sent by the PC (ARP packet): >>=20 >> Frame 1: 46 bytes on wire (368 bits), 46 bytes captured (368 bits) >> Ethernet II, Src: 00:25:64:cf:f2:30, Dst: ff:ff:ff:ff:ff:ff >> 802.1Q Virtual LAN, PRI: 0, DEI: 0, ID: 105 >> Address Resolution Protocol (request) >>=20 >>=20 >> If I redo the test with the same physical and vmware setup but = instead of vmxnet3 I use e1000e emulation driver, all of this works = fine. Packets come properly stripped of VLAN with vlan_tci fields set = correctly. >>=20 >>=20 >>> Yong=20 >>>=20 >>> On 4/6/18, 6:51 AM, "dev on behalf of Padam Jeet Singh" = wrote: >>>=20 >>> Hi, >>>=20 >>> When configuring the vmxnet3 based ethernet device, the RX VLAN = Strip offload does not work as it usually does with other real NICs = which support this function. >>>=20 >>> When configuring with rxmode.hw_vlan_strip =3D 1, the ipackets = statistic does not increase when a VLAN ether type frame is received on = the port and it is also not received on queue RX. >>> However, when configuring rxmode.hw_vlan_strip =3D 0 ,the ipackets = statistic increases as well as frames arrives with VLAN header. >>>=20 >>> Though calling rte_eth_dev_set_vlan_offload(port, = ETH_VLAN_STRIP_OFFLOAD) returns a success, however VLAN stripping on RX = does not work. >>>=20 >>> TX VLAN INSERT offload on the other hand works just fine. >>>=20 >>> Is this a bug in vmxnet3 driver of dpdk? >>>=20 >>> Thanks, >>> Padam >>>=20 >>=20 >>=20 >>=20 >=20