Re: [PATCH V4 for-next 10/10] IB/mlx5: Add RSS QP support

Sagi Grimberg
2016-05-29T13:16:37Z

> +/* RX Hash function flags */
> +enum mlx5_rx_hash_function_flags {
> + MLX5_RX_HASH_FUNC_TOEPLITZ = 1 << 0,
> +};
> +
> +/*
> + * RX Hash flags, these flags allows to set which incoming packet's field should
> + * participates in RX Hash. Each flag represent certain packet's field,
> + * when the flag is set the field that is represented by the flag will
> + * participate in RX Hash calculation.
> + * Note: *IPV4 and *IPV6 flags can't be enabled together on the same QP
> + * and *TCP and *UDP flags can't be enabled together on the same QP.
> +*/
> +enum mlx5_rx_hash_fields {
> + MLX5_RX_HASH_SRC_IPV4 = 1 << 0,
> + MLX5_RX_HASH_DST_IPV4 = 1 << 1,
> + MLX5_RX_HASH_SRC_IPV6 = 1 << 2,
> + MLX5_RX_HASH_DST_IPV6 = 1 << 3,
> + MLX5_RX_HASH_SRC_PORT_TCP = 1 << 4,
> + MLX5_RX_HASH_DST_PORT_TCP = 1 << 5,
> + MLX5_RX_HASH_SRC_PORT_UDP = 1 << 6,
> + MLX5_RX_HASH_DST_PORT_UDP = 1 << 7
> +};

I never really understood why these should be driver specific but I
know it was decided so...

Reviewed-by: Sagi Grimberg <sagi-NQWnxTmZq1alnMjI0IkVqw@public.gmane.org>