On 4/12/2023 5:26 PM, Ronak Doshi wrote: > This patch adds a new command to set ring buffer sizes. This is > required to pass the buffer size information to passthrough devices. > Also, ring sizes are round down to power of 2. > > Signed-off-by: Ronak Doshi <dos...@vmware.com> > Acked-by: Jochen Behrens <jbehr...@vmware.com> > --- > drivers/net/vmxnet3/base/vmxnet3_defs.h | 15 +++++++++++++++ > drivers/net/vmxnet3/vmxnet3_ethdev.c | 18 ++++++++++++++++++ > drivers/net/vmxnet3/vmxnet3_ethdev.h | 1 + > drivers/net/vmxnet3/vmxnet3_rxtx.c | 7 +++++++ > 4 files changed, 41 insertions(+) > > diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h > b/drivers/net/vmxnet3/base/vmxnet3_defs.h > index 27f35a0062..d8cc295b08 100644 > --- a/drivers/net/vmxnet3/base/vmxnet3_defs.h > +++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h > @@ -105,6 +105,9 @@ typedef enum { > VMXNET3_CMD_RESERVED4, > VMXNET3_CMD_REGISTER_MEMREGS, > VMXNET3_CMD_SET_RSS_FIELDS, > + VMXNET3_CMD_RESERVED9, > + VMXNET3_CMD_RESERVED10, > + VMXNET3_CMD_SET_RING_BUFFER_SIZE, > > VMXNET3_CMD_FIRST_GET = 0xF00D0000, > VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET, > @@ -822,6 +825,17 @@ typedef enum Vmxnet3_RSSField { > VMXNET3_RSS_FIELDS_ESPIP6 = 0x0020, > } Vmxnet3_RSSField; > > +typedef > +#include "vmware_pack_begin.h" > +struct Vmxnet3_RingBufferSize { > + __le16 ring1BufSizeType0; > + __le16 ring1BufSizeType1; > + __le16 ring2BufSizeType1; > + __le16 pad; > +} > +#include "vmware_pack_end.h" > +Vmxnet3_RingBufferSize; > +
As far as I can see these "vmware_pack_begin.h" & "vmware_pack_end.h" has only file license comment, and I can see this is used in a few other type declaration. What is the reasoning behind using these headers?