DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhirun Yan <zhirun.yan@intel.com>
To: dev@dpdk.org, qi.z.zhang@intel.com, qiming.yang@intel.com
Cc: xiao.w.wang@intel.com, Zhirun Yan <zhirun.yan@intel.com>
Subject: [PATCH v1 2/3] net/ice: fix outer src mac as FDIR input field
Date: Wed, 22 Jun 2022 11:00:31 +0800	[thread overview]
Message-ID: <20220622030032.474770-3-zhirun.yan@intel.com> (raw)
In-Reply-To: <20220622030032.474770-1-zhirun.yan@intel.com>

Add src mac in input set map. If not add this, the src mac can not
be parsed and this field will be ignored.
Add outer mac as extracted key input to avoid rule conflict for VXLAN
rule when outer src mac change only.

Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
---
 drivers/net/ice/ice_ethdev.h      | 3 +++
 drivers/net/ice/ice_fdir_filter.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index ec23dae665..791e8566ea 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -366,6 +366,9 @@ struct ice_fdir_fltr_pattern {
 	struct ice_fdir_extra ext_data;
 	struct ice_fdir_extra ext_mask;
 
+	struct ice_fdir_extra ext_data_outer;
+	struct ice_fdir_extra ext_mask_outer;
+
 	enum ice_fdir_tunnel_type tunnel_type;
 };
 
diff --git a/drivers/net/ice/ice_fdir_filter.c b/drivers/net/ice/ice_fdir_filter.c
index 7914ba9407..4b0b6b5b23 100644
--- a/drivers/net/ice/ice_fdir_filter.c
+++ b/drivers/net/ice/ice_fdir_filter.c
@@ -919,6 +919,7 @@ ice_fdir_input_set_parse(uint64_t inset, enum ice_flow_field *field)
 		enum ice_flow_field fld;
 	};
 	static const struct ice_inset_map ice_inset_map[] = {
+		{ICE_INSET_SMAC, ICE_FLOW_FIELD_IDX_ETH_SA},
 		{ICE_INSET_DMAC, ICE_FLOW_FIELD_IDX_ETH_DA},
 		{ICE_INSET_ETHERTYPE, ICE_FLOW_FIELD_IDX_ETH_TYPE},
 		{ICE_INSET_IPV4_SRC, ICE_FLOW_FIELD_IDX_IPV4_SA},
@@ -1247,6 +1248,8 @@ ice_fdir_extract_fltr_key(struct ice_fdir_fltr_pattern *key,
 	rte_memcpy(&key->ext_data, &input->ext_data, sizeof(key->ext_data));
 	rte_memcpy(&key->ext_mask, &input->ext_mask, sizeof(key->ext_mask));
 
+	rte_memcpy(&key->ext_data_outer, &input->ext_data_outer, sizeof(key->ext_data_outer));
+	rte_memcpy(&key->ext_mask_outer, &input->ext_mask_outer, sizeof(key->ext_mask_outer));
 	rte_memcpy(&key->gtpu_data, &input->gtpu_data, sizeof(key->gtpu_data));
 	rte_memcpy(&key->gtpu_mask, &input->gtpu_mask, sizeof(key->gtpu_mask));
 
-- 
2.25.1


  parent reply	other threads:[~2022-06-22  3:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  3:00 [PATCH v1 0/3] fix tunnel support for VXLAN in FDIR Zhirun Yan
2022-06-22  3:00 ` [PATCH v1 1/3] net/ice/base: extend VXLAN type with inner pattern for FDIR Zhirun Yan
2023-04-26  8:17   ` Zhang, Qi Z
2022-06-22  3:00 ` Zhirun Yan [this message]
2023-04-26  8:15   ` [PATCH v1 2/3] net/ice: fix outer src mac as FDIR input field Zhang, Qi Z
2022-06-22  3:00 ` [PATCH v1 3/3] net/ice: fix flow management in FDIR Zhirun Yan
2023-04-26  8:13   ` Zhang, Qi Z

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=20220622030032.474770-3-zhirun.yan@intel.com \
    --to=zhirun.yan@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=xiao.w.wang@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).