On Mon, 26 Feb 2024 20:40:57 +0100
Maxime Coquelin <maxime.coque...@redhat.com> wrote:

> > +
> > +/* vhost_user_msg_handler() locks all qps based on a handler's 
> > lock_all_qps.
> > + * Later, a handler may need to ensure the vq has been locked (for example,
> > + * when calling lock annotated helpers).
> > + *
> > + * Note: unfortunately, static_assert() does not see an array content as a
> > + * constant expression. Because of this, we can't simply check for
> > + * vhost_user_msg_handler[].lock_all_qps.
> > + * Instead, define an enum for each handler.
> > + */
> > +#define VHOST_USER_ASSERT_LOCK(dev, vq, id) do { \
> > +   RTE_BUILD_BUG_ON(id ## _LOCK_ALL_QPS == false); \

Rather than the opaque output of RTE_BUILD_BUG_ON, please use
static_assert() directly.

Reply via email to