ice: Add driver specific prefix to LAG defines

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>
This commit is contained in:
Dave Ertman 2025-06-16 13:03:18 +02:00 committed by Tony Nguyen
parent 5b35b83d0d
commit a66b3b537d

View File

@ -10,12 +10,14 @@
#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;