DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
@ 2020-07-14  2:43 Wu, Jianyue (NSB - CN/Hangzhou)
  2020-07-14  2:53 ` Johnson, Brian
  0 siblings, 1 reply; 7+ messages in thread
From: Wu, Jianyue (NSB - CN/Hangzhou) @ 2020-07-14  2:43 UTC (permalink / raw)
  To: xiaoyun.li, users
  Cc: Harouat, Karim (Nokia - FR/Lannion),
	Meunier,  Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
                  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
          vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================

Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
  2020-07-14  2:43 [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF Wu, Jianyue (NSB - CN/Hangzhou)
@ 2020-07-14  2:53 ` Johnson, Brian
  2020-07-14  3:21   ` Wu, Jianyue (NSB - CN/Hangzhou)
  2020-07-14  5:29   ` Li, Xiaoyun
  0 siblings, 2 replies; 7+ messages in thread
From: Johnson, Brian @ 2020-07-14  2:53 UTC (permalink / raw)
  To: Wu, Jianyue (NSB - CN/Hangzhou), Li, Xiaoyun, users
  Cc: Harouat, Karim (Nokia - FR/Lannion),
	Meunier,  Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

What network adapter are you using?

In some cases if there is a port vlan set, since the VF driver does not know to add an additional 4B to the max Rx packet length, the packets get dropped by the hardware filters if the packet is at full MTU size.

Try setting the MTU in DPDK and this should add the 4B or 8B needed.

________________________________
From: users <users-bounces@dpdk.org> on behalf of Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com>
Sent: Monday, July 13, 2020 7:43:38 PM
To: Li, Xiaoyun <xiaoyun.li@intel.com>; users@dpdk.org <users@dpdk.org>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com>
Subject: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
                  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
          vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================

Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
  2020-07-14  2:53 ` Johnson, Brian
@ 2020-07-14  3:21   ` Wu, Jianyue (NSB - CN/Hangzhou)
  2020-07-14  3:46     ` Johnson, Brian
  2020-07-14  5:29   ` Li, Xiaoyun
  1 sibling, 1 reply; 7+ messages in thread
From: Wu, Jianyue (NSB - CN/Hangzhou) @ 2020-07-14  3:21 UTC (permalink / raw)
  To: Johnson, Brian, Li, Xiaoyun, users
  Cc: Harouat, Karim (Nokia - FR/Lannion),
	Meunier,  Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

Hi, Brian,

Thanks indeed for the quick response.
Network adaptor is X552 which integrated in XEON, https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/ethernet-x550-datasheet.pdf

The MTU in PF is “mtu 9194”
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
In current test, I sent the packet size is 1kB, maybe small packets.

OK, thanks, I’ll also try set dpdk mtu, to avoid big packets drop in HW filtering. Is it like this? rte_eth_dev_set_mtu(port_id, 9194 - 8).

Best Regards,
Dave(Jianyue)

From: Johnson, Brian <brian.johnson@intel.com>
Sent: 2020年7月14日 10:53
To: Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com>; Li, Xiaoyun <xiaoyun.li@intel.com>; users@dpdk.org
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com>
Subject: Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

What network adapter are you using?

In some cases if there is a port vlan set, since the VF driver does not know to add an additional 4B to the max Rx packet length, the packets get dropped by the hardware filters if the packet is at full MTU size.

Try setting the MTU in DPDK and this should add the 4B or 8B needed.

