diff mbox

[dpdk-dev] i40e: remove ALLOW_LB flag on SRIOV vsi

Message ID 1426836708-19861-1-git-send-email-jingjing.wu@intel.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Wu, Jingjing March 20, 2015, 7:31 a.m. UTC
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(-)

Comments

Helin Zhang March 24, 2015, 2:37 a.m. UTC | #1
> -----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
Thomas Monjalon March 27, 2015, 10:35 a.m. UTC | #2
> > 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
diff mbox

Patch

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