From: Jiri Pirko <jiri@resnulli.us>
To: Shay Drory <shayd@nvidia.com>, g@nanopsycho
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
jiri@nvidia.com, saeedm@nvidia.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [PATCH net-next v3 4/7] devlink: Add new "event_eq_size" generic device param
Date: Thu, 9 Dec 2021 10:22:04 +0100 [thread overview]
Message-ID: <YbHKvDY9qbo1rwgd@nanopsycho> (raw)
In-Reply-To: <20211208141722.13646-5-shayd@nvidia.com>
Wed, Dec 08, 2021 at 03:17:19PM CET, shayd@nvidia.com wrote:
>Add new device generic parameter to determine the size of the
>asynchronous control events EQ.
>
>For example, to reduce event EQ size to 64, execute:
>$ devlink dev param set pci/0000:06:00.0 \
> name event_eq_size value 64 cmode driverinit
>$ devlink dev reload pci/0000:06:00.0
>
>Signed-off-by: Shay Drory <shayd@nvidia.com>
>Reviewed-by: Moshe Shemesh <moshe@nvidia.com>
>---
> Documentation/networking/devlink/devlink-params.rst | 3 +++
> include/net/devlink.h | 4 ++++
> net/core/devlink.c | 5 +++++
> 3 files changed, 12 insertions(+)
>
>diff --git a/Documentation/networking/devlink/devlink-params.rst b/Documentation/networking/devlink/devlink-params.rst
>index cd9342305a13..0eddee6e66f3 100644
>--- a/Documentation/networking/devlink/devlink-params.rst
>+++ b/Documentation/networking/devlink/devlink-params.rst
>@@ -132,3 +132,6 @@ own name.
> * - ``io_eq_size``
> - u16
> - Control the size of I/O completion EQs.
>+ * - ``event_eq_size``
>+ - u16
And this.
>+ - Control the size of asynchronous control events EQ.
>diff --git a/include/net/devlink.h b/include/net/devlink.h
>index b5f4acd0e0cd..8d5349d2fb68 100644
>--- a/include/net/devlink.h
>+++ b/include/net/devlink.h
>@@ -460,6 +460,7 @@ enum devlink_param_generic_id {
> DEVLINK_PARAM_GENERIC_ID_ENABLE_VNET,
> DEVLINK_PARAM_GENERIC_ID_ENABLE_IWARP,
> DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
>+ DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE,
>
> /* add new param generic ids above here*/
> __DEVLINK_PARAM_GENERIC_ID_MAX,
>@@ -515,6 +516,9 @@ enum devlink_param_generic_id {
> #define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME "io_eq_size"
> #define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U32
>
>+#define DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_NAME "event_eq_size"
>+#define DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U32
>+
> #define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
> { \
> .id = DEVLINK_PARAM_GENERIC_ID_##_id, \
>diff --git a/net/core/devlink.c b/net/core/devlink.c
>index 0d4e63d11585..d9f3c994e704 100644
>--- a/net/core/devlink.c
>+++ b/net/core/devlink.c
>@@ -4471,6 +4471,11 @@ static const struct devlink_param devlink_param_generic[] = {
> .name = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME,
> .type = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE,
> },
>+ {
>+ .id = DEVLINK_PARAM_GENERIC_ID_EVENT_EQ_SIZE,
>+ .name = DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_NAME,
>+ .type = DEVLINK_PARAM_GENERIC_EVENT_EQ_SIZE_TYPE,
>+ },
> };
>
> static int devlink_param_generic_verify(const struct devlink_param *param)
>--
>2.21.3
>
next prev parent reply other threads:[~2021-12-09 9:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 14:17 [PATCH net-next v3 0/7] net/mlx5: Memory optimizations Shay Drory
2021-12-08 14:17 ` [PATCH net-next v3 1/7] net/mlx5: Introduce log_max_current_uc_list_wr_supported bit Shay Drory
2021-12-08 14:17 ` [PATCH net-next v3 2/7] devlink: Add new "io_eq_size" generic device param Shay Drory
2021-12-09 9:21 ` Jiri Pirko
2021-12-08 14:17 ` [PATCH net-next v3 3/7] net/mlx5: Let user configure io_eq_size param Shay Drory
2021-12-08 14:17 ` [PATCH net-next v3 4/7] devlink: Add new "event_eq_size" generic device param Shay Drory
2021-12-09 9:22 ` Jiri Pirko [this message]
2021-12-08 14:17 ` [PATCH net-next v3 5/7] net/mlx5: Let user configure event_eq_size param Shay Drory
2021-12-08 14:17 ` [PATCH net-next v3 6/7] devlink: Clarifies max_macs generic devlink param Shay Drory
2021-12-08 14:17 ` [PATCH net-next v3 7/7] net/mlx5: Let user configure max_macs generic param Shay Drory
2021-12-13 23:06 ` [PATCH net-next v3 0/7] net/mlx5: Memory optimizations Saeed Mahameed
2021-12-14 1:01 ` Jakub Kicinski
2021-12-15 18:26 ` Saeed Mahameed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YbHKvDY9qbo1rwgd@nanopsycho \
--to=jiri@resnulli.us \
--cc=davem@davemloft.net \
--cc=g@nanopsycho \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@nvidia.com \
--cc=shayd@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).