All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] common/sfc_efx/base: fix recirculation ID set in outer rules
@ 2022-02-17 22:25 Ivan Malov
  2022-02-17 22:25 ` [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields Ivan Malov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Ivan Malov @ 2022-02-17 22:25 UTC (permalink / raw)
  To: dev; +Cc: stable, Andy Moreton, Andrew Rybchenko, Ray Kinsella

Recirculation ID field of MAE outer rule insert MCDI is
part of the lookup control structure and it has non-zero
bit offset relative to the byte offset of the structure.

Fixes: 5cf153e79c6c ("common/sfc_efx/base: support recirculation ID in outer rules")
Cc: stable@dpdk.org

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andy Moreton <amoreton@xilinx.com>
---
 drivers/common/sfc_efx/base/efx_mae.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 7b24e3fee4..7d48b5787e 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -2242,7 +2242,8 @@ efx_mae_outer_rule_insert(
 	memcpy(payload + offset, spec->emms_mask_value_pairs.outer,
 	    MAE_ENC_FIELD_PAIRS_LEN);
 
-	MCDI_IN_SET_BYTE(req, MAE_OUTER_RULE_INSERT_IN_RECIRC_ID,
+	MCDI_IN_SET_DWORD_FIELD(req, MAE_OUTER_RULE_INSERT_IN_LOOKUP_CONTROL,
+	    MAE_OUTER_RULE_INSERT_IN_RECIRC_ID,
 	    spec->emms_outer_rule_recirc_id);
 
 	efx_mcdi_execute(enp, &req);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields
  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
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Ivan Malov @ 2022-02-17 22:25 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko, Andy Moreton

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] net/sfc: fix flow tunnel support detection
  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 ` [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields Ivan Malov
@ 2022-02-17 22:25 ` Ivan Malov
  2022-02-18 15:23 ` [PATCH 1/3] common/sfc_efx/base: fix recirculation ID set in outer rules Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Ivan Malov @ 2022-02-17 22:25 UTC (permalink / raw)
  To: dev; +Cc: stable, Andrew Rybchenko, Andy Moreton, Viacheslav Galaktionov

The condition for that must use the new MAE admin status.

Fixes: 2f577f0ea1a3 ("net/sfc: allow ports without MAE privilege")
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/net/sfc/sfc_flow_tunnel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/sfc_flow_tunnel.c b/drivers/net/sfc/sfc_flow_tunnel.c
index 463b01c596..e9eca90012 100644
--- a/drivers/net/sfc/sfc_flow_tunnel.c
+++ b/drivers/net/sfc/sfc_flow_tunnel.c
@@ -21,7 +21,7 @@ sfc_flow_tunnel_is_supported(struct sfc_adapter *sa)
 	SFC_ASSERT(sfc_adapter_is_locked(sa));
 
 	return ((sa->priv.dp_rx->features & SFC_DP_RX_FEAT_FLOW_MARK) != 0 &&
-		sa->mae.status == SFC_MAE_STATUS_SUPPORTED);
+		sa->mae.status == SFC_MAE_STATUS_ADMIN);
 }
 
 bool
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/3] common/sfc_efx/base: fix recirculation ID set in outer rules
  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 ` [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields Ivan Malov
  2022-02-17 22:25 ` [PATCH 3/3] net/sfc: fix flow tunnel support detection Ivan Malov
@ 2022-02-18 15:23 ` Ferruh Yigit
  2 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2022-02-18 15:23 UTC (permalink / raw)
  To: Ivan Malov, dev; +Cc: stable, Andy Moreton, Andrew Rybchenko, Ray Kinsella

On 2/17/2022 10:25 PM, Ivan Malov wrote:
> Recirculation ID field of MAE outer rule insert MCDI is
> part of the lookup control structure and it has non-zero
> bit offset relative to the byte offset of the structure.
> 
> Fixes: 5cf153e79c6c ("common/sfc_efx/base: support recirculation ID in outer rules")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
> Reviewed-by: Andy Moreton <amoreton@xilinx.com>

Series applied to dpdk-next-net/main, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-18 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/3] common/sfc_efx/base: add missing handler for 1-byte fields Ivan Malov
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

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.