Skip to content

Commit 4740238

Browse files
shayshyiSaeed Mahameed
authored andcommitted
devlink: Add new "io_eq_size" generic device param
Add new device generic parameter to determine the size of the I/O completion EQs. For example, to reduce I/O EQ size to 64, execute: $ devlink dev param set pci/0000:06:00.0 \ name io_eq_size value 64 cmode driverinit $ devlink dev reload pci/0000:06:00.0 Signed-off-by: Shay Drory <[email protected]> Reviewed-by: Moshe Shemesh <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent f4f2970 commit 4740238

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

Documentation/networking/devlink/devlink-params.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,3 +129,6 @@ own name.
129129
will NACK any attempt of other host to reset the device. This parameter
130130
is useful for setups where a device is shared by different hosts, such
131131
as multi-host setup.
132+
* - ``io_eq_size``
133+
- u32
134+
- Control the size of I/O completion EQs.

include/net/devlink.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ enum devlink_param_generic_id {
459459
DEVLINK_PARAM_GENERIC_ID_ENABLE_RDMA,
460460
DEVLINK_PARAM_GENERIC_ID_ENABLE_VNET,
461461
DEVLINK_PARAM_GENERIC_ID_ENABLE_IWARP,
462+
DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
462463

463464
/* add new param generic ids above here*/
464465
__DEVLINK_PARAM_GENERIC_ID_MAX,
@@ -511,6 +512,9 @@ enum devlink_param_generic_id {
511512
#define DEVLINK_PARAM_GENERIC_ENABLE_IWARP_NAME "enable_iwarp"
512513
#define DEVLINK_PARAM_GENERIC_ENABLE_IWARP_TYPE DEVLINK_PARAM_TYPE_BOOL
513514

515+
#define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME "io_eq_size"
516+
#define DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE DEVLINK_PARAM_TYPE_U32
517+
514518
#define DEVLINK_PARAM_GENERIC(_id, _cmodes, _get, _set, _validate) \
515519
{ \
516520
.id = DEVLINK_PARAM_GENERIC_ID_##_id, \

net/core/devlink.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4466,6 +4466,11 @@ static const struct devlink_param devlink_param_generic[] = {
44664466
.name = DEVLINK_PARAM_GENERIC_ENABLE_IWARP_NAME,
44674467
.type = DEVLINK_PARAM_GENERIC_ENABLE_IWARP_TYPE,
44684468
},
4469+
{
4470+
.id = DEVLINK_PARAM_GENERIC_ID_IO_EQ_SIZE,
4471+
.name = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_NAME,
4472+
.type = DEVLINK_PARAM_GENERIC_IO_EQ_SIZE_TYPE,
4473+
},
44694474
};
44704475

44714476
static int devlink_param_generic_verify(const struct devlink_param *param)

0 commit comments

Comments
 (0)