DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/ice: support original represented_port action
@ 2022-08-26  7:25 zhichaox.zeng
  2022-08-31  5:42 ` [PATCH v2] " Zhichao Zeng
  0 siblings, 1 reply; 6+ messages in thread
From: zhichaox.zeng @ 2022-08-26  7:25 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, yidingx.zhou, Zhichao Zeng, Qi Zhang

From: Zhichao Zeng <zhichaox.zeng@intel.com>

Add support to send matching traffic to the original DCF port
with represented_port action by using DCF port id as ethdev_port_id.

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
---
 drivers/net/ice/ice_switch_filter.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index da81e49bfa..dbcb8bdfdc 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1623,6 +1623,7 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad,
 	const struct rte_eth_dev *repr_dev;
 	enum rte_flow_action_type action_type;
 	uint16_t rule_port_id, backer_port_id;
+	const char *pf_dev_name;
 
 	for (action = actions; action->type !=
 				RTE_FLOW_ACTION_TYPE_END; action++) {
@@ -1638,8 +1639,11 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad,
 
 			rule_port_id = ad->parent.pf.dev_data->port_id;
 			backer_port_id = repr_dev->data->backer_port_id;
+			pf_dev_name = ad->parent.pf.dev_data->name;
 
-			if (backer_port_id != rule_port_id)
+			if (backer_port_id != rule_port_id &&
+					strncmp(pf_dev_name, repr_dev->data->name,
+							strlen(pf_dev_name)))
 				goto invalid;
 
 			rule_info->sw_act.vsi_handle = repr_dev->data->representor_id;
-- 
2.25.1


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

* [PATCH v2] net/ice: support original represented_port action
  2022-08-26  7:25 [PATCH] net/ice: support original represented_port action zhichaox.zeng
@ 2022-08-31  5:42 ` Zhichao Zeng
  2022-09-01  1:12   ` Zhang, Qi Z
  2022-09-01  5:36   ` Xu, Ke1
  0 siblings, 2 replies; 6+ messages in thread
From: Zhichao Zeng @ 2022-08-31  5:42 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, yidingx.zhou, Zhichao Zeng, Qi Zhang

Add support to send matching traffic to the original DCF port
with represented_port action by using DCF port id as ethdev_port_id.

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

---
v2: use id instead of name to represent port for comparing
---
 drivers/net/ice/ice_switch_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index da81e49bfa..240fa10750 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1639,7 +1639,8 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad,
 			rule_port_id = ad->parent.pf.dev_data->port_id;
 			backer_port_id = repr_dev->data->backer_port_id;
 
-			if (backer_port_id != rule_port_id)
+			if (backer_port_id != rule_port_id &&
+					act_ethdev->port_id != rule_port_id)
 				goto invalid;
 
 			rule_info->sw_act.vsi_handle = repr_dev->data->representor_id;
-- 
2.25.1


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

* RE: [PATCH v2] net/ice: support original represented_port action
  2022-08-31  5:42 ` [PATCH v2] " Zhichao Zeng
@ 2022-09-01  1:12   ` Zhang, Qi Z
  2022-09-06  2:40     ` Zhang, Qi Z
  2022-09-01  5:36   ` Xu, Ke1
  1 sibling, 1 reply; 6+ messages in thread
From: Zhang, Qi Z @ 2022-09-01  1:12 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev; +Cc: Yang, Qiming, Zhou, YidingX



> -----Original Message-----
> From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> Sent: Wednesday, August 31, 2022 1:42 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH v2] net/ice: support original represented_port action
> 
> Add support to send matching traffic to the original DCF port with
> represented_port action by using DCF port id as ethdev_port_id.
> 
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

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

Applied to dpdk-next-net-intel.

Thanks
Qi


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

* RE: [PATCH v2] net/ice: support original represented_port action
  2022-08-31  5:42 ` [PATCH v2] " Zhichao Zeng
  2022-09-01  1:12   ` Zhang, Qi Z
