]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ice: Add driver specific prefix to LAG defines
authorDave Ertman <david.m.ertman@intel.com>
Mon, 16 Jun 2025 11:03:18 +0000 (13:03 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 14 Aug 2025 15:57:28 +0000 (08:57 -0700)
A define in the LAG code is missing a driver specific prefix.
Add a prefix to the define.

Also shorten a defines name and move to a more logical place.

Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Tested-by: Sujai Buvaneswaran <sujai.buvaneswaran@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_lag.c

index 96b11d8f1422318cb67914b74474807bbaaa3228..48efd8d27296b43f7dcaeb0207d3b2d1253e3710 100644 (file)
 #define ICE_LAG_RES_SHARED     BIT(14)
 #define ICE_LAG_RES_VALID      BIT(15)
 
-#define LACP_TRAIN_PKT_LEN             16
-static const u8 lacp_train_pkt[LACP_TRAIN_PKT_LEN] = { 0, 0, 0, 0, 0, 0,
-                                                      0, 0, 0, 0, 0, 0,
-                                                      0x88, 0x09, 0, 0 };
+#define ICE_TRAIN_PKT_LEN              16
+static const u8 lacp_train_pkt[ICE_TRAIN_PKT_LEN] = { 0, 0, 0, 0, 0, 0,
+                                                     0, 0, 0, 0, 0, 0,
+                                                     0x88, 0x09, 0, 0 };
 
 #define ICE_RECIPE_LEN                 64
+#define ICE_LAG_SRIOV_CP_RECIPE                10
+
 static const u8 ice_dflt_vsi_rcp[ICE_RECIPE_LEN] = {
        0x05, 0, 0, 0, 0x20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
        0x85, 0, 0x01, 0, 0, 0, 0xff, 0xff, 0x08, 0, 0, 0, 0, 0, 0, 0,
@@ -766,9 +768,6 @@ void ice_lag_move_vf_nodes_cfg(struct ice_lag *lag, u8 src_prt, u8 dst_prt)
        ice_lag_destroy_netdev_list(lag, &ndlist);
 }
 
-#define ICE_LAG_SRIOV_CP_RECIPE                10
-#define ICE_LAG_SRIOV_TRAIN_PKT_LEN    16
-
 /**
  * ice_lag_cfg_cp_fltr - configure filter for control packets
  * @lag: local interface's lag struct
@@ -783,8 +782,7 @@ ice_lag_cfg_cp_fltr(struct ice_lag *lag, bool add)
 
        vsi = lag->pf->vsi[0];
 
-       buf_len = ICE_SW_RULE_RX_TX_HDR_SIZE(s_rule,
-                                            ICE_LAG_SRIOV_TRAIN_PKT_LEN);
+       buf_len = ICE_SW_RULE_RX_TX_HDR_SIZE(s_rule, ICE_TRAIN_PKT_LEN);
        s_rule = kzalloc(buf_len, GFP_KERNEL);
        if (!s_rule) {
                netdev_warn(lag->netdev, "-ENOMEM error configuring CP filter\n");
@@ -799,8 +797,8 @@ ice_lag_cfg_cp_fltr(struct ice_lag *lag, bool add)
                                          ICE_SINGLE_ACT_LAN_ENABLE |
                                          ICE_SINGLE_ACT_VALID_BIT |
                                          FIELD_PREP(ICE_SINGLE_ACT_VSI_ID_M, vsi->vsi_num));
-               s_rule->hdr_len = cpu_to_le16(ICE_LAG_SRIOV_TRAIN_PKT_LEN);
-               memcpy(s_rule->hdr_data, lacp_train_pkt, LACP_TRAIN_PKT_LEN);
+               s_rule->hdr_len = cpu_to_le16(ICE_TRAIN_PKT_LEN);
+               memcpy(s_rule->hdr_data, lacp_train_pkt, ICE_TRAIN_PKT_LEN);
                opc = ice_aqc_opc_add_sw_rules;
        } else {
                opc = ice_aqc_opc_remove_sw_rules;