lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbHKvDY9qbo1rwgd@nanopsycho>
Date:   Thu, 9 Dec 2021 10:22:04 +0100
From:   Jiri Pirko <jiri@...nulli.us>
To:     Shay Drory <shayd@...dia.com>, g@...opsycho
Cc:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, jiri@...dia.com,
        saeedm@...dia.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Moshe Shemesh <moshe@...dia.com>
Subject: Re: [PATCH net-next v3 4/7] devlink: Add new "event_eq_size" generic
 device param

Wed, Dec 08, 2021 at 03:17:19PM CET, shayd@...dia.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@...dia.com>
>Reviewed-by: Moshe Shemesh <moshe@...dia.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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