DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhichao Zeng <zhichaox.zeng@intel.com>
To: dev@dpdk.org
Cc: qiming.yang@intel.com, yidingx.zhou@intel.com,
	Zhichao Zeng <zhichaox.zeng@intel.com>,
	Qi Zhang <qi.z.zhang@intel.com>
Subject: [PATCH v2] net/ice: support original represented_port action
Date: Wed, 31 Aug 2022 13:42:26 +0800	[thread overview]
Message-ID: <20220831054226.279211-1-zhichaox.zeng@intel.com> (raw)
In-Reply-To: <20220826072545.18127-1-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>

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


  reply	other threads:[~2022-08-31  5:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-26  7:25 [PATCH] " zhichaox.zeng
2022-08-31  5:42 ` Zhichao Zeng [this message]
2022-09-01  1:12   ` [PATCH v2] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220831054226.279211-1-zhichaox.zeng@intel.com \
    --to=zhichaox.zeng@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=yidingx.zhou@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).