* [dpdk-dev] [PATCH v1] net/ice: support orignal VF action for DCF @ 2020-06-06 13:23 Ting Xu 2020-06-11 10:14 ` [dpdk-dev] [PATCH v2] net/ice: support original " Ting Xu 0 siblings, 1 reply; 4+ messages in thread From: Ting Xu @ 2020-06-06 13:23 UTC (permalink / raw) To: dev; +Cc: qi.z.zhang, qiming.yang From: Qi Zhang <qi.z.zhang@intel.com> Add support to allow the original VF actions in DCF. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> --- 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(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index dd3f4847a..993044f88 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -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); -- 2.17.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH v2] net/ice: support original VF action for DCF 2020-06-06 13:23 [dpdk-dev] [PATCH v1] net/ice: support orignal VF action for DCF Ting Xu @ 2020-06-11 10:14 ` Ting Xu 2020-06-29 6:12 ` Yang, Qiming 0 siblings, 1 reply; 4+ messages in thread From: Ting Xu @ 2020-06-11 10:14 UTC (permalink / raw) To: dev; +Cc: qiming.yang, qi.z.zhang, xiaolong.ye From: Qi Zhang <qi.z.zhang@intel.com> Add support to allow the original VF actions in DCF. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Signed-off-by: Ting Xu <ting.xu@intel.com> --- v1->v2: correct commit log. --- drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index 20e8187d3..33327e905 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -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); -- 2.17.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ice: support original VF action for DCF 2020-06-11 10:14 ` [dpdk-dev] [PATCH v2] net/ice: support original " Ting Xu @ 2020-06-29 6:12 ` Yang, Qiming 2020-06-30 14:06 ` Zhang, Qi Z 0 siblings, 1 reply; 4+ messages in thread From: Yang, Qiming @ 2020-06-29 6:12 UTC (permalink / raw) To: Xu, Ting, dev; +Cc: Zhang, Qi Z, Ye, Xiaolong > -----Original Message----- > From: Xu, Ting <ting.xu@intel.com> > Sent: Thursday, June 11, 2020 18:15 > To: dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z > <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com> > Subject: [PATCH v2] net/ice: support original VF action for DCF > > From: Qi Zhang <qi.z.zhang@intel.com> > > Add support to allow the original VF actions in DCF. > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> > Signed-off-by: Ting Xu <ting.xu@intel.com> > > --- > v1->v2: correct commit log. > --- > drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > > diff --git a/drivers/net/ice/ice_switch_filter.c > b/drivers/net/ice/ice_switch_filter.c > index 20e8187d3..33327e905 100644 > --- a/drivers/net/ice/ice_switch_filter.c > +++ b/drivers/net/ice/ice_switch_filter.c > @@ -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); > > -- > 2.17.1 Acked-by: Qiming Yang <qiming.yang@intel.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/ice: support original VF action for DCF 2020-06-29 6:12 ` Yang, Qiming @ 2020-06-30 14:06 ` Zhang, Qi Z 0 siblings, 0 replies; 4+ messages in thread From: Zhang, Qi Z @ 2020-06-30 14:06 UTC (permalink / raw) To: Yang, Qiming, Xu, Ting, dev > -----Original Message----- > From: Yang, Qiming <qiming.yang@intel.com> > Sent: Monday, June 29, 2020 2:12 PM > To: Xu, Ting <ting.xu@intel.com>; dev@dpdk.org > Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com> > Subject: RE: [PATCH v2] net/ice: support original VF action for DCF > > > -----Original Message----- > > From: Xu, Ting <ting.xu@intel.com> > > Sent: Thursday, June 11, 2020 18:15 > > To: dev@dpdk.org > > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhang, Qi Z > > <qi.z.zhang@intel.com>; Ye, Xiaolong <xiaolong.ye@intel.com> > > Subject: [PATCH v2] net/ice: support original VF action for DCF > > > > From: Qi Zhang <qi.z.zhang@intel.com> > > > > Add support to allow the original VF actions in DCF. > > > > Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> > > Signed-off-by: Ting Xu <ting.xu@intel.com> > > > > --- > > v1->v2: correct commit log. > > --- > > drivers/net/ice/ice_switch_filter.c | 13 ++++++++++--- > > 1 file changed, 10 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/net/ice/ice_switch_filter.c > > b/drivers/net/ice/ice_switch_filter.c > > index 20e8187d3..33327e905 100644 > > --- a/drivers/net/ice/ice_switch_filter.c > > +++ b/drivers/net/ice/ice_switch_filter.c > > @@ -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); > > > > -- > > 2.17.1 > > Acked-by: Qiming Yang <qiming.yang@intel.com> Applied to dpdk-next-net-intel. Thanks Qi ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-06-30 14:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-06-06 13:23 [dpdk-dev] [PATCH v1] net/ice: support orignal VF action for DCF Ting Xu 2020-06-11 10:14 ` [dpdk-dev] [PATCH v2] net/ice: support original " Ting Xu 2020-06-29 6:12 ` Yang, Qiming 2020-06-30 14:06 ` 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).