net/ice: support orignal VF action for DCF
PATCH 1/1 net/ice: support orignal VF action for DCF
From: Qi Zhang <[email protected]>
Add support to allow the original VF actions in DCF.
---
This patch depends on the previous patchset:
"enable DCF datapath configuration",
which starts with patch:
"net/ice: init RSS and supported RXDID in DCF"
--- drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/net/ice/ice_switch_filter.c +10 -3
@@ -23,6 +23,7 @@#include "ice_logs.h" #include "ice_ethdev.h" #include "ice_generic_flow.h" +#include "ice_dcf_ethdev.h" #define MAX_QGRP_NUM_TYPE 7
@@ -1240,7 +1241,8 @@ ice_switch_inset_get(const struct rte_flow_item pattern[], }static int -ice_switch_parse_dcf_action (const struct rte_flow_action *actions, +ice_switch_parse_dcf_action (struct ice_dcf_adapter *ad, +const struct rte_flow_action *actions,struct rte_flow_error *error,struct ice_adv_rule_info *rule_info) {
@@ -1255,7 +1257,11 @@ ice_switch_parse_dcf_action(const struct rte_flow_action *actions,case RTE_FLOW_ACTION_TYPE_VF : rule_info->sw_act.fltr_act =ICE_FWD_TO_VSI ; act_vf = action->conf; - rule_info->sw_act.vsi_handle = act_vf->id; +if (act_vf->original) + rule_info->sw_act.vsi_handle = + ad->real_hw.avf.bus.func; +else + rule_info->sw_act.vsi_handle = act_vf->id;break ;default : rte_flow_error_set(error,
@@ -1515,7 +1521,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, }if (ad->hw.dcf_enabled) - ret =ice_switch_parse_dcf_action (actions, error, &rule_info); + ret =ice_switch_parse_dcf_action ((void *)ad, actions, error, + &rule_info);else ret =ice_switch_parse_action (pf, actions, error, &rule_info);
Signature · 1 line
2.17.1
PATCH v2 1/1 net/ice: support original VF action for DCF
From: Qi Zhang <[email protected]>
Add support to allow the original VF actions in DCF.
---v1->v2: correct commit log.
--- drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)
drivers/net/ice/ice_switch_filter.c +10 -3
@@ -23,6 +23,7 @@#include "ice_logs.h" #include "ice_ethdev.h" #include "ice_generic_flow.h" +#include "ice_dcf_ethdev.h" #define MAX_QGRP_NUM_TYPE 7
@@ -1240,7 +1241,8 @@ ice_switch_inset_get(const struct rte_flow_item pattern[], }static int -ice_switch_parse_dcf_action (const struct rte_flow_action *actions, +ice_switch_parse_dcf_action (struct ice_dcf_adapter *ad, +const struct rte_flow_action *actions,struct rte_flow_error *error,struct ice_adv_rule_info *rule_info) {
@@ -1255,7 +1257,11 @@ ice_switch_parse_dcf_action(const struct rte_flow_action *actions,case RTE_FLOW_ACTION_TYPE_VF : rule_info->sw_act.fltr_act =ICE_FWD_TO_VSI ; act_vf = action->conf; - rule_info->sw_act.vsi_handle = act_vf->id; +if (act_vf->original) + rule_info->sw_act.vsi_handle = + ad->real_hw.avf.bus.func; +else + rule_info->sw_act.vsi_handle = act_vf->id;break ;default : rte_flow_error_set(error,
@@ -1515,7 +1521,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, }if (ad->hw.dcf_enabled) - ret =ice_switch_parse_dcf_action (actions, error, &rule_info); + ret =ice_switch_parse_dcf_action ((void *)ad, actions, error, + &rule_info);else ret =ice_switch_parse_action (pf, actions, error, &rule_info);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2] net/ice: support original VF action for DCF
Quoted 69 lines
-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Thursday, June 11, 2020 18:15
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>
Subject: [PATCH v2] net/ice: support original VF action for DCFFrom: Qi Zhang <[email protected]>
Add support to allow the original VF actions in DCF.
Signed-off-by Qi Zhang <[email protected]>Signed-off-by Ting Xu <[email protected]>---
v1->v2: correct commit log.--- drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)drivers/net/ice/ice_switch_filter.c +4
-1@@ -23,6 +23,7 @@#include "ice_logs.h" #include "ice_ethdev.h" #include "ice_generic_flow.h" +#include "ice_dcf_ethdev.h" #define MAX_QGRP_NUM_TYPE 7@@ -1240,7 +1241,8 @@ ice_switch_inset_get(const struct rte_flow_item pattern[], }static int -ice_switch_parse_dcf_action (const struct rte_flow_action *actions, +ice_switch_parse_dcf_action (struct ice_dcf_adapter *ad, +const struct rte_flow_action *actions,struct rte_flow_error *error, struct ice_adv_rule_info *rule_info) { @@ -1255,7 +1257,11 @@ ice_switch_parse_dcf_action(const struct rte_flow_action*actions,
drivers/net/ice/ice_switch_filter.c +7
-3case RTE_FLOW_ACTION_TYPE_VF : rule_info->sw_act.fltr_act =ICE_FWD_TO_VSI ; act_vf = action->conf; - rule_info->sw_act.vsi_handle = act_vf->id; +if (act_vf->original) + rule_info->sw_act.vsi_handle = + ad->real_hw.avf.bus.func; +else + rule_info->sw_act.vsi_handle = act_vf->id;break ;default : rte_flow_error_set(error,@@ -1515,7 +1521,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, }if (ad->hw.dcf_enabled) - ret =ice_switch_parse_dcf_action (actions, error, &rule_info); + ret =ice_switch_parse_dcf_action ((void *)ad, actions, error, + &rule_info);else ret =ice_switch_parse_action (pf, actions, error, &rule_info); --
Quoted 1 line
2.17.1
Zhang, Qi Z
AppliedRe: [dpdk-dev] [PATCH v2] net/ice: support original VF action for DCF
Quoted 77 lines
-----Original Message-----
From: Yang, Qiming <[email protected]>
Sent: Monday, June 29, 2020 2:12 PM
To: Xu, Ting <[email protected]>; [email protected]
Cc: Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>
Subject: RE: [PATCH v2] net/ice: support original VF action for DCFdrivers/net/ice/ice_switch_filter.c ice_switch_inset_get(const struct
Quoted 35 lines
-----Original Message-----
From: Xu, Ting <[email protected]>
Sent: Thursday, June 11, 2020 18:15
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhang, Qi Z <[email protected]>; Ye, Xiaolong <[email protected]>
Subject: [PATCH v2] net/ice: support original VF action for DCFFrom: Qi Zhang <[email protected]>
Add support to allow the original VF actions in DCF.
Signed-off-by Qi Zhang <[email protected]>Signed-off-by Ting Xu <[email protected]>---
v1->v2: correct commit log.--- drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)drivers/net/ice/ice_switch_filter.c +1
-0@@ -23,6 +23,7 @@#include "ice_logs.h" #include "ice_ethdev.h" #include "ice_generic_flow.h" +#include "ice_dcf_ethdev.h" #define MAX_QGRP_NUM_TYPE 7@@ -1240,7 +1241,8 @@ ice_switch_inset_get(const struct
rte_flow_itemQuoted 32 lines
drivers/net/ice/ice_switch_filter.c +3
-1pattern[], }static int -ice_switch_parse_dcf_action (const struct rte_flow_action *actions, +ice_switch_parse_dcf_action (struct ice_dcf_adapter *ad, +const struct rte_flow_action *actions,struct rte_flow_error *error, struct ice_adv_rule_info *rule_info) { @@ -1255,7 +1257,11 @@ ice_switch_parse_dcf_action(const struct rte_flow_action*actions,
caseRTE_FLOW_ACTION_TYPE_VF:
rule_info->sw_act.fltr_act=ICE_FWD_TO_VSI;act_vf=action->conf;drivers/net/ice/ice_switch_filter.c +7
-2-rule_info->sw_act.vsi_handle = act_vf->id; +if (act_vf->original) +rule_info->sw_act.vsi_handle = +ad->real_hw.avf.bus.func; +else +rule_info->sw_act.vsi_handle = act_vf->id;break ;default : rte_flow_error_set(error,@@ -1515,7 +1521,8 @@ ice_switch_parse_pattern_action(struct ice_adapter *ad, }if (ad->hw.dcf_enabled) -ret =ice_switch_parse_dcf_action (actions, error, &rule_info); +ret =ice_switch_parse_dcf_action ((void *)ad, actions, error, + &rule_info);else ret =ice_switch_parse_action (pf, actions, error, &rule_info);
Quoted 4 lines
Quoted 2 lines
--
2.17.1Acked-by Qiming Yang <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi