DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dey, Souvik" <sodey@rbbn.com>
To: Yan Fridland <yan@asocscloud.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] i40eVF pmd vlan id handling
Date: Mon, 15 Jun 2020 08:43:53 -0400	[thread overview]
Message-ID: <DM6PR03MB47772913A7EDC749A19D050CCD9C0@DM6PR03MB4777.namprd03.prod.outlook.com> (raw)
In-Reply-To: <AM5PR10MB1668EB8F6B338B827AAE7E9ADF9C0@AM5PR10MB1668.EURPRD10.PROD.OUTLOOK.COM>

We need to enable DEV_RX_OFFLOAD_VLAN_FILTER from the DPDK app, and then configure the specific vlan id using rte_eth_dev_vlan_filter() to have vlan id come up to the guest. By default in VmWare I guess VLAN+MAC filtering gets enabled as, we set 0/4095 vlan_id on the VF to allow all Vlans. Can you check by setting the above offload and if that helps you .

--
Thanks,
Souvik

From: Yan Fridland <yan@asocscloud.com>
Sent: Monday, June 15, 2020 8:34 AM
To: Dey, Souvik <sodey@rbbn.com>
Subject: RE: i40eVF pmd vlan id handling

________________________________
NOTICE: This email was received from an EXTERNAL sender
________________________________

Hi Dey,

As I see in my tests with i40en on VMware, I don't have any issues when working with PF directly in Passthrough mode without SR-IOV. Problems start when working with VF (i40evf) and in my case I don't even try to do any offloading, but simply send a predefined tagged packet (tagged in application) to the port and I see that it's not even leaving the port. Its stuck somewhere between VF and PF. Perhaps you know what I should configure if I don't want HW offloading in VLAN handling and I want to tag by myself .. ?

Thanks
Yan

-----Original Message-----
From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> On Behalf Of Dey, Souvik
Sent: Monday, April 13, 2020 7:04 PM
To: dev@dpdk.org<mailto:dev@dpdk.org>; users@dpdk.org<mailto:users@dpdk.org>; beilei.xing@intel.com<mailto:beilei.xing@intel.com>
Cc: ferruh.yigit@intel.com<mailto:ferruh.yigit@intel.com>; qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>
Subject: [dpdk-users] i40eVF pmd vlan id handling

Hi All,
I am using DPDK 18.11.2 and i40e PF linux driver on the host 2.4.6. I see there, when I enable DEV_RX_OFFLOAD_VLAN_FILTER from the DPDK app, and then configure the specific vlan id using rte_eth_dev_vlan_filter(). As per DPDK code by default when we do dev_configure, we call i40evf_init_vlan() and if we don't enable rxmode.offloads with DEV_RX_OFFLOAD_VLAN_STRIP, then we should send VIRTCHNL_OP_DISABLE_VLAN_STRIPPING command to the PF from the guest.

With more debugging enabled, when DPDK requests VLAN filtering by sending VIRTCHNL_OP_ADD_VLAN to the PF, then we see that the VF stripping is enabled also on Linux. If we don't add VLAN ID and send VIRTCHNL_OP_ADD_VLAN message down to the PF , then we do receive packets with VLAN ID set.
The same works fine in VmWare drivers, where we do receive VALN id in the packets if STRIP is disabled.

In the linux case, when we receive frames with VLAN headers, the vlan id is stripped at the PF, and the TCI will record the missing VLAN details when handed up to the DPDK driver.

With i40e debug enabled, it's clear to see the difference being reported in i40e_rxd_to_vlan_tci:


Example using VLAN on i40evf SR-IOV (vlan fails):
PMD: i40e_rxd_to_vlan_tci(): Mbuf vlan_tci: 8, vlan_tci_outer: 0
Port 0 pkt-len=60 nb-segs=1
ETH: src=00:10:E0:8D:A7:52 dst=FF:FF:FF:FF:FF:FF type=0x0806
ARP: hrd=1 proto=0x0800 hln=6 pln=4 op=1 (ARP Request)
sha=00:10:E0:8D:A7:52 sip=8.8.8.102<http://8.8.8.102>
tha=00:00:00:00:00:00 tip=8.8.8.3<http://8.8.8.3>

As the application requested tagging not be stripped, and the hardware driver was not able to disable strip, in my opinion either DPDK or linux driver should have a bug in handing this. Also as we see VmWare i40e driver working it could be either a extra config required for linux driver or a bug in linux driver.
I also tried to add a call to rte_vlan_insert() to reinstate the VLAN header using the data from TCI in i40e_rxd_to_vlan_tci(), but it is having performance impacts as expected. Also as rte_vlan_insert() does not support QINQ, it will have other issues too.

Can you please clarify if this is working for i40e vlan filter test and if we are missing something in the DPDK, like sending VIRTCHNL_OP_DISABLE_VLAN_STRIPPING after every VIRTCHNL_OP_ADD_VLAN if DEV_RX_OFFLOAD_VLAN_STRIP is not set by the DPDk app.

--
Regards,
Souvik

  parent reply	other threads:[~2020-06-15 12:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-13 16:04 Dey, Souvik
2020-04-13 20:03 ` Dey, Souvik
2020-04-14  6:37   ` Xing, Beilei
2020-04-16 14:05     ` Dey, Souvik
     [not found] ` <AM5PR10MB1668EB8F6B338B827AAE7E9ADF9C0@AM5PR10MB1668.EURPRD10.PROD.OUTLOOK.COM>
2020-06-15 12:43   ` Dey, Souvik [this message]
2020-06-15 12:45     ` Yan Fridland
2020-06-15 15:06     ` Yan Fridland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM6PR03MB47772913A7EDC749A19D050CCD9C0@DM6PR03MB4777.namprd03.prod.outlook.com \
    --to=sodey@rbbn.com \
    --cc=dev@dpdk.org \
    --cc=yan@asocscloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).