mbox series

[net-next,v3,0/7] net/mlx5: Memory optimizations

Message ID 20211208141722.13646-1-shayd@nvidia.com (mailing list archive)
Headers show
Series net/mlx5: Memory optimizations | expand

Message

Shay Drori Dec. 8, 2021, 2:17 p.m. UTC
This series provides knobs which will enable users to
minimize memory consumption of mlx5 Functions (PF/VF/SF).
mlx5 exposes two new generic devlink params for EQ size
configuration and uses devlink generic param max_macs.

Patches summary:
 - Patch-1 Introduce log_max_current_uc_list_wr_supported bit 
 - Patches-2-3 Provides I/O EQ size param which enables to save
   up to 128KB.
 - Patches-4-5 Provides event EQ size param which enables to save
   up to 512KB.
 - Patch-6 Clarify max_macs param.
 - Patch-7 Provides max_macs param which enables to save up to 70KB

In total, this series can save up to 700KB per Function.

---
changelog:
v2->v3:
- change type of EQ size param to u32 per Jiri suggestion.
- separate ifc changes to new patch
v1->v2:
- convert io_eq_size and event_eq_size from devlink_resources to
  generic devlink_params

Shay Drory (7):
  net/mlx5: Introduce log_max_current_uc_list_wr_supported bit
  devlink: Add new "io_eq_size" generic device param
  net/mlx5: Let user configure io_eq_size param
  devlink: Add new "event_eq_size" generic device param
  net/mlx5: Let user configure event_eq_size param
  devlink: Clarifies max_macs generic devlink param
  net/mlx5: Let user configure max_macs generic param

 .../networking/devlink/devlink-params.rst     | 12 ++-
 Documentation/networking/devlink/mlx5.rst     | 10 +++
 .../net/ethernet/mellanox/mlx5/core/devlink.c | 88 +++++++++++++++++++
 drivers/net/ethernet/mellanox/mlx5/core/eq.c  | 34 ++++++-
 .../net/ethernet/mellanox/mlx5/core/main.c    | 21 +++++
 include/linux/mlx5/mlx5_ifc.h                 |  2 +-
 include/net/devlink.h                         |  8 ++
 net/core/devlink.c                            | 10 +++
 8 files changed, 180 insertions(+), 5 deletions(-)

Comments

Saeed Mahameed Dec. 13, 2021, 11:06 p.m. UTC | #1
On Wed, 2021-12-08 at 16:17 +0200, Shay Drory wrote:
> This series provides knobs which will enable users to
> minimize memory consumption of mlx5 Functions (PF/VF/SF).
> mlx5 exposes two new generic devlink params for EQ size
> configuration and uses devlink generic param max_macs.
> 
> Patches summary:
>  - Patch-1 Introduce log_max_current_uc_list_wr_supported bit 
>  - Patches-2-3 Provides I/O EQ size param which enables to save
>    up to 128KB.
>  - Patches-4-5 Provides event EQ size param which enables to save
>    up to 512KB.
>  - Patch-6 Clarify max_macs param.
>  - Patch-7 Provides max_macs param which enables to save up to 70KB
> 
> In total, this series can save up to 700KB per Function.
> 
> ---
> changelog:
> v2->v3:
> - change type of EQ size param to u32 per Jiri suggestion.
> - separate ifc changes to new patch
> v1->v2:
> - convert io_eq_size and event_eq_size from devlink_resources to
>   generic devlink_params

Jakub are ok with this version ?
I would like to take it to my trees.
Jakub Kicinski Dec. 14, 2021, 1:01 a.m. UTC | #2
On Mon, 13 Dec 2021 23:06:26 +0000 Saeed Mahameed wrote:
> On Wed, 2021-12-08 at 16:17 +0200, Shay Drory wrote:
> > This series provides knobs which will enable users to
> > minimize memory consumption of mlx5 Functions (PF/VF/SF).
> > mlx5 exposes two new generic devlink params for EQ size
> > configuration and uses devlink generic param max_macs.
> > 
> > Patches summary:
> >  - Patch-1 Introduce log_max_current_uc_list_wr_supported bit 
> >  - Patches-2-3 Provides I/O EQ size param which enables to save
> >    up to 128KB.
> >  - Patches-4-5 Provides event EQ size param which enables to save
> >    up to 512KB.
> >  - Patch-6 Clarify max_macs param.
> >  - Patch-7 Provides max_macs param which enables to save up to 70KB
> > 
> > In total, this series can save up to 700KB per Function.
> 
> Jakub are ok with this version ?
> I would like to take it to my trees.

Yup, go for it. Sorry I didn't ack - I was going to apply it today but
Dave reminded me that you probably want to take it thru your tree.
Saeed Mahameed Dec. 15, 2021, 6:26 p.m. UTC | #3
On Mon, 2021-12-13 at 17:01 -0800, Jakub Kicinski wrote:
> On Mon, 13 Dec 2021 23:06:26 +0000 Saeed Mahameed wrote:
> > On Wed, 2021-12-08 at 16:17 +0200, Shay Drory wrote:
> > > This series provides knobs which will enable users to
> > > minimize memory consumption of mlx5 Functions (PF/VF/SF).
> > > mlx5 exposes two new generic devlink params for EQ size
> > > configuration and uses devlink generic param max_macs.
> > > 
> > > Patches summary:
> > >  - Patch-1 Introduce log_max_current_uc_list_wr_supported bit 
> > >  - Patches-2-3 Provides I/O EQ size param which enables to save
> > >    up to 128KB.
> > >  - Patches-4-5 Provides event EQ size param which enables to save
> > >    up to 512KB.
> > >  - Patch-6 Clarify max_macs param.
> > >  - Patch-7 Provides max_macs param which enables to save up to
> > > 70KB
> > > 
> > > In total, this series can save up to 700KB per Function.
> > 
> > Jakub are ok with this version ?
> > I would like to take it to my trees.
> 
> Yup, go for it. Sorry I didn't ack - I was going to apply it today
> but
> Dave reminded me that you probably want to take it thru your tree.

Thanks ! applied. Will be sent in future PRs.
First patch needs to go to mlx5-next shared branch with rdma.
So this will be sent in two separate PRs.