* [dpdk-dev] [PATCH] i40e: revert internal switch of PF
@ 2015-03-18 10:06 Thomas Monjalon
2015-03-18 16:04 ` Wu, Jingjing
2015-03-19 1:37 ` Zhang, Helin
0 siblings, 2 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-03-18 10:06 UTC (permalink / raw)
To: helin.zhang; +Cc: dev
VEB switching is blocking VF.
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 an hardware issue.
Reverts: 2ccabd8cd1f6 ("i40e: enable internal switch of PF").
Reported-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
lib/librte_pmd_i40e/i40e_ethdev.c | 36 ------------------------------------
1 file changed, 36 deletions(-)
diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
index 6888072..cf6685e 100644
--- a/lib/librte_pmd_i40e/i40e_ethdev.c
+++ b/lib/librte_pmd_i40e/i40e_ethdev.c
@@ -2868,40 +2868,6 @@ i40e_vsi_dump_bw_config(struct i40e_vsi *vsi)
return 0;
}
-/*
- * i40e_enable_pf_lb
- * @pf: pointer to the pf structure
- *
- * allow loopback on pf
- */
-static inline void
-i40e_enable_pf_lb(struct i40e_pf *pf)
-{
- struct i40e_hw *hw = I40E_PF_TO_HW(pf);
- struct i40e_vsi_context ctxt;
- int ret;
-
- memset(&ctxt, 0, sizeof(ctxt));
- ctxt.seid = pf->main_vsi_seid;
- ctxt.pf_num = hw->pf_id;
- ret = i40e_aq_get_vsi_params(hw, &ctxt, NULL);
- if (ret) {
- PMD_DRV_LOG(ERR, "couldn't get pf vsi config, err %d, aq_err %d",
- ret, hw->aq.asq_last_status);
- return;
- }
- ctxt.flags = I40E_AQ_VSI_TYPE_PF;
- 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);
-
- ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
- if (ret)
- PMD_DRV_LOG(ERR, "update vsi switch failed, aq_err=%d\n",
- hw->aq.asq_last_status);
-}
-
/* Setup a VSI */
struct i40e_vsi *
i40e_vsi_setup(struct i40e_pf *pf,
@@ -2937,8 +2903,6 @@ i40e_vsi_setup(struct i40e_pf *pf,
PMD_DRV_LOG(ERR, "VEB setup failed");
return NULL;
}
- /* set ALLOWLOOPBACk on pf, when veb is created */
- i40e_enable_pf_lb(pf);
}
vsi = rte_zmalloc("i40e_vsi", sizeof(struct i40e_vsi), 0);
--
2.2.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] i40e: revert internal switch of PF
2015-03-18 10:06 [dpdk-dev] [PATCH] i40e: revert internal switch of PF Thomas Monjalon
@ 2015-03-18 16:04 ` Wu, Jingjing
2015-03-19 1:37 ` Zhang, Helin
1 sibling, 0 replies; 4+ messages in thread
From: Wu, Jingjing @ 2015-03-18 16:04 UTC (permalink / raw)
To: Thomas Monjalon, Zhang, Helin; +Cc: dev
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, March 18, 2015 3:07 AM
> To: Zhang, Helin
> Cc: dev@dpdk.org; Wu, Jingjing
> Subject: [PATCH] i40e: revert internal switch of PF
>
> VEB switching is blocking VF.
> 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 an hardware issue.
>
> Reverts: 2ccabd8cd1f6 ("i40e: enable internal switch of PF").
>
> Reported-by: Jingjing Wu <jingjing.wu@intel.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
> lib/librte_pmd_i40e/i40e_ethdev.c | 36 ------------------------------------
> 1 file changed, 36 deletions(-)
>
> diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c b/lib/librte_pmd_i40e/i40e_ethdev.c
> index 6888072..cf6685e 100644
> --- a/lib/librte_pmd_i40e/i40e_ethdev.c
> +++ b/lib/librte_pmd_i40e/i40e_ethdev.c
> @@ -2868,40 +2868,6 @@ i40e_vsi_dump_bw_config(struct i40e_vsi *vsi)
> return 0;
> }
>
> -/*
> - * i40e_enable_pf_lb
> - * @pf: pointer to the pf structure
> - *
> - * allow loopback on pf
> - */
> -static inline void
> -i40e_enable_pf_lb(struct i40e_pf *pf)
> -{
> - struct i40e_hw *hw = I40E_PF_TO_HW(pf);
> - struct i40e_vsi_context ctxt;
> - int ret;
> -
> - memset(&ctxt, 0, sizeof(ctxt));
> - ctxt.seid = pf->main_vsi_seid;
> - ctxt.pf_num = hw->pf_id;
> - ret = i40e_aq_get_vsi_params(hw, &ctxt, NULL);
> - if (ret) {
> - PMD_DRV_LOG(ERR, "couldn't get pf vsi config, err %d, aq_err %d",
> - ret, hw->aq.asq_last_status);
> - return;
> - }
> - ctxt.flags = I40E_AQ_VSI_TYPE_PF;
> - 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);
> -
> - ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
> - if (ret)
> - PMD_DRV_LOG(ERR, "update vsi switch failed, aq_err=%d\n",
> - hw->aq.asq_last_status);
> -}
> -
> /* Setup a VSI */
> struct i40e_vsi *
> i40e_vsi_setup(struct i40e_pf *pf,
> @@ -2937,8 +2903,6 @@ i40e_vsi_setup(struct i40e_pf *pf,
> PMD_DRV_LOG(ERR, "VEB setup failed");
> return NULL;
> }
> - /* set ALLOWLOOPBACk on pf, when veb is created */
> - i40e_enable_pf_lb(pf);
> }
>
> vsi = rte_zmalloc("i40e_vsi", sizeof(struct i40e_vsi), 0);
> --
> 2.2.2
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] i40e: revert internal switch of PF
2015-03-18 10:06 [dpdk-dev] [PATCH] i40e: revert internal switch of PF Thomas Monjalon
2015-03-18 16:04 ` Wu, Jingjing
@ 2015-03-19 1:37 ` Zhang, Helin
2015-03-19 17:07 ` Thomas Monjalon
1 sibling, 1 reply; 4+ messages in thread
From: Zhang, Helin @ 2015-03-19 1:37 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Wednesday, March 18, 2015 6:07 PM
> To: Zhang, Helin
> Cc: dev@dpdk.org; Wu, Jingjing
> Subject: [PATCH] i40e: revert internal switch of PF
>
> VEB switching is blocking VF.
> 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 an hardware issue.
>
> Reverts: 2ccabd8cd1f6 ("i40e: enable internal switch of PF").
>
> Reported-by: Jingjing Wu <jingjing.wu@intel.com>
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
> ---
> lib/librte_pmd_i40e/i40e_ethdev.c | 36 ------------------------------------
> 1 file changed, 36 deletions(-)
>
> diff --git a/lib/librte_pmd_i40e/i40e_ethdev.c
> b/lib/librte_pmd_i40e/i40e_ethdev.c
> index 6888072..cf6685e 100644
> --- a/lib/librte_pmd_i40e/i40e_ethdev.c
> +++ b/lib/librte_pmd_i40e/i40e_ethdev.c
> @@ -2868,40 +2868,6 @@ i40e_vsi_dump_bw_config(struct i40e_vsi *vsi)
> return 0;
> }
>
> -/*
> - * i40e_enable_pf_lb
> - * @pf: pointer to the pf structure
> - *
> - * allow loopback on pf
> - */
> -static inline void
> -i40e_enable_pf_lb(struct i40e_pf *pf)
> -{
> - struct i40e_hw *hw = I40E_PF_TO_HW(pf);
> - struct i40e_vsi_context ctxt;
> - int ret;
> -
> - memset(&ctxt, 0, sizeof(ctxt));
> - ctxt.seid = pf->main_vsi_seid;
> - ctxt.pf_num = hw->pf_id;
> - ret = i40e_aq_get_vsi_params(hw, &ctxt, NULL);
> - if (ret) {
> - PMD_DRV_LOG(ERR, "couldn't get pf vsi config, err %d, aq_err %d",
> - ret, hw->aq.asq_last_status);
> - return;
> - }
> - ctxt.flags = I40E_AQ_VSI_TYPE_PF;
> - 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);
> -
> - ret = i40e_aq_update_vsi_params(hw, &ctxt, NULL);
> - if (ret)
> - PMD_DRV_LOG(ERR, "update vsi switch failed, aq_err=%d\n",
> - hw->aq.asq_last_status);
> -}
> -
> /* Setup a VSI */
> struct i40e_vsi *
> i40e_vsi_setup(struct i40e_pf *pf,
> @@ -2937,8 +2903,6 @@ i40e_vsi_setup(struct i40e_pf *pf,
> PMD_DRV_LOG(ERR, "VEB setup failed");
> return NULL;
> }
> - /* set ALLOWLOOPBACk on pf, when veb is created */
> - i40e_enable_pf_lb(pf);
> }
>
> vsi = rte_zmalloc("i40e_vsi", sizeof(struct i40e_vsi), 0);
> --
> 2.2.2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] i40e: revert internal switch of PF
2015-03-19 1:37 ` Zhang, Helin
@ 2015-03-19 17:07 ` Thomas Monjalon
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2015-03-19 17:07 UTC (permalink / raw)
To: Zhang, Helin; +Cc: dev
> > VEB switching is blocking VF.
> > 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 an hardware issue.
> >
> > Reverts: 2ccabd8cd1f6 ("i40e: enable internal switch of PF").
> >
> > Reported-by: Jingjing Wu <jingjing.wu@intel.com>
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.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-19 17:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18 10:06 [dpdk-dev] [PATCH] i40e: revert internal switch of PF Thomas Monjalon
2015-03-18 16:04 ` Wu, Jingjing
2015-03-19 1:37 ` Zhang, Helin
2015-03-19 17:07 ` Thomas Monjalon
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).