On Tue, 2026-08-04 at 13:34 -0400, Daniel Zahka wrote:
>
>
> On 8/4/26 4:35 AM, Tariq Toukan wrote:
> > #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)
>
> [...]
>
> > +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.