On 26 Apr 2026, at 7:33, Eli Britstein wrote:

> On 15/04/2026 15:48, Eelco Chaudron wrote:

[...]

>>> +/* Structs. */
>>> +
>>> +#ifndef NETDEV_DPDK_TX_Q_TYPE
>>> +#error "NETDEV_DPDK_TX_Q_TYPE must be defined before"  \
>>> +       "including netdev-dpdk-private.h"
>>> +#endif
>>> +
>>> +#ifndef NETDEV_DPDK_SW_STATS_TYPE
>>> +#error "NETDEV_DPDK_SW_STATS_TYPE must be defined before" \
>>> +       "including netdev-dpdk-private.h"
>>> +#endif
>>> +
>>> +#ifndef NETDEV_DPDK_GLOBAL_MUTEX
>>> +#error "NETDEV_DPDK_GLOBAL_MUTEX must be defined before" \
>>> +       "including netdev-dpdk-private.h"
>>> +#endif
>> Should the names have some kind of suffix so we can easily see what they
>> are?  Something like:
>>
>>    #define NETDEV_DPDK_TX_QUEUE_STRUCT
>>    #define NETDEV_DPDK_SW_STATS_STRUCT
>>    #define NETDEV_DPDK_GLOBAL_MUTEX_NAME
>>
>> Open for any other suggestions.
>
> I don't mind about the naming, but taking into consideration the comment on 
> the next commit about getting rid of them:
>
> The mutex is there so we can still have "OVS_ACQ_AFTER" and "OVS_GUARDED_BY". 
> IMO we can drop them in favor of a comment. WDYT?
>
> The other ones can be void* but then require casting upon use.

You can keep the mutex one as it does not actually change the context of the 
structure, and I like having these checks.

Regarding using void *, I'd rather use specific types; see the comments on the 
other patch.

[...]

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to