All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Malov <ivan.malov@oktetlabs.ru>
To: dev@dpdk.org
Cc: Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: [dpdk-dev] [PATCH v4 07/10] net/sfc: override match fields in tunnel offload jump rules
Date: Wed, 13 Oct 2021 16:15:10 +0300	[thread overview]
Message-ID: <20211013131514.20376-8-ivan.malov@oktetlabs.ru> (raw)
In-Reply-To: <20211013131514.20376-1-ivan.malov@oktetlabs.ru>

The current HW/FW doesn't allow to match on MAC addresses in outer rules.
One day this will change for sure, but right now a workaround is needed.

Match on VLAN presence in outer rules is also unsupported. Ignore it.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 drivers/net/sfc/sfc_mae.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index 2515b9a80a..c972c2e3f2 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -1525,6 +1525,7 @@ sfc_mae_rule_parse_item_eth(const struct rte_flow_item *item,
 			    struct rte_flow_error *error)
 {
 	struct sfc_mae_parse_ctx *ctx_mae = ctx->mae;
+	struct rte_flow_item_eth override_mask;
 	struct rte_flow_item_eth supp_mask;
 	const uint8_t *spec = NULL;
 	const uint8_t *mask = NULL;
@@ -1542,6 +1543,22 @@ sfc_mae_rule_parse_item_eth(const struct rte_flow_item *item,
 	if (rc != 0)
 		return rc;
 
+	if (ctx_mae->ft_rule_type == SFC_FT_RULE_JUMP && mask != NULL) {
+		/*
+		 * The HW/FW hasn't got support for match on MAC addresses in
+		 * outer rules yet (this will change). Match on VLAN presence
+		 * isn't supported either. Ignore these match criteria.
+		 */
+		memcpy(&override_mask, mask, sizeof(override_mask));
+		memset(&override_mask.hdr.dst_addr, 0,
+		       sizeof(override_mask.hdr.dst_addr));
+		memset(&override_mask.hdr.src_addr, 0,
+		       sizeof(override_mask.hdr.src_addr));
+		override_mask.has_vlan = 0;
+
+		mask = (const uint8_t *)&override_mask;
+	}
+
 	if (spec != NULL) {
 		struct sfc_mae_pattern_data *pdata = &ctx_mae->pattern_data;
 		struct sfc_mae_ethertype *ethertypes = pdata->ethertypes;
-- 
2.20.1


  parent reply	other threads:[~2021-10-13 13:16 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 20:57 [dpdk-dev] [PATCH 00/10] net/sfc: add support for tunnel offload Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 01/10] net/sfc: fence off 8 bits in Rx mark " Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 02/10] common/sfc_efx/base: add API to set RECIRC ID in outer rules Ivan Malov
2021-09-30  9:53   ` Kinsella, Ray
2021-09-29 20:57 ` [dpdk-dev] [PATCH 03/10] net/sfc: support JUMP flows in tunnel offload Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 04/10] common/sfc_efx/base: add RECIRC ID match in action rules API Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 05/10] net/sfc: support GROUP flows in tunnel offload Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 06/10] net/sfc: implement control path operations " Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 07/10] net/sfc: override match on ETH in tunnel offload JUMP rules Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 08/10] net/sfc: use action rules " Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 09/10] net/sfc: support counters " Ivan Malov
2021-09-29 20:57 ` [dpdk-dev] [PATCH 10/10] net/sfc: refine pattern of GROUP flows in tunnel offload Ivan Malov
2021-10-04 23:55 ` [dpdk-dev] [PATCH v2 00/10] net/sfc: add support for " Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 01/10] net/sfc: fence off 8 bits in Rx mark " Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 02/10] common/sfc_efx/base: add API to set RECIRC ID in outer rules Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 03/10] net/sfc: support JUMP flows in tunnel offload Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 04/10] common/sfc_efx/base: add RECIRC ID match in action rules API Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 05/10] net/sfc: support GROUP flows in tunnel offload Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 06/10] net/sfc: implement control path operations " Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 07/10] net/sfc: override match on ETH in tunnel offload JUMP rules Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 08/10] net/sfc: use action rules " Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 09/10] net/sfc: support counters " Ivan Malov
2021-10-04 23:55   ` [dpdk-dev] [PATCH v2 10/10] net/sfc: refine pattern of GROUP flows in tunnel offload Ivan Malov
2021-10-12 23:46   ` [dpdk-dev] [PATCH v2 00/10] net/sfc: add support for " Ferruh Yigit
2021-10-13  0:28     ` Ivan Malov
2021-10-13  0:24 ` [dpdk-dev] [PATCH v3 " Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 01/10] net/sfc: fence off 8 bits in Rx mark " Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 02/10] common/sfc_efx/base: add API to set RECIRC ID in outer rules Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 03/10] net/sfc: support JUMP flows in tunnel offload Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 04/10] common/sfc_efx/base: add RECIRC ID match in action rules API Ivan Malov
2021-10-13  8:41     ` Kinsella, Ray
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 05/10] net/sfc: support GROUP flows in tunnel offload Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 06/10] net/sfc: implement control path operations " Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 07/10] net/sfc: override match on ETH in tunnel offload JUMP rules Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 08/10] net/sfc: use action rules " Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 09/10] net/sfc: support counters " Ivan Malov
2021-10-13  0:24   ` [dpdk-dev] [PATCH v3 10/10] net/sfc: refine pattern of GROUP flows in tunnel offload Ivan Malov
2021-10-13 10:42   ` [dpdk-dev] [PATCH v3 00/10] net/sfc: add support for " Ferruh Yigit
2021-10-13 10:45   ` Ferruh Yigit
2021-10-13 10:55     ` Thomas Monjalon
2021-10-13 13:15 ` [dpdk-dev] [PATCH v4 " Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 01/10] net/sfc: fence off 8 bits in Rx mark " Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 02/10] common/sfc_efx/base: support recirculation ID in outer rules Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 03/10] net/sfc: support jump flows in tunnel offload Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 04/10] common/sfc_efx/base: match on recirc. ID in action rules Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 05/10] net/sfc: support group flows in tunnel offload Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 06/10] net/sfc: implement control path operations " Ivan Malov
2021-10-13 13:15   ` Ivan Malov [this message]
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 08/10] net/sfc: use action rules in tunnel offload jump rules Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 09/10] net/sfc: support counters " Ivan Malov
2021-10-13 13:15   ` [dpdk-dev] [PATCH v4 10/10] net/sfc: refine pattern of group flows in tunnel offload Ivan Malov
2021-10-13 14:40   ` [dpdk-dev] [PATCH v4 00/10] net/sfc: add support for " Ferruh Yigit

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=20211013131514.20376-8-ivan.malov@oktetlabs.ru \
    --to=ivan.malov@oktetlabs.ru \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.