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

Daniel Zahka <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.netdev
Message-ID <[email protected]>

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?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.