Thread (30 messages) 30 messages, 4 authors, 2026-08-11

Re: [PATCH net-next V2 08/13] net/mlx5e: psp: Handle HW-decapsulated RX PSP packets

flat view

From: Cosmin Ratiu <hidden>
Date: 2026-08-10 11:46:51
Also in: linux-kselftest, linux-rdma, lkml

On Tue, 2026-08-04 at 13:34 -0400, Daniel Zahka wrote:

On 8/4/26 4:35 AM, Tariq Toukan wrote:
quoted
  #define
MLX5E_ACCEL_FLOW_TAG_PROTO_MASK		GENMASK(23, 21)
@@ -25,6 +27,10 @@
  #define MLX5E_ACCEL_FLOW_TAG_PROTO_IPSEC	(1 << 21)
  #define MLX5E_ACCEL_FLOW_TAG_PROTO_MACSEC	(2 << 21)
  #define MLX5E_ACCEL_FLOW_TAG_PROTO_PSP		(3 << 21)
+#define MLX5E_ACCEL_FLOW_TAG_PROTO_PSP_DECAP	(4 << 21)
+
+#define MLX5E_ACCEL_FLOW_TAG_PSP_VER_SHIFT	17
+#define MLX5E_ACCEL_FLOW_TAG_PSP_VER_MASK	(0xF <<
MLX5E_ACCEL_FLOW_TAG_PSP_VER_SHIFT)
[...]
quoted
+static inline u8 mlx5e_psp_get_version(struct mlx5_cqe64 *cqe)
+{
+	return (mlx5e_accel_flow_tag(cqe) &
MLX5E_ACCEL_FLOW_TAG_PSP_VER_MASK) >>
+		MLX5E_ACCEL_FLOW_TAG_PSP_VER_SHIFT;
+}
maybe GENMASK()/FIELD_GET() would help deal with this bitfield?
Thanks, will do in the next version as these make the code much
cleaner. I also added FIELD_PREP in the mix.

Cosmin.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help