From: Ivan Malov <ivan.malov@oktetlabs.ru>
To: dev@dpdk.org
Cc: stable@dpdk.org, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
Andy Moreton <amoreton@xilinx.com>
Subject: [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields
Date: Fri, 18 Feb 2022 01:25:08 +0300 [thread overview]
Message-ID: <20220217222509.667611-2-ivan.malov@oktetlabs.ru> (raw)
In-Reply-To: <20220217222509.667611-1-ivan.malov@oktetlabs.ru>
One may set RECIRC_ID in a MAE action rule specification.
This field is not a network one, and its handling goes
to the code snippet which does not recognise field
sizes other than 4 bytes. Add the missing handler.
Fixes: 3a73dcfdb255 ("common/sfc_efx/base: match on recirc ID in action rules")
Cc: stable@dpdk.org
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
drivers/common/sfc_efx/base/efx_mae.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 7d48b5787e..31f51b5548 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -1027,6 +1027,10 @@ efx_mae_match_spec_field_set(
memcpy(mvp + descp->emmd_value_offset,
&dword, sizeof (dword));
break;
+ case 1:
+ memcpy(mvp + descp->emmd_value_offset,
+ value, 1);
+ break;
default:
EFSYS_ASSERT(B_FALSE);
}
@@ -1039,6 +1043,10 @@ efx_mae_match_spec_field_set(
memcpy(mvp + descp->emmd_mask_offset,
&dword, sizeof (dword));
break;
+ case 1:
+ memcpy(mvp + descp->emmd_mask_offset,
+ mask, 1);
+ break;
default:
EFSYS_ASSERT(B_FALSE);
}
--
2.30.2
next prev parent reply other threads:[~2022-02-17 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-17 22:25 [PATCH 1/3] common/sfc_efx/base: fix recirculation ID set in outer rules Ivan Malov
2022-02-17 22:25 ` Ivan Malov [this message]
2022-02-17 22:25 ` [PATCH 3/3] net/sfc: fix flow tunnel support detection Ivan Malov
2022-02-18 15:23 ` [PATCH 1/3] common/sfc_efx/base: fix recirculation ID set in outer rules 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=20220217222509.667611-2-ivan.malov@oktetlabs.ru \
--to=ivan.malov@oktetlabs.ru \
--cc=amoreton@xilinx.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=dev@dpdk.org \
--cc=stable@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).