net/ice: support original represented_port action
PATCH 1/1 net/ice: support original represented_port action
From: Zhichao Zeng <[email protected]>
Add support to send matching traffic to the original DCF port with represented_port action by using DCF port id as ethdev_port_id.
--- drivers/net/ice/ice_switch_filter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/net/ice/ice_switch_filter.c +5 -1
@@ -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;
Signature · 1 line
2.25.1
PATCH v2 1/1 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.
---
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(-)
drivers/net/ice/ice_switch_filter.c +2 -1
@@ -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;
Signature · 1 line
2.25.1
Quoted 11 lines
-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Wednesday, August 31, 2022 1:42 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: support originalrepresented_portaction
Quoted 4 lines
Add support to send matching traffic to the original DCF port with
represented_portaction by using DCF port id asethdev_port_id.Signed-off-by Zhichao Zeng <[email protected]>
Applied to dpdk-next-net-intel.
Thanks
Qi
Quoted 21 lines
-----Original Message-----
From: Zhang, Qi Z <[email protected]>
Sent: Thursday, September 1, 2022 9:12 AM
To: Zeng, ZhichaoX <[email protected]>; [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>
Subject: RE: [PATCH v2] net/ice: support originalrepresented_portactionQuoted 9 lines
-----Original Message-----
From: Zeng, ZhichaoX <[email protected]>
Sent: Wednesday, August 31, 2022 1:42 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: support originalrepresented_portaction
Quoted 8 lines
Quoted 4 lines
Add support to send matching traffic to the original DCF port with
represented_portaction by using DCF port id asethdev_port_id.Signed-off-by Zhichao Zeng <[email protected]>Acked-by Qi Zhang <[email protected]>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.
Quoted 3 lines
Thanks
Qi
Quoted 10 lines
-----Original Message-----
From: Zhichao Zeng <[email protected]>
Sent: Wednesday, August 31, 2022 1:42 PM
To: [email protected]
Cc: Yang, Qiming <[email protected]>; Zhou, YidingX <[email protected]>; Zeng, ZhichaoX <[email protected]>; Zhang, Qi Z <[email protected]>
Subject: [PATCH v2] net/ice: support originalrepresented_portaction
Quoted 4 lines
Add support to send matching traffic to the original DCF port with
represented_portaction by using DCF port id asethdev_port_id.Signed-off-by Zhichao Zeng <[email protected]>
V2 patch for original action tested and passed.
Regards,