DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] net/ice/base: fix DCF switch rule on Tx path
  2020-04-23  3:01 [dpdk-dev] [PATCH] net/ice/base: fix DCF switch rule on Tx path Qi Zhang
@ 2020-04-23  3:00 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2020-04-23  3:00 UTC (permalink / raw)
  To: Yang, Qiming; +Cc: Ye, Xiaolong, dev



> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Thursday, April 23, 2020 11:02 AM
> To: Yang, Qiming <qiming.yang@intel.com>
> Cc: Ye, Xiaolong <xiaolong.ye@intel.com>; dev@dpdk.org; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Subject: [PATCH] net/ice/base: fix DCF switch rule on Tx path
> 
> 1. ln_en bit should not be turned on, since we only support Rx VEB.
> 2. lan_en bit need to be turn on for a DCF switch rule, otherwise
>    any Tx packet that hit on a rule will be dropped.
> 
> Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch
> recipe")
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>

Nacked-by: Qi Zhang <qi.z.zhang@intel.com>

Send wrong patch.

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

* [dpdk-dev] [PATCH] net/ice/base: fix DCF switch rule on Tx path
@ 2020-04-23  3:01 Qi Zhang
  2020-04-23  3:00 ` Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Qi Zhang @ 2020-04-23  3:01 UTC (permalink / raw)
  To: qiming.yang; +Cc: xiaolong.ye, dev, Qi Zhang

1. ln_en bit should not be turned on, since we only support Rx VEB.
2. lan_en bit need to be turn on for a DCF switch rule, otherwise
   any Tx packet that hit on a rule will be dropped.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_switch.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index fd2cf101a..2d595cb8e 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -1938,6 +1938,13 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi)
 {
 	fi->lb_en = false;
 	fi->lan_en = false;
+
+	if ((fi->flag & ICE_FLTR_RX) &&
+	    (fi->fltr_act == ICE_FWD_TO_VSI ||
+	     fi->fltr_act == ICE_FWD_TO_VSI_LIST) &&
+	    fi->lkup_type == ICE_SW_LKUP_LAST)
+		fi->lan_en = true;
+
 	if ((fi->flag & ICE_FLTR_TX) &&
 	    (fi->fltr_act == ICE_FWD_TO_VSI ||
 	     fi->fltr_act == ICE_FWD_TO_VSI_LIST ||
@@ -6615,7 +6622,7 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	s_rule = (struct ice_aqc_sw_rules_elem *)ice_malloc(hw, rule_buf_sz);
 	if (!s_rule)
 		return ICE_ERR_NO_MEMORY;
-	act |= ICE_SINGLE_ACT_LB_ENABLE | ICE_SINGLE_ACT_LAN_ENABLE;
+	act |= ICE_SINGLE_ACT_LAN_ENABLE;
 	switch (rinfo->sw_act.fltr_act) {
 	case ICE_FWD_TO_VSI:
 		act |= (rinfo->sw_act.fwd_id.hw_vsi_id <<
-- 
2.13.6


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

end of thread, other threads:[~2020-04-23  3:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-23  3:01 [dpdk-dev] [PATCH] net/ice/base: fix DCF switch rule on Tx path Qi Zhang
2020-04-23  3:00 ` Zhang, Qi Z

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