mbox series

[net-next,v2,0/2] Add sysfs attributes for MANA

Message ID 1713954774-29953-1-git-send-email-shradhagupta@linux.microsoft.com (mailing list archive)
Headers show
Series Add sysfs attributes for MANA | expand

Message

Shradha Gupta April 24, 2024, 10:32 a.m. UTC
These patches include adding sysfs attributes for improving
debuggability on MANA devices.

The first patch consists on max_mtu, min_mtu attributes that are
implemented generically for all devices

The second patch has mana specific attributes max_num_msix and num_ports

Shradha Gupta (2):
  net: Add sysfs atttributes for max_mtu min_mtu
  net: mana: Add new device attributes for mana

 Documentation/ABI/testing/sysfs-class-net     | 16 ++++++++++
 .../net/ethernet/microsoft/mana/gdma_main.c   | 32 +++++++++++++++++++
 net/core/net-sysfs.c                          |  4 +++
 3 files changed, 52 insertions(+)

Comments

Jiri Pirko April 24, 2024, 2:48 p.m. UTC | #1
Wed, Apr 24, 2024 at 12:32:54PM CEST, shradhagupta@linux.microsoft.com wrote:
>These patches include adding sysfs attributes for improving
>debuggability on MANA devices.
>
>The first patch consists on max_mtu, min_mtu attributes that are
>implemented generically for all devices
>
>The second patch has mana specific attributes max_num_msix and num_ports

1) you implement only max, min is never implemented, no point
introducing it.
2) having driver implement sysfs entry feels *very wrong*, don't do that
3) why DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX
   and DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN
   Are not what you want?

>
>Shradha Gupta (2):
>  net: Add sysfs atttributes for max_mtu min_mtu
>  net: mana: Add new device attributes for mana
>
> Documentation/ABI/testing/sysfs-class-net     | 16 ++++++++++
> .../net/ethernet/microsoft/mana/gdma_main.c   | 32 +++++++++++++++++++
> net/core/net-sysfs.c                          |  4 +++
> 3 files changed, 52 insertions(+)
>
>-- 
>2.34.1
>
>
Shradha Gupta April 30, 2024, 5:31 a.m. UTC | #2
On Wed, Apr 24, 2024 at 04:48:06PM +0200, Jiri Pirko wrote:
> Wed, Apr 24, 2024 at 12:32:54PM CEST, shradhagupta@linux.microsoft.com wrote:
> >These patches include adding sysfs attributes for improving
> >debuggability on MANA devices.
> >
> >The first patch consists on max_mtu, min_mtu attributes that are
> >implemented generically for all devices
> >
> >The second patch has mana specific attributes max_num_msix and num_ports
> 
> 1) you implement only max, min is never implemented, no point
> introducing it.
Sure. I had added it for the sake of completeness.
> 2) having driver implement sysfs entry feels *very wrong*, don't do that
> 3) why DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX
>    and DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN
>    Are not what you want?
Thanks for pointing this out. We are still evaluating if this devlink param
could be used for our usecase where we only need a read-only msix value for VF.
We keep the thread updated.
> 
> >
> >Shradha Gupta (2):
> >  net: Add sysfs atttributes for max_mtu min_mtu
> >  net: mana: Add new device attributes for mana
> >
> > Documentation/ABI/testing/sysfs-class-net     | 16 ++++++++++
> > .../net/ethernet/microsoft/mana/gdma_main.c   | 32 +++++++++++++++++++
> > net/core/net-sysfs.c                          |  4 +++
> > 3 files changed, 52 insertions(+)
> >
> >-- 
> >2.34.1
> >
> >
Shradha Gupta May 3, 2024, 8:48 a.m. UTC | #3
On Mon, Apr 29, 2024 at 10:31:38PM -0700, Shradha Gupta wrote:
> On Wed, Apr 24, 2024 at 04:48:06PM +0200, Jiri Pirko wrote:
> > Wed, Apr 24, 2024 at 12:32:54PM CEST, shradhagupta@linux.microsoft.com wrote:
> > >These patches include adding sysfs attributes for improving
> > >debuggability on MANA devices.
> > >
> > >The first patch consists on max_mtu, min_mtu attributes that are
> > >implemented generically for all devices
> > >
> > >The second patch has mana specific attributes max_num_msix and num_ports
> > 
> > 1) you implement only max, min is never implemented, no point
> > introducing it.
> Sure. I had added it for the sake of completeness.
> > 2) having driver implement sysfs entry feels *very wrong*, don't do that
> > 3) why DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MAX
> >    and DEVLINK_PARAM_GENERIC_ID_MSIX_VEC_PER_PF_MIN
> >    Are not what you want?
> Thanks for pointing this out. We are still evaluating if this devlink param
> could be used for our usecase where we only need a read-only msix value for VF.
> We keep the thread updated.
The attribute that we want is per VF msix max. This is per PF and would not be
the right one for our use case.
Do you have any other recommendations/suggestions around this?

Regards,
Shradha.
> > 
> > >
> > >Shradha Gupta (2):
> > >  net: Add sysfs atttributes for max_mtu min_mtu
> > >  net: mana: Add new device attributes for mana
> > >
> > > Documentation/ABI/testing/sysfs-class-net     | 16 ++++++++++
> > > .../net/ethernet/microsoft/mana/gdma_main.c   | 32 +++++++++++++++++++
> > > net/core/net-sysfs.c                          |  4 +++
> > > 3 files changed, 52 insertions(+)
> > >
> > >-- 
> > >2.34.1
> > >
> > >