On Sun, 9 Feb 2025 14:08:51 +0200
Gregory Etelson <getel...@nvidia.com> wrote:

> -     MLX5_ASSERT(nb_segs <= qp->priv->max_segs_num);
> +     if (nb_segs > qp->priv->max_segs_num) {
> +             DRV_LOG(WARNING, "Segment count exceeds limit. "
> +                             "Current segments: %d, Maximum allowed: %d. "
> +                             "To resolve, either increase the segment size "
> +                             "or set a higher value for the devargs 
> max_segs_num parameter.",
> +                     nb_segs, qp->priv->max_segs_num);
> +             RTE_VERIFY(nb_segs <= qp->priv->max_segs_num);
> +             return 0;
> +     }

Way to verbose.
RTE_VERIFY never returns since it calls rte_panic().

Would it be better to just use RTE_VERIFY()?
Maybe MLX5 should have MLX5_ASSERT() and MLX5_VERIFY() macro.

Je n’ai fait celle-ci plus longue que parce que je n’ai pas eu le loisir de la 
faire plus courte.
I have made this longer than usual because I have not had time to make it 
shorter.

Reply via email to