20/02/2024 18:20, Tyler Retzlaff:
> On Sun, Feb 18, 2024 at 01:39:52PM +0100, Thomas Monjalon wrote:
> > 15/02/2024 07:21, Tyler Retzlaff:
> > > Provide a macro that allows conditional expansion of RTE_MARKER fields
> > > to empty to allow rte_mbuf to be used with MSVC. It is proposed that
> > > we announce the fields to be __rte_deprecated (currently disabled).
> > > 
> > > Introduce C11 anonymous unions to permit aliasing of well-known
> > > offsets by name into the rte_mbuf structure by a *new* name and to
> > > provide padding for cache alignment.
[...]
> > >  struct rte_mbuf {
> > > - RTE_MARKER cacheline0;
> > > -
> > > - void *buf_addr;           /**< Virtual address of segment buffer. */
> > > + __rte_marker(RTE_MARKER, cacheline0);
> > > + union {
> > > +         char mbuf_cacheline0[RTE_CACHE_LINE_MIN_SIZE];
> > > +         __extension__
> > > +         struct {
> > > +                 void *buf_addr;           /**< Virtual address of 
> > > segment buffer. 
> > 
> > I think it is ugly.
> > 
> > Changing mbuf API is a serious issue.
> 
> agreed, do you have an alternate proposal to solve problem?

The best would be that MSVC supports a kind of struct marker.


Reply via email to