[PATCH] bus/vmbus: remove unnecessary packed attribute

Stephen Hemminger stephen at networkplumber.org
Wed Oct 30 16:05:22 CET 2024


On Wed, 30 Oct 2024 10:26:38 +0100
David Marchand <david.marchand at redhat.com> wrote:

> On Tue, Oct 22, 2024 at 4:37 AM Stephen Hemminger
> <stephen at networkplumber.org> wrote:
> >
> > The VMBus ring structure was marked packed which will cause
> > warnings if the no-address-of-packed is enabled. The structure
> > is all 32 bit values and the packed attribute has no impact
> > on the code layout; remove it.
> >
> > Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>  
> 
> - Why only clean this structure in this header?
> I see many others which could get cleaned wrt __rte_packed.

Not sure, think these headers got inherited from the FreeBSD driver,
and the FreeBSD driver got these from Windows. And Windows code
always uses packed.

> 
> (There are some unused structs too and it would be better not to keep
> unused code around).

Yes, cleanup would be good.

> 
> - On a separate note, I wonder why the vmbus headers are exported as
> public headers.
> All those seem to be for use only in drivers, for resources attached
> on such a bus.
> Would an application benefit from talking directly to the hyperv?

Probably no need to export, Long can look into it.


More information about the dev mailing list