________________________________
From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> on behalf of Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>
Sent: Monday, July 13, 2020 7:43:38 PM
To: Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org> <users@dpdk.org<mailto:users@dpdk.org>>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
    rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
     vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================
Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
  2020-07-14  3:21   ` Wu, Jianyue (NSB - CN/Hangzhou)
@ 2020-07-14  3:46     ` Johnson, Brian
  2020-07-14  5:01       ` Wu, Jianyue (NSB - CN/Hangzhou)
  0 siblings, 1 reply; 7+ messages in thread
From: Johnson, Brian @ 2020-07-14  3:46 UTC (permalink / raw)
  To: Wu, Jianyue (NSB - CN/Hangzhou)
  Cc: Li, Xiaoyun, users, Harouat, Karim (Nokia - FR/Lannion),
	Meunier, Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

You might want to double check with Ethernet Controller is connected to the X522. If it is loading the i40e driver then it is the X722 with is not part of the 500 Series (X520, X540, and X550) with uses the ixgbe driver. The 700 Series sets the MTU on VFs independently of the MTU on the PF so it should be set in the DPDK app.

Sent from my iPhone

On Jul 13, 2020, at 8:21 PM, Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com> wrote:


Hi, Brian,

Thanks indeed for the quick response.
Network adaptor is X552 which integrated in XEON, https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/ethernet-x550-datasheet.pdf

The MTU in PF is “mtu 9194”
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
In current test, I sent the packet size is 1kB, maybe small packets.

OK, thanks, I’ll also try set dpdk mtu, to avoid big packets drop in HW filtering. Is it like this? rte_eth_dev_set_mtu(port_id, 9194 - 8).

Best Regards,
Dave(Jianyue)

From: Johnson, Brian <brian.johnson@intel.com>
Sent: 2020年7月14日 10:53
To: Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com>; Li, Xiaoyun <xiaoyun.li@intel.com>; users@dpdk.org
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com>
Subject: Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

What network adapter are you using?

In some cases if there is a port vlan set, since the VF driver does not know to add an additional 4B to the max Rx packet length, the packets get dropped by the hardware filters if the packet is at full MTU size.

Try setting the MTU in DPDK and this should add the 4B or 8B needed.

________________________________
From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> on behalf of Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>
Sent: Monday, July 13, 2020 7:43:38 PM
To: Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org> <users@dpdk.org<mailto:users@dpdk.org>>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
    rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
     vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================
Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
  2020-07-14  3:46     ` Johnson, Brian
@ 2020-07-14  5:01       ` Wu, Jianyue (NSB - CN/Hangzhou)
  0 siblings, 0 replies; 7+ messages in thread
From: Wu, Jianyue (NSB - CN/Hangzhou) @ 2020-07-14  5:01 UTC (permalink / raw)
  To: Johnson, Brian
  Cc: Li, Xiaoyun, users, Harouat, Karim (Nokia - FR/Lannion),
	Meunier, Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

Hi, Brian,

Thanks indeed, seems connected to X552, loading ixgbe driver.
OK, so MTUs can be set on VFs when it is i40e driver. It is 500 series, so might be using the PF MTU.

Best Regards,
Dave(Jianyue)

From: Johnson, Brian <brian.johnson@intel.com>
Sent: 2020年7月14日 11:46
To: Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com>
Cc: Li, Xiaoyun <xiaoyun.li@intel.com>; users@dpdk.org; Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com>
Subject: Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

You might want to double check with Ethernet Controller is connected to the X522. If it is loading the i40e driver then it is the X722 with is not part of the 500 Series (X520, X540, and X550) with uses the ixgbe driver. The 700 Series sets the MTU on VFs independently of the MTU on the PF so it should be set in the DPDK app.
Sent from my iPhone


On Jul 13, 2020, at 8:21 PM, Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>> wrote:

Hi, Brian,

Thanks indeed for the quick response.
Network adaptor is X552 which integrated in XEON, https://www.intel.com/content/dam/www/public/us/en/documents/datasheets/ethernet-x550-datasheet.pdf

The MTU in PF is “mtu 9194”
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
In current test, I sent the packet size is 1kB, maybe small packets.

OK, thanks, I’ll also try set dpdk mtu, to avoid big packets drop in HW filtering. Is it like this? rte_eth_dev_set_mtu(port_id, 9194 - 8).

Best Regards,
Dave(Jianyue)

From: Johnson, Brian <brian.johnson@intel.com<mailto:brian.johnson@intel.com>>
Sent: 2020年7月14日 10:53
To: Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>; Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

What network adapter are you using?

In some cases if there is a port vlan set, since the VF driver does not know to add an additional 4B to the max Rx packet length, the packets get dropped by the hardware filters if the packet is at full MTU size.

Try setting the MTU in DPDK and this should add the 4B or 8B needed.

________________________________
From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> on behalf of Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>
Sent: Monday, July 13, 2020 7:43:38 PM
To: Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org> <users@dpdk.org<mailto:users@dpdk.org>>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
    rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
     vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================
Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
  2020-07-14  2:53 ` Johnson, Brian
  2020-07-14  3:21   ` Wu, Jianyue (NSB - CN/Hangzhou)
@ 2020-07-14  5:29   ` Li, Xiaoyun
  2020-07-14  5:53     ` Wu, Jianyue (NSB - CN/Hangzhou)
  1 sibling, 1 reply; 7+ messages in thread
From: Li, Xiaoyun @ 2020-07-14  5:29 UTC (permalink / raw)
  To: Johnson, Brian, Wu, Jianyue (NSB - CN/Hangzhou), users
  Cc: Harouat, Karim (Nokia - FR/Lannion),
	Meunier,  Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

Hi Jianyue

The priority is related to DCB. I don't think DPDK enables dcb by default.
But I'm not familiar with ixgbe and dcb mode. And I'm not sure who is familiar with dcb. Sorry about that.

From X550 datasheet, it seems that your requirement can be achieved. But the related codes in DPDK are quite a mess and complicated.
I think you probably need to read the DCB mode in datasheet first.

BRs
Xiaoyun
From: Johnson, Brian <brian.johnson@intel.com>
Sent: Tuesday, July 14, 2020 10:53
To: Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com>; Li, Xiaoyun <xiaoyun.li@intel.com>; users@dpdk.org
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com>
Subject: Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

What network adapter are you using?

In some cases if there is a port vlan set, since the VF driver does not know to add an additional 4B to the max Rx packet length, the packets get dropped by the hardware filters if the packet is at full MTU size.

Try setting the MTU in DPDK and this should add the 4B or 8B needed.

________________________________
From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> on behalf of Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>
Sent: Monday, July 13, 2020 7:43:38 PM
To: Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org> <users@dpdk.org<mailto:users@dpdk.org>>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
                  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
          vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================

Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF
  2020-07-14  5:29   ` Li, Xiaoyun
@ 2020-07-14  5:53     ` Wu, Jianyue (NSB - CN/Hangzhou)
  0 siblings, 0 replies; 7+ messages in thread
From: Wu, Jianyue (NSB - CN/Hangzhou) @ 2020-07-14  5:53 UTC (permalink / raw)
  To: Li, Xiaoyun, Johnson, Brian, users
  Cc: Harouat, Karim (Nokia - FR/Lannion),
	Meunier,  Julien (Nokia - FR/Paris-Saclay),
	Cheng, Fei 2. (NSB - CN/Hangzhou), Lu, Malak (NSB - CN/Hangzhou),
	Li, Jiu (NSB - CN/Hangzhou), Pan, Jianyong (NSB - CN/Hangzhou),
	Hong, Christian (NSB - CN/Hangzhou),
	Fei, Xiang (NSB - CN/Hangzhou), Ning, Gang (NSB - CN/Hangzhou),
	Ren, Longlong (NSB - CN/Hangzhou), Ye, Hua (NSB - CN/Hangzhou)

Hi, Xiaoyun,

Thanks indeed:)
I tried to enabled VLAN filter offload, and set that VLAN id on, test can pass.
So previous drop is caused by vlan filter is off, so set vlan filter off will still didn’t let this VLAN pass.
After use this API rte_eth_dev_vlan_filter(), it works.


Best Regards,
Dave(Jianyue)

From: Li, Xiaoyun <xiaoyun.li@intel.com>
Sent: 2020年7月14日 13:30
To: Johnson, Brian <brian.johnson@intel.com>; Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com>; users@dpdk.org
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com>
Subject: RE: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi Jianyue

The priority is related to DCB. I don’t think DPDK enables dcb by default.
But I’m not familiar with ixgbe and dcb mode. And I’m not sure who is familiar with dcb. Sorry about that.

From X550 datasheet, it seems that your requirement can be achieved. But the related codes in DPDK are quite a mess and complicated.
I think you probably need to read the DCB mode in datasheet first.

BRs
Xiaoyun
From: Johnson, Brian <brian.johnson@intel.com<mailto:brian.johnson@intel.com>>
Sent: Tuesday, July 14, 2020 10:53
To: Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>; Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: Re: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

What network adapter are you using?

In some cases if there is a port vlan set, since the VF driver does not know to add an additional 4B to the max Rx packet length, the packets get dropped by the hardware filters if the packet is at full MTU size.

Try setting the MTU in DPDK and this should add the 4B or 8B needed.

________________________________
From: users <users-bounces@dpdk.org<mailto:users-bounces@dpdk.org>> on behalf of Wu, Jianyue (NSB - CN/Hangzhou) <jianyue.wu@nokia-sbell.com<mailto:jianyue.wu@nokia-sbell.com>>
Sent: Monday, July 13, 2020 7:43:38 PM
To: Li, Xiaoyun <xiaoyun.li@intel.com<mailto:xiaoyun.li@intel.com>>; users@dpdk.org<mailto:users@dpdk.org> <users@dpdk.org<mailto:users@dpdk.org>>
Cc: Harouat, Karim (Nokia - FR/Lannion) <karim.harouat@nokia.com<mailto:karim.harouat@nokia.com>>; Meunier, Julien (Nokia - FR/Paris-Saclay) <julien.meunier@nokia.com<mailto:julien.meunier@nokia.com>>; Cheng, Fei 2. (NSB - CN/Hangzhou) <fei.2.cheng@nokia-sbell.com<mailto:fei.2.cheng@nokia-sbell.com>>; Lu, Malak (NSB - CN/Hangzhou) <malak.lu@nokia-sbell.com<mailto:malak.lu@nokia-sbell.com>>; Li, Jiu (NSB - CN/Hangzhou) <jiu.li@nokia-sbell.com<mailto:jiu.li@nokia-sbell.com>>; Pan, Jianyong (NSB - CN/Hangzhou) <jianyong.pan@nokia-sbell.com<mailto:jianyong.pan@nokia-sbell.com>>; Hong, Christian (NSB - CN/Hangzhou) <christian.hong@nokia-sbell.com<mailto:christian.hong@nokia-sbell.com>>; Fei, Xiang (NSB - CN/Hangzhou) <xiang.fei@nokia-sbell.com<mailto:xiang.fei@nokia-sbell.com>>; Ning, Gang (NSB - CN/Hangzhou) <gang.ning@nokia-sbell.com<mailto:gang.ning@nokia-sbell.com>>; Ren, Longlong (NSB - CN/Hangzhou) <longlong.ren@nokia-sbell.com<mailto:longlong.ren@nokia-sbell.com>>; Ye, Hua (NSB - CN/Hangzhou) <hua.ye@nokia-sbell.com<mailto:hua.ye@nokia-sbell.com>>
Subject: [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF

Hi, xiaoyun,

Could you help give a hand about this issue? Thanks indeed:)

Background:
Simplified traffic flow is like this: Sender XEON X552 eth1 vf 0 -> Receiver XEON X552 eth1 vf 0.
Our requirement is to configure DPDK to support one VLAN ID, and with multiple priorities 0~7.

Current configuration is:
PVID:
rte_eth_dev_set_vlan_pvid(port_id, 201, 1);
VLAN offload:
                  vlan_offload = rte_eth_dev_get_vlan_offload(port_id);
  vlan_offload &= ~ETH_VLAN_STRIP_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_FILTER_OFFLOAD;
  vlan_offload &= ~ETH_VLAN_EXTEND_OFFLOAD;
  if (0 != rte_eth_dev_set_vlan_offload(port_id, vlan_offload))
Spoof off, trust on:
          vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

Test scenarios:
====================================================
First scenario: set vlan in vf 0 -- priority always 0
====================================================
ip link show eth1
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, vlan 201, spoof checking off, link-state auto, trust on, query_rss off

If we configure vlan in vf 0, then we can only send out packets with priority 0.
Even we already enabled mbuf->ol_flags |= PKT_TX_VLAN_PKT; and set correct mbuf->vlan_tci.

======================================================

Second scenario: not set vlan in vf 0 -- can't recv
======================================================
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9194 qdisc mq state UP mode DEFAULT group default qlen 1000
    link/ether 02:40:43:80:01:38 brd ff:ff:ff:ff:ff:ff
vf 0 MAC 02:40:43:80:01:39, spoof checking off, link-state auto, trust on, query_rss off

If we don't set vlan in vf 0, then we can send out in sender XEON X552 eth1 vf 0 with correct VLAN ID and priority,
From tcpdump in mirrored traffic of receiver XEON, we can see the packet has correct VLAN ID and priority,
but the problem is packet silently dropped. From DPDK counters, we can't see the packet received in
receiver XEON X552 eth1 vf0. When we enable promiscuous mode, we can see the packets arrive in
receiver XEON, and VLAN ID, priority is correct. but can't arrive at DPDK.

From my simple assumption, maybe we need second scenario, to support multiple priorities.
But how to configure to let the packet pass vf 0?
Did I miss something in my configuration?

Thanks indeed in advance!

Best Regards,
Dave(Jianyue)

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-07-14  5:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14  2:43 [dpdk-users] [dpdk-18.05] Issue while configuring VLAN ID and priority in VF Wu, Jianyue (NSB - CN/Hangzhou)
2020-07-14  2:53 ` Johnson, Brian
2020-07-14  3:21   ` Wu, Jianyue (NSB - CN/Hangzhou)
2020-07-14  3:46     ` Johnson, Brian
2020-07-14  5:01       ` Wu, Jianyue (NSB - CN/Hangzhou)
2020-07-14  5:29   ` Li, Xiaoyun
2020-07-14  5:53     ` Wu, Jianyue (NSB - CN/Hangzhou)

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).