DPDK patches and discussions
 help / color / mirror / Atom feed
From: Anatoly Burakov <anatoly.burakov@intel.com>
To: dev@dpdk.org, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v1 07/12] net/ice/base: allow overriding recipe ID
Date: Tue,  2 Sep 2025 18:26:57 +0100	[thread overview]
Message-ID: <ac3baaf70490565b39dafd2aaf488e63df76174c.1756833701.git.anatoly.burakov@intel.com> (raw)
In-Reply-To: <cover.1756833701.git.anatoly.burakov@intel.com>

From: Pandi Kumar Maharajan <pandi.maharajan@intel.com>

With the addition of double VLAN mode on the device, the MAC VLAN filter
add rule was previously matching only the inner VLAN, rather than the
intended outer VLAN. This patch resolves the issue by introducing a new
software recipe ID as part of ice_fltr_info, allowing the base code to
send the newly created recipe ID. This ensures that the filter correctly
matches the outer VLAN when processing packets. Issue is observed in ESXi
environment but this patch introduces a generic solution for all
operating systems by adding a rid_override flag. If the base driver needs
to use a recipe ID different from the shared code default, it can set the
rid variable and enable the rid_override flag. This instructs the shared
code to use the specified rid instead of the default value.

Signed-off-by: Pandi Kumar Maharajan <pandi.maharajan@intel.com>
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 drivers/net/intel/ice/base/ice_switch.c | 6 +++++-
 drivers/net/intel/ice/base/ice_switch.h | 4 ++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/net/intel/ice/base/ice_switch.c b/drivers/net/intel/ice/base/ice_switch.c
index 628473f100..fff61b89d7 100644
--- a/drivers/net/intel/ice/base/ice_switch.c
+++ b/drivers/net/intel/ice/base/ice_switch.c
@@ -4113,7 +4113,11 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info,
 		CPU_TO_LE16(ICE_AQC_SW_RULES_T_LKUP_TX);
 
 	/* Recipe set depending on lookup type */
-	s_rule->recipe_id = CPU_TO_LE16(f_info->lkup_type);
+	if (f_info->rid_override) {
+		s_rule->recipe_id = CPU_TO_LE16(f_info->rid);
+	} else {
+		s_rule->recipe_id = CPU_TO_LE16(f_info->lkup_type);
+	}
 	s_rule->src = CPU_TO_LE16(f_info->src);
 	s_rule->act = CPU_TO_LE32(act);
 
diff --git a/drivers/net/intel/ice/base/ice_switch.h b/drivers/net/intel/ice/base/ice_switch.h
index 8eac7739fb..73452cc4c7 100644
--- a/drivers/net/intel/ice/base/ice_switch.h
+++ b/drivers/net/intel/ice/base/ice_switch.h
@@ -195,6 +195,10 @@ struct ice_fltr_info {
 	u8 lb_en;	/* Indicate if packet can be looped back */
 	u8 lan_en;	/* Indicate if packet can be forwarded to the uplink */
 	u8 fltVeb_en;   /* Indicate if VSI is connected to floating VEB */
+
+	/* Override default Recipe ID */
+	u16 rid;
+	bool rid_override;
 };
 
 struct ice_update_recipe_lkup_idx_params {
-- 
2.47.3


  parent reply	other threads:[~2025-09-02 17:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 17:26 [PATCH v1 00/12] net/ice: update to latest version Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 01/12] net/ice/base: add direction metadata Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 02/12] net/ice/base: fix adding special words Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 03/12] net/ice/base: fix memory leak in HW profile handling Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 04/12] net/ice/base: fix memory leak in recipe handling Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 05/12] net/ice/base: clean up RSS LUT selection Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 06/12] net/ice/base: add 40G speed Anatoly Burakov
2025-09-02 17:26 ` Anatoly Burakov [this message]
2025-09-02 17:26 ` [PATCH v1 08/12] net/ice/base: add missing health status defines Anatoly Burakov
2025-09-02 17:26 ` [PATCH v1 09/12] net/ice/base: improve global config lock behavior Anatoly Burakov
2025-09-02 17:27 ` [PATCH v1 10/12] net/ice: count drop-all filter stats in Rx stats Anatoly Burakov
2025-09-02 17:27 ` [PATCH v1 11/12] net/ice/base: add E835 device ID's Anatoly Burakov
2025-09-02 17:27 ` [PATCH v1 12/12] net/ice: update README Anatoly Burakov

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=ac3baaf70490565b39dafd2aaf488e63df76174c.1756833701.git.anatoly.burakov@intel.com \
    --to=anatoly.burakov@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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).