[dpdk-dev] [PATCH 2/2] net/mlx5: enforce Tx num of segments limitation
Nélio Laranjeiro
nelio.laranjeiro at 6wind.com
Thu Aug 24 15:28:57 CEST 2017
On Wed, Aug 23, 2017 at 10:33:58AM +0300, Shahaf Shuler wrote:
> Mellanox NICs has a limitation on the number of mbuf segments a multi
> segment mbuf can have. The max number depends on the Tx offloads requested.
>
> The current code not enforce such limitation, which might cause
> malformed WQEs to be written to the device.
Avoid acronyms in the commit message (at least on first occurrence), not all
people knows what a WQE is and getting such information is not easy.
> This commit adds verification for the number of mbuf segments posted
> to the device. In case of overflow the packet will not be sent.
> Debug prints were added to help application identify the cause for such
> case.
>
> Cc: stable at dpdk.org
>
> Signed-off-by: Shahaf Shuler <shahafs at mellanox.com>
> ---
>
> This patch should be applied only after the series:
> http://dpdk.org/dev/patchwork/patch/27367/
>
> ---
> drivers/net/mlx5/mlx5_defs.h | 3 ++-
> drivers/net/mlx5/mlx5_prm.h | 3 +++
> drivers/net/mlx5/mlx5_rxtx.c | 30 +++++++++++++++++++++++++++---
> drivers/net/mlx5/mlx5_rxtx_vec_sse.c | 8 ++++++++
> drivers/net/mlx5/mlx5_txq.c | 27 +++++++++++++++++++++++++++
> 5 files changed, 67 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/mlx5/mlx5_prm.h b/drivers/net/mlx5/mlx5_prm.h
> index 608072f7e..87244e7db 100644
> --- a/drivers/net/mlx5/mlx5_prm.h
> +++ b/drivers/net/mlx5/mlx5_prm.h
> @@ -154,6 +154,9 @@
> /* Default mark value used when none is provided. */
> #define MLX5_FLOW_MARK_DEFAULT 0xffffff
>
> +/* Maximum number of DS in WQE. */
> +#define MLX5_MAX_DS (63)
> +
Why the parenthesis?
Thanks,
--
Nélio Laranjeiro
6WIND
More information about the dev
mailing list