]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
devlink: Fix setting max_io_eqs as the sole attribute
authorParav Pandit <parav@nvidia.com>
Thu, 6 Jun 2024 04:38:08 +0000 (07:38 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 11 Jun 2024 15:05:24 +0000 (08:05 -0700)
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>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
devlink/devlink.c

index 4929ab08ac40d72497c147fcd950e1974dca7412..57bcc9658bdb0f32f8b9dcdc2877234a9466c6fc 100644 (file)
@@ -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);