[Cc: [email protected] (550 #5.1.0 Address rejected.)]

Am 09.08.24 um 07:18 schrieb Paul Menzel:
Dear Michal,


Thank you for your patch.

Am 09.08.24 um 07:13 schrieb Michal Swiatkowski:
On Thu, Aug 08, 2024 at 05:34:35PM +0200, Jiri Pirko wrote:
Thu, Aug 08, 2024 at 09:20:09AM CEST, [email protected] wrote:
Use generic devlink PF MSI-X parameter to allow user to change MSI-X
range.

Reviewed-by: Wojciech Drewek <[email protected]>
Signed-off-by: Michal Swiatkowski <[email protected]>
---
.../net/ethernet/intel/ice/devlink/devlink.c  | 56 ++++++++++++++++++-
drivers/net/ethernet/intel/ice/ice.h          |  8 +++
drivers/net/ethernet/intel/ice/ice_irq.c      | 14 ++++-
3 files changed, 76 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/devlink/devlink.c b/ drivers/net/ethernet/intel/ice/devlink/devlink.c
index 29a5f822cb8b..bdc22ea13e0f 100644
--- a/drivers/net/ethernet/intel/ice/devlink/devlink.c
+++ b/drivers/net/ethernet/intel/ice/devlink/devlink.c
@@ -1518,6 +1518,32 @@ static int ice_devlink_local_fwd_validate(struct devlink *devlink, u32 id,
    return 0;
}

+static int
+ice_devlink_msix_max_pf_validate(struct devlink *devlink, u32 id,
+                 union devlink_param_value val,
+                 struct netlink_ext_ack *extack)
+{
+    if (val.vu16 > ICE_MAX_MSIX) {
+        NL_SET_ERR_MSG_MOD(extack, "PF max MSI-X is too high");

No reason to have "PF" in the text. Also, no reason to have "max MSI-X".
That is the name of the param.

Ok, will change both, thanks.

Maybe also print both values in the error message?

+        return -EINVAL;
+    }
+
+    return 0;
+}

[…]


Kind regards,

Paul

Reply via email to