diff mbox series

[net] devlink: Fix setting max_io_eqs as the sole attribute

Message ID 20240606043808.1330909-1-parav@nvidia.com (mailing list archive)
State Accepted
Commit c6c39f3c6da4bf093aad6d0eb1c5b07a7aa2dab7
Delegated to: Stephen Hemminger
Headers show
Series [net] devlink: Fix setting max_io_eqs as the sole attribute | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/apply fail Patch does not apply to net-0

Commit Message

Parav Pandit June 6, 2024, 4:38 a.m. UTC
dl_opts_put() function missed to consider IO eqs option flag.
Due to this, when max_io_eqs setting is applied only when it
is combined with other attributes such as roce/hw_addr.
When max_io_eqs is the only attribute set, it missed to
apply the attribute.

Fix it by adding the missing flag.

Fixes: e8add23c59b7 ("devlink: Support setting max_io_eqs")
Signed-off-by: Parav Pandit <parav@nvidia.com>
---
 devlink/devlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Parav Pandit June 6, 2024, 4:40 a.m. UTC | #1
> From: Parav Pandit <parav@nvidia.com>
> Sent: Thursday, June 6, 2024 10:08 AM
> To: netdev@vger.kernel.org; dsahern@kernel.org;
> stephen@networkplumber.org
> Cc: Jiri Pirko <jiri@nvidia.com>; Shay Drori <shayd@nvidia.com>; Parav
> Pandit <parav@nvidia.com>
> Subject: [PATCH net] devlink: Fix setting max_io_eqs as the sole attribute
>
I missed to include iproute2 in the subject prefix. :(
Will avoid this mistake next time.
 
> dl_opts_put() function missed to consider IO eqs option flag.
> Due to this, when max_io_eqs setting is applied only when it is combined
> with other attributes such as roce/hw_addr.
> When max_io_eqs is the only attribute set, it missed to apply the attribute.
> 
> Fix it by adding the missing flag.
> 
> Fixes: e8add23c59b7 ("devlink: Support setting max_io_eqs")
> Signed-off-by: Parav Pandit <parav@nvidia.com>
> ---
>  devlink/devlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/devlink/devlink.c b/devlink/devlink.c index 03d27202..3ab5a85d
> 100644
> --- a/devlink/devlink.c
> +++ b/devlink/devlink.c
> @@ -2637,7 +2637,7 @@ static void dl_opts_put(struct nlmsghdr *nlh,
> struct dl *dl)
>  		mnl_attr_put_u64(nlh,
> DEVLINK_ATTR_TRAP_POLICER_BURST,
>  				 opts->trap_policer_burst);
>  	if (opts->present & (DL_OPT_PORT_FUNCTION_HW_ADDR |
> DL_OPT_PORT_FUNCTION_STATE |
> -			     DL_OPT_PORT_FN_CAPS))
> +			     DL_OPT_PORT_FN_CAPS |
> DL_OPT_PORT_FN_MAX_IO_EQS))
>  		dl_function_attr_put(nlh, opts);
>  	if (opts->present & DL_OPT_PORT_FLAVOUR)
>  		mnl_attr_put_u16(nlh, DEVLINK_ATTR_PORT_FLAVOUR,
> opts->port_flavour);
> --
> 2.26.2
patchwork-bot+netdevbpf@kernel.org June 11, 2024, 3:10 p.m. UTC | #2
Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger <stephen@networkplumber.org>:

On Thu, 6 Jun 2024 07:38:08 +0300 you wrote:
> dl_opts_put() function missed to consider IO eqs option flag.
> Due to this, when max_io_eqs setting is applied only when it
> is combined with other attributes such as roce/hw_addr.
> When max_io_eqs is the only attribute set, it missed to
> apply the attribute.
> 
> Fix it by adding the missing flag.
> 
> [...]

Here is the summary with links:
  - [net] devlink: Fix setting max_io_eqs as the sole attribute
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=c6c39f3c6da4

You are awesome, thank you!
diff mbox series

Patch

diff --git a/devlink/devlink.c b/devlink/devlink.c
index 03d27202..3ab5a85d 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -2637,7 +2637,7 @@  static void dl_opts_put(struct nlmsghdr *nlh, struct dl *dl)
 		mnl_attr_put_u64(nlh, DEVLINK_ATTR_TRAP_POLICER_BURST,
 				 opts->trap_policer_burst);
 	if (opts->present & (DL_OPT_PORT_FUNCTION_HW_ADDR | DL_OPT_PORT_FUNCTION_STATE |
-			     DL_OPT_PORT_FN_CAPS))
+			     DL_OPT_PORT_FN_CAPS | DL_OPT_PORT_FN_MAX_IO_EQS))
 		dl_function_attr_put(nlh, opts);
 	if (opts->present & DL_OPT_PORT_FLAVOUR)
 		mnl_attr_put_u16(nlh, DEVLINK_ATTR_PORT_FLAVOUR, opts->port_flavour);