@ 2022-09-01  5:36   ` Xu, Ke1
  1 sibling, 0 replies; 6+ messages in thread
From: Xu, Ke1 @ 2022-09-01  5:36 UTC (permalink / raw)
  To: Zeng, ZhichaoX, dev
  Cc: Yang, Qiming, Zhou, YidingX, Zeng, ZhichaoX, Zhang,  Qi Z


> -----Original Message-----
> From: Zhichao Zeng <zhichaox.zeng@intel.com>
> Sent: Wednesday, August 31, 2022 1:42 PM
> To: dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>;
> Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH v2] net/ice: support original represented_port action
> 
> Add support to send matching traffic to the original DCF port with
> represented_port action by using DCF port id as ethdev_port_id.
> 
> Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

V2 patch for original action tested and passed.

Regards,
Tested-by: Ke Xu <ke1.xu@intel.com>


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

* RE: [PATCH v2] net/ice: support original represented_port action
  2022-09-01  1:12   ` Zhang, Qi Z
@ 2022-09-06  2:40     ` Zhang, Qi Z
  0 siblings, 0 replies; 6+ messages in thread
From: Zhang, Qi Z @ 2022-09-06  2:40 UTC (permalink / raw)
  To: Zhang, Qi Z, Zeng, ZhichaoX, dev; +Cc: Yang, Qiming, Zhou, YidingX



> -----Original Message-----
> From: Zhang, Qi Z <qi.z.zhang@intel.com>
> Sent: Thursday, September 1, 2022 9:12 AM
> To: Zeng, ZhichaoX <zhichaox.zeng@intel.com>; dev@dpdk.org
> Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> <yidingx.zhou@intel.com>
> Subject: RE: [PATCH v2] net/ice: support original represented_port action
> 
> 
> 
> > -----Original Message-----
> > From: Zeng, ZhichaoX <zhichaox.zeng@intel.com>
> > Sent: Wednesday, August 31, 2022 1:42 PM
> > To: dev@dpdk.org
> > Cc: Yang, Qiming <qiming.yang@intel.com>; Zhou, YidingX
> > <yidingx.zhou@intel.com>; Zeng, ZhichaoX <zhichaox.zeng@intel.com>;
> > Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH v2] net/ice: support original represented_port action
> >
> > Add support to send matching traffic to the original DCF port with
> > represented_port action by using DCF port id as ethdev_port_id.
> >
> > Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>
> 
> Acked-by: Qi Zhang <qi.z.zhang@intel.com>
> 
> Applied to dpdk-next-net-intel.

For traffic to original DCF port , it should use RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR but not RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT
The patch has been dropped in dpdk-next-net-net.
A new version is expected.


> 
> Thanks
> Qi


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

* [PATCH v2] net/ice: support original represented_port action
@ 2022-08-31  5:37 Zhichao Zeng
  0 siblings, 0 replies; 6+ messages in thread
From: Zhichao Zeng @ 2022-08-31  5:37 UTC (permalink / raw)
  To: dev; +Cc: qiming.yang, yidingx.zhou, Zhichao Zeng, Qi Zhang

Add support to send matching traffic to the original DCF port
with represented_port action by using DCF port id as ethdev_port_id.

Signed-off-by: Zhichao Zeng <zhichaox.zeng@intel.com>

---
v2: use id instead of name to represent port for comparing
---
 drivers/net/ice/ice_switch_filter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index da81e49bfa..240fa10750 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -1639,7 +1639,8 @@ ice_switch_parse_dcf_action(struct ice_dcf_adapter *ad,
 			rule_port_id = ad->parent.pf.dev_data->port_id;
 			backer_port_id = repr_dev->data->backer_port_id;
 
-			if (backer_port_id != rule_port_id)
+			if (backer_port_id != rule_port_id &&
+					act_ethdev->port_id != rule_port_id)
 				goto invalid;
 
 			rule_info->sw_act.vsi_handle = repr_dev->data->representor_id;
-- 
2.25.1


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

end of thread, other threads:[~2022-09-06  2:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-26  7:25 [PATCH] net/ice: support original represented_port action zhichaox.zeng
2022-08-31  5:42 ` [PATCH v2] " Zhichao Zeng
2022-09-01  1:12   ` Zhang, Qi Z
2022-09-06  2:40     ` Zhang, Qi Z
2022-09-01  5:36   ` Xu, Ke1
2022-08-31  5:37 Zhichao Zeng

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