> -----Original Message-----
> From: ALOK TIWARI <[email protected]>
> Sent: Friday, May 16, 2025 4:57 PM
> To: Haiyang Zhang <[email protected]>; [email protected];
> [email protected]
> Cc: Dexuan Cui <[email protected]>; [email protected]; KY
> Srinivasan <[email protected]>; Paul Rosswurm <[email protected]>;
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Long Li <[email protected]>;
> [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; Konstantin
> Taranov <[email protected]>; [email protected]; linux-
> [email protected]
> Subject: [EXTERNAL] Re: [PATCH net-next] net: mana: Add support for Multi
> Vports on Bare metal
> 
> 
> 
> On 17-05-2025 01:21, Haiyang Zhang wrote:
> > To support Multi Vports on Bare metal, increase the device config
> response
> > version. And, skip the register HW vport, and register filter steps,
> when
> > the Bare metal hostmode is set.
> >
> > Signed-off-by: Haiyang Zhang <[email protected]>
> > ---
> >   drivers/net/ethernet/microsoft/mana/mana_en.c | 22 +++++++++++++------
> >   include/net/mana/mana.h                       |  4 +++-
> >   2 files changed, 18 insertions(+), 8 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c
> b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > index 2bac6be8f6a0..0273696d254b 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> > +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > @@ -921,7 +921,7 @@ static void mana_pf_deregister_filter(struct
> mana_port_context *apc)
> >
> [snip]
> > +   u8 bm_hostmode = 0;
> >     u16 num_ports = 0;
> >     int err;
> >     int i;
> > @@ -3026,10 +3032,12 @@ int mana_probe(struct gdma_dev *gd, bool
> resuming)
> >     }
> >
> >     err = mana_query_device_cfg(ac, MANA_MAJOR_VERSION,
> MANA_MINOR_VERSION,
> > -                               MANA_MICRO_VERSION, &num_ports);
> > +                               MANA_MICRO_VERSION, &num_ports, 
> > &bm_hostmode);
> >     if (err)
> >             goto out;
> >
> > +   ac->bm_hostmode = bm_hostmode;
> > +
> >     if (!resuming) {
> >             ac->num_ports = num_ports;
> >     } else {
> > diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
> > index 0f78065de8fe..b352d2a7118e 100644
> > --- a/include/net/mana/mana.h
> > +++ b/include/net/mana/mana.h
> > @@ -408,6 +408,7 @@ struct mana_context {
> >     struct gdma_dev *gdma_dev;
> >
> >     u16 num_ports;
> > +   u8 bm_hostmode; /* Bare Metal Host Mode Enabled */
> 
> what about maintaining natural alignment, +u8 reserved0 ?

This is not structure going across the "wire". Compiler will
add holes when necessary. So we don't normally add "reserved"
for alignment in these structs, right?

> /* +response v3: Bare Metal Host Mode Enabled */ for consistency.
> Even though this comment is optional here.

I will just remove this optional comment.

Thanks,
- Haiyang


Reply via email to