DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi
@ 2015-03-20  7:31 Jingjing Wu
  2015-03-24  2:37 ` Zhang, Helin
  2015-03-25  3:14 ` Xu, HuilongX
  0 siblings, 2 replies; 4+ messages in thread
From: Jingjing Wu @ 2015-03-20  7:31 UTC (permalink / raw)
  To: dev

Disable VEB switching by removing ALLOW_LB on SRIOV vsi.

If the source mac address of packet sent from VF is not listed in the
VEB's mac table, the VEB will switch the packet back to the VF.
It's a hardware issue. Enabling ALLOW_LB flag will block VF functions.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index cf6685e..28ea5dc 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -3059,11 +3059,15 @@ i40e_vsi_setup(struct i40e_pf *pf,
 		ctxt.connection_type = 0x1;
 		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
 
-		/* Configure switch ID */
-		ctxt.info.valid_sections |=
-			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);
-		ctxt.info.switch_id =
-			rte_cpu_to_le_16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
+		/**
+		 * Do not configure switch ID to enable VEB switch by
+		 * I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB. Because in Fortville,
+		 * if the source mac address of packet sent from VF is not
+		 * listed in the VEB's mac table, the VEB will switch the
+		 * packet back to the VF. Need to enable it when HW issue
+		 * is fixed.
+		 */
+
 		/* Configure port/vlan */
 		ctxt.info.valid_sections |=
 			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_VLAN_VALID);
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi
  2015-03-20  7:31 [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi Jingjing Wu
@ 2015-03-24  2:37 ` Zhang, Helin
  2015-03-27 10:35   ` Thomas Monjalon
  2015-03-25  3:14 ` Xu, HuilongX
  1 sibling, 1 reply; 4+ messages in thread
From: Zhang, Helin @ 2015-03-24  2:37 UTC (permalink / raw)
  To: Wu, Jingjing, dev



> -----Original Message-----
> From: Wu, Jingjing
> Sent: Friday, March 20, 2015 3:32 PM
> To: dev@dpdk.org
> Cc: Wu, Jingjing; Xu, HuilongX; Zhang, Helin
> Subject: [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi
> 
> Disable VEB switching by removing ALLOW_LB on SRIOV vsi.
> 
> If the source mac address of packet sent from VF is not listed in the VEB's mac
> table, the VEB will switch the packet back to the VF.
> It's a hardware issue. Enabling ALLOW_LB flag will block VF functions.
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
> ---
>  lib/librte_pmd_i40e/i40e_ethdev.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c
> b/lib/librte_pmd_i40e/i40e_ethdev.c
> index cf6685e..28ea5dc 100644
> --- a/lib/librte_pmd_i40e/i40e_ethdev.c
> +++ b/lib/librte_pmd_i40e/i40e_ethdev.c
> @@ -3059,11 +3059,15 @@ i40e_vsi_setup(struct i40e_pf *pf,
>  		ctxt.connection_type = 0x1;
>  		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
> 
> -		/* Configure switch ID */
> -		ctxt.info.valid_sections |=
> -			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);
> -		ctxt.info.switch_id =
> -			rte_cpu_to_le_16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
> +		/**
> +		 * Do not configure switch ID to enable VEB switch by
> +		 * I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB. Because in Fortville,
> +		 * if the source mac address of packet sent from VF is not
> +		 * listed in the VEB's mac table, the VEB will switch the
> +		 * packet back to the VF. Need to enable it when HW issue
> +		 * is fixed.
> +		 */
> +
>  		/* Configure port/vlan */
>  		ctxt.info.valid_sections |=
>  			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_VLAN_VALID);
> --
> 1.9.3

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

* Re: [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi
  2015-03-20  7:31 [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi Jingjing Wu
  2015-03-24  2:37 ` Zhang, Helin
@ 2015-03-25  3:14 ` Xu, HuilongX
  1 sibling, 0 replies; 4+ messages in thread
From: Xu, HuilongX @ 2015-03-25  3:14 UTC (permalink / raw)
  To: Wu, Jingjing, dev

Tested-by:huilong xu <huilongx.xu@intel.com>

 - Tested Commit: 0095bb6dd77a6b4570af27320187e63bf37500c6
 - OS: FC20 3.11.10-301.fc20.x86_64
 - GCC: gcc version 4.8.3 20140911 (Red Hat 4.8.3-7) (GCC)
 - CPU: Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz
 - NIC: Ethernet controller [0200]: Intel Corporation Ethernet Controller XL710 for 40GbE QSFP+ [8086:1584]

 - Default x86_64-native-linuxapp-gcc configuration
 - Total 6 cases, 6 passed, 0 failed
 
   1vf/1pf test environment set up:
        1.build and install dpdk driver, bind igb_uio to PF
        2.create 1vf in host
	      echo 1 > ./devices/pci0000:80/0000:80:02.0/0000:83:00.0/max_vfs
        3. dettach VF nic
          virsh nodedev-dettach pci_0000_83_02_0
        4. run testpmd in host
           ./testpmd -c f -n 4 -- -i --txqflags
        5. exec cmd in testpmd
           a) vlan set strip off all
           b) rx_vlan add 1 0
        6. start vm
           taskset -c 6-10 qemu-system-x86_64 \
           -enable-kvm -m 8192  -smp 2 -cpu host -name dpdk15-vm2 \
           -drive file=/home/image/vdisk02-sriov-fc20.img \
           -net tap,script=/etc/qemu-ifup \
           -device pci-assign,bus=pci.0,addr=0xb,host=83:02.0 \
           -mem-path /dev/hugepages -mem-prealloc \
           -vnc :12 -daemonize
        7. in VM build and install dpdk driver ,bind igb_uio to VF
        8. run testpmd in VM
           ./testpmd -c f -n 4 -- -i --txqflags
        9. exec cmd lin in vm
            set promisc all off
            vlan set strip off all
            rx_vlan add 1 0
            set fwd io
            start
 - Case 1:  send package dst mac is VF MAC, not include VLAN 
            VF can received package and fwd , ixia can received package, this cas passed
 - Case 2:  send package dst mac isn't VF mac,not include VLAN
            VF can received package and fwd , ixia can received package, this cas passed
 - Case 3:  send package dst mac is VF mac and include VLAN ID 1
            VF can received package and fwd , ixia can received package and include VLAN ID 1, this cas passed
 
  2vf/1pf test environment set up:
        1.build and install dpdk driver, bind igb_uio to PF
        2.create 1vf in host
	      echo 2 > ./devices/pci0000:80/0000:80:02.0/0000:83:00.0/max_vfs
        3. dettach VF nic
          virsh nodedev-dettach pci_0000_83_02_0
          virsh nodedev-dettach pci_0000_83_02_1
        4. run testpmd in host
           ./testpmd -c f -n 4 -- -i --txqflags
        5. exec cmd in testpmd
           a) vlan set strip off all
           b) rx_vlan add 1 0
        6. start vm
           taskset -c 6-10 qemu-system-x86_64 \
           -enable-kvm -m 8192  -smp 2 -cpu host -name dpdk15-vm2 \
           -drive file=/home/image/vdisk02-sriov-fc20.img \
           -net tap,script=/etc/qemu-ifup \
           -device pci-assign,bus=pci.0,addr=0xb,host=83:02.0 \
           -device pci-assign,bus=pci.0,addr=0xb,host=83:02.1 \
           -mem-path /dev/hugepages -mem-prealloc \
           -vnc :12 -daemonize
        7. in VM build and install dpdk driver ,bind igb_uio to VF
        8. run testpmd in VM
           ./testpmd -c f -n 4 -- -i --txqflags
        9. exec cmd lin in vm
            set promisc all off
            vlan set strip off all
            rx_vlan add 1 0
            set fwd io
            start
 - Case 1:  send package dst mac is VF MAC, not include VLAN 
            VF can received package and fwd , ixia can received package, this cas passed
 - Case 2:  send package dst mac isn't VF mac,not include VLAN
            VF can received package and fwd , ixia can received package, this cas passed
 - Case 3:  send package dst mac is VF mac and include VLAN ID 1
            VF can received package and fwd , ixia can received package and include VLAN ID 1, this cas passed
                      
-----Original Message-----
From: Wu, Jingjing 
Sent: Friday, March 20, 2015 3:32 PM
To: dev@dpdk.org
Cc: Wu, Jingjing; Xu, HuilongX; Zhang, Helin
Subject: [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi

Disable VEB switching by removing ALLOW_LB on SRIOV vsi.

If the source mac address of packet sent from VF is not listed in the
VEB's mac table, the VEB will switch the packet back to the VF.
It's a hardware issue. Enabling ALLOW_LB flag will block VF functions.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 lib/librte_pmd_i40e/i40e_ethdev.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index cf6685e..28ea5dc 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -3059,11 +3059,15 @@ i40e_vsi_setup(struct i40e_pf *pf,
 		ctxt.connection_type = 0x1;
 		ctxt.flags = I40E_AQ_VSI_TYPE_VF;
 
-		/* Configure switch ID */
-		ctxt.info.valid_sections |=
-			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_SWITCH_VALID);
-		ctxt.info.switch_id =
-			rte_cpu_to_le_16(I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB);
+		/**
+		 * Do not configure switch ID to enable VEB switch by
+		 * I40E_AQ_VSI_SW_ID_FLAG_ALLOW_LB. Because in Fortville,
+		 * if the source mac address of packet sent from VF is not
+		 * listed in the VEB's mac table, the VEB will switch the
+		 * packet back to the VF. Need to enable it when HW issue
+		 * is fixed.
+		 */
+
 		/* Configure port/vlan */
 		ctxt.info.valid_sections |=
 			rte_cpu_to_le_16(I40E_AQ_VSI_PROP_VLAN_VALID);
-- 
1.9.3

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

* Re: [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi
  2015-03-24  2:37 ` Zhang, Helin
@ 2015-03-27 10:35   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-03-27 10:35 UTC (permalink / raw)
  To: Wu, Jingjing; +Cc: dev

> > Disable VEB switching by removing ALLOW_LB on SRIOV vsi.
> > 
> > If the source mac address of packet sent from VF is not listed in the VEB's mac
> > table, the VEB will switch the packet back to the VF.
> > It's a hardware issue. Enabling ALLOW_LB flag will block VF functions.
> > 
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> Acked-by: Helin Zhang <helin.zhang@intel.com>

Applied, thanks

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

end of thread, other threads:[~2015-03-27 10:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20  7:31 [dpdk-dev] [PATCH] i40e: remove ALLOW_LB flag on SRIOV vsi Jingjing Wu
2015-03-24  2:37 ` Zhang, Helin
2015-03-27 10:35   ` Thomas Monjalon
2015-03-25  3:14 ` Xu, HuilongX

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