diff options
| author | Anirudh Venkataramanan <anirudh.venkataramanan@intel.com> | 2019-02-19 18:04:13 -0500 |
|---|---|---|
| committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-04-18 11:38:47 -0400 |
| commit | f9867df6d96593fe678a138230379cda78403429 (patch) | |
| tree | c1c6136d1d91b0bcdded6e4fc63804986d51b776 | |
| parent | 94c4441b5a80f38d203432a4389d2dd349403ae5 (diff) | |
ice: Fix incorrect use of abbreviations
Capitalize abbreviations and spell out some that aren't obvious.
Reviewed-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice.h | 10 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 20 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_common.c | 94 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_controlq.c | 10 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_ethtool.c | 20 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | 12 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_lib.c | 24 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_main.c | 74 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_nvm.c | 6 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_sched.c | 104 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_switch.c | 108 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_switch.h | 10 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_txrx.c | 12 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_type.h | 22 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 54 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | 8 |
16 files changed, 294 insertions, 294 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice.h b/drivers/net/ethernet/intel/ice/ice.h index f685235afb62..c04debc1a0ea 100644 --- a/drivers/net/ethernet/intel/ice/ice.h +++ b/drivers/net/ethernet/intel/ice/ice.h | |||
| @@ -151,7 +151,7 @@ struct ice_tc_info { | |||
| 151 | 151 | ||
| 152 | struct ice_tc_cfg { | 152 | struct ice_tc_cfg { |
| 153 | u8 numtc; /* Total number of enabled TCs */ | 153 | u8 numtc; /* Total number of enabled TCs */ |
| 154 | u8 ena_tc; /* TX map */ | 154 | u8 ena_tc; /* Tx map */ |
| 155 | struct ice_tc_info tc_info[ICE_MAX_TRAFFIC_CLASS]; | 155 | struct ice_tc_info tc_info[ICE_MAX_TRAFFIC_CLASS]; |
| 156 | }; | 156 | }; |
| 157 | 157 | ||
| @@ -360,8 +360,8 @@ struct ice_pf { | |||
| 360 | u32 hw_oicr_idx; /* Other interrupt cause vector HW index */ | 360 | u32 hw_oicr_idx; /* Other interrupt cause vector HW index */ |
| 361 | u32 num_avail_hw_msix; /* remaining HW MSIX vectors left unclaimed */ | 361 | u32 num_avail_hw_msix; /* remaining HW MSIX vectors left unclaimed */ |
| 362 | u32 num_lan_msix; /* Total MSIX vectors for base driver */ | 362 | u32 num_lan_msix; /* Total MSIX vectors for base driver */ |
| 363 | u16 num_lan_tx; /* num lan Tx queues setup */ | 363 | u16 num_lan_tx; /* num LAN Tx queues setup */ |
| 364 | u16 num_lan_rx; /* num lan Rx queues setup */ | 364 | u16 num_lan_rx; /* num LAN Rx queues setup */ |
| 365 | u16 q_left_tx; /* remaining num Tx queues left unclaimed */ | 365 | u16 q_left_tx; /* remaining num Tx queues left unclaimed */ |
| 366 | u16 q_left_rx; /* remaining num Rx queues left unclaimed */ | 366 | u16 q_left_rx; /* remaining num Rx queues left unclaimed */ |
| 367 | u16 next_vsi; /* Next free slot in pf->vsi[] - 0-based! */ | 367 | u16 next_vsi; /* Next free slot in pf->vsi[] - 0-based! */ |
| @@ -387,8 +387,8 @@ struct ice_netdev_priv { | |||
| 387 | 387 | ||
| 388 | /** | 388 | /** |
| 389 | * ice_irq_dynamic_ena - Enable default interrupt generation settings | 389 | * ice_irq_dynamic_ena - Enable default interrupt generation settings |
| 390 | * @hw: pointer to hw struct | 390 | * @hw: pointer to HW struct |
| 391 | * @vsi: pointer to vsi struct, can be NULL | 391 | * @vsi: pointer to VSI struct, can be NULL |
| 392 | * @q_vector: pointer to q_vector, can be NULL | 392 | * @q_vector: pointer to q_vector, can be NULL |
| 393 | */ | 393 | */ |
| 394 | static inline void | 394 | static inline void |
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h index 8ff438968199..757848f85072 100644 --- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | |||
| @@ -62,7 +62,7 @@ struct ice_aqc_req_res { | |||
| 62 | #define ICE_AQ_RES_NVM_WRITE_DFLT_TIMEOUT_MS 180000 | 62 | #define ICE_AQ_RES_NVM_WRITE_DFLT_TIMEOUT_MS 180000 |
| 63 | #define ICE_AQ_RES_CHNG_LOCK_DFLT_TIMEOUT_MS 1000 | 63 | #define ICE_AQ_RES_CHNG_LOCK_DFLT_TIMEOUT_MS 1000 |
| 64 | #define ICE_AQ_RES_GLBL_LOCK_DFLT_TIMEOUT_MS 3000 | 64 | #define ICE_AQ_RES_GLBL_LOCK_DFLT_TIMEOUT_MS 3000 |
| 65 | /* For SDP: pin id of the SDP */ | 65 | /* For SDP: pin ID of the SDP */ |
| 66 | __le32 res_number; | 66 | __le32 res_number; |
| 67 | /* Status is only used for ICE_AQC_RES_ID_GLBL_LOCK */ | 67 | /* Status is only used for ICE_AQC_RES_ID_GLBL_LOCK */ |
| 68 | __le16 status; | 68 | __le16 status; |
| @@ -1024,7 +1024,7 @@ struct ice_aqc_get_link_status_data { | |||
| 1024 | u8 ext_info; | 1024 | u8 ext_info; |
| 1025 | #define ICE_AQ_LINK_PHY_TEMP_ALARM BIT(0) | 1025 | #define ICE_AQ_LINK_PHY_TEMP_ALARM BIT(0) |
| 1026 | #define ICE_AQ_LINK_EXCESSIVE_ERRORS BIT(1) /* Excessive Link Errors */ | 1026 | #define ICE_AQ_LINK_EXCESSIVE_ERRORS BIT(1) /* Excessive Link Errors */ |
| 1027 | /* Port TX Suspended */ | 1027 | /* Port Tx Suspended */ |
| 1028 | #define ICE_AQ_LINK_TX_S 2 | 1028 | #define ICE_AQ_LINK_TX_S 2 |
| 1029 | #define ICE_AQ_LINK_TX_M (0x03 << ICE_AQ_LINK_TX_S) | 1029 | #define ICE_AQ_LINK_TX_M (0x03 << ICE_AQ_LINK_TX_S) |
| 1030 | #define ICE_AQ_LINK_TX_ACTIVE 0 | 1030 | #define ICE_AQ_LINK_TX_ACTIVE 0 |
| @@ -1120,9 +1120,9 @@ struct ice_aqc_nvm { | |||
| 1120 | }; | 1120 | }; |
| 1121 | 1121 | ||
| 1122 | /** | 1122 | /** |
| 1123 | * Send to PF command (indirect 0x0801) id is only used by PF | 1123 | * Send to PF command (indirect 0x0801) ID is only used by PF |
| 1124 | * | 1124 | * |
| 1125 | * Send to VF command (indirect 0x0802) id is only used by PF | 1125 | * Send to VF command (indirect 0x0802) ID is only used by PF |
| 1126 | * | 1126 | * |
| 1127 | */ | 1127 | */ |
| 1128 | struct ice_aqc_pf_vf_msg { | 1128 | struct ice_aqc_pf_vf_msg { |
| @@ -1186,7 +1186,7 @@ struct ice_aqc_get_set_rss_lut { | |||
| 1186 | __le32 addr_low; | 1186 | __le32 addr_low; |
| 1187 | }; | 1187 | }; |
| 1188 | 1188 | ||
| 1189 | /* Add TX LAN Queues (indirect 0x0C30) */ | 1189 | /* Add Tx LAN Queues (indirect 0x0C30) */ |
| 1190 | struct ice_aqc_add_txqs { | 1190 | struct ice_aqc_add_txqs { |
| 1191 | u8 num_qgrps; | 1191 | u8 num_qgrps; |
| 1192 | u8 reserved[3]; | 1192 | u8 reserved[3]; |
| @@ -1195,7 +1195,7 @@ struct ice_aqc_add_txqs { | |||
| 1195 | __le32 addr_low; | 1195 | __le32 addr_low; |
| 1196 | }; | 1196 | }; |
| 1197 | 1197 | ||
| 1198 | /* This is the descriptor of each queue entry for the Add TX LAN Queues | 1198 | /* This is the descriptor of each queue entry for the Add Tx LAN Queues |
| 1199 | * command (0x0C30). Only used within struct ice_aqc_add_tx_qgrp. | 1199 | * command (0x0C30). Only used within struct ice_aqc_add_tx_qgrp. |
| 1200 | */ | 1200 | */ |
| 1201 | struct ice_aqc_add_txqs_perq { | 1201 | struct ice_aqc_add_txqs_perq { |
| @@ -1207,7 +1207,7 @@ struct ice_aqc_add_txqs_perq { | |||
| 1207 | struct ice_aqc_txsched_elem info; | 1207 | struct ice_aqc_txsched_elem info; |
| 1208 | }; | 1208 | }; |
| 1209 | 1209 | ||
| 1210 | /* The format of the command buffer for Add TX LAN Queues (0x0C30) | 1210 | /* The format of the command buffer for Add Tx LAN Queues (0x0C30) |
| 1211 | * is an array of the following structs. Please note that the length of | 1211 | * is an array of the following structs. Please note that the length of |
| 1212 | * each struct ice_aqc_add_tx_qgrp is variable due | 1212 | * each struct ice_aqc_add_tx_qgrp is variable due |
| 1213 | * to the variable number of queues in each group! | 1213 | * to the variable number of queues in each group! |
| @@ -1219,7 +1219,7 @@ struct ice_aqc_add_tx_qgrp { | |||
| 1219 | struct ice_aqc_add_txqs_perq txqs[1]; | 1219 | struct ice_aqc_add_txqs_perq txqs[1]; |
| 1220 | }; | 1220 | }; |
| 1221 | 1221 | ||
| 1222 | /* Disable TX LAN Queues (indirect 0x0C31) */ | 1222 | /* Disable Tx LAN Queues (indirect 0x0C31) */ |
| 1223 | struct ice_aqc_dis_txqs { | 1223 | struct ice_aqc_dis_txqs { |
| 1224 | u8 cmd_type; | 1224 | u8 cmd_type; |
| 1225 | #define ICE_AQC_Q_DIS_CMD_S 0 | 1225 | #define ICE_AQC_Q_DIS_CMD_S 0 |
| @@ -1241,7 +1241,7 @@ struct ice_aqc_dis_txqs { | |||
| 1241 | __le32 addr_low; | 1241 | __le32 addr_low; |
| 1242 | }; | 1242 | }; |
| 1243 | 1243 | ||
| 1244 | /* The buffer for Disable TX LAN Queues (indirect 0x0C31) | 1244 | /* The buffer for Disable Tx LAN Queues (indirect 0x0C31) |
| 1245 | * contains the following structures, arrayed one after the | 1245 | * contains the following structures, arrayed one after the |
| 1246 | * other. | 1246 | * other. |
| 1247 | * Note: Since the q_id is 16 bits wide, if the | 1247 | * Note: Since the q_id is 16 bits wide, if the |
| @@ -1498,7 +1498,7 @@ enum ice_adminq_opc { | |||
| 1498 | ice_aqc_opc_get_rss_key = 0x0B04, | 1498 | ice_aqc_opc_get_rss_key = 0x0B04, |
| 1499 | ice_aqc_opc_get_rss_lut = 0x0B05, | 1499 | ice_aqc_opc_get_rss_lut = 0x0B05, |
| 1500 | 1500 | ||
| 1501 | /* TX queue handling commands/events */ | 1501 | /* Tx queue handling commands/events */ |
| 1502 | ice_aqc_opc_add_txqs = 0x0C30, | 1502 | ice_aqc_opc_add_txqs = 0x0C30, |
| 1503 | ice_aqc_opc_dis_txqs = 0x0C31, | 1503 | ice_aqc_opc_dis_txqs = 0x0C31, |
| 1504 | 1504 | ||
diff --git a/drivers/net/ethernet/intel/ice/ice_common.c b/drivers/net/ethernet/intel/ice/ice_common.c index aeae0205bec3..3730daf1bc1a 100644 --- a/drivers/net/ethernet/intel/ice/ice_common.c +++ b/drivers/net/ethernet/intel/ice/ice_common.c | |||
| @@ -31,7 +31,7 @@ | |||
| 31 | * @hw: pointer to the HW structure | 31 | * @hw: pointer to the HW structure |
| 32 | * | 32 | * |
| 33 | * This function sets the MAC type of the adapter based on the | 33 | * This function sets the MAC type of the adapter based on the |
| 34 | * vendor ID and device ID stored in the hw structure. | 34 | * vendor ID and device ID stored in the HW structure. |
| 35 | */ | 35 | */ |
| 36 | static enum ice_status ice_set_mac_type(struct ice_hw *hw) | 36 | static enum ice_status ice_set_mac_type(struct ice_hw *hw) |
| 37 | { | 37 | { |
| @@ -77,7 +77,7 @@ enum ice_status ice_clear_pf_cfg(struct ice_hw *hw) | |||
| 77 | 77 | ||
| 78 | /** | 78 | /** |
| 79 | * ice_aq_manage_mac_read - manage MAC address read command | 79 | * ice_aq_manage_mac_read - manage MAC address read command |
| 80 | * @hw: pointer to the hw struct | 80 | * @hw: pointer to the HW struct |
| 81 | * @buf: a virtual buffer to hold the manage MAC read response | 81 | * @buf: a virtual buffer to hold the manage MAC read response |
| 82 | * @buf_size: Size of the virtual buffer | 82 | * @buf_size: Size of the virtual buffer |
| 83 | * @cd: pointer to command details structure or NULL | 83 | * @cd: pointer to command details structure or NULL |
| @@ -418,7 +418,7 @@ static void ice_init_flex_flds(struct ice_hw *hw, enum ice_rxdid prof_id) | |||
| 418 | 418 | ||
| 419 | /** | 419 | /** |
| 420 | * ice_init_fltr_mgmt_struct - initializes filter management list and locks | 420 | * ice_init_fltr_mgmt_struct - initializes filter management list and locks |
| 421 | * @hw: pointer to the hw struct | 421 | * @hw: pointer to the HW struct |
| 422 | */ | 422 | */ |
| 423 | static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw) | 423 | static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw) |
| 424 | { | 424 | { |
| @@ -438,7 +438,7 @@ static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw) | |||
| 438 | 438 | ||
| 439 | /** | 439 | /** |
| 440 | * ice_cleanup_fltr_mgmt_struct - cleanup filter management list and locks | 440 | * ice_cleanup_fltr_mgmt_struct - cleanup filter management list and locks |
| 441 | * @hw: pointer to the hw struct | 441 | * @hw: pointer to the HW struct |
| 442 | */ | 442 | */ |
| 443 | static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw) | 443 | static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw) |
| 444 | { | 444 | { |
| @@ -477,7 +477,7 @@ static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw) | |||
| 477 | 477 | ||
| 478 | /** | 478 | /** |
| 479 | * ice_cfg_fw_log - configure FW logging | 479 | * ice_cfg_fw_log - configure FW logging |
| 480 | * @hw: pointer to the hw struct | 480 | * @hw: pointer to the HW struct |
| 481 | * @enable: enable certain FW logging events if true, disable all if false | 481 | * @enable: enable certain FW logging events if true, disable all if false |
| 482 | * | 482 | * |
| 483 | * This function enables/disables the FW logging via Rx CQ events and a UART | 483 | * This function enables/disables the FW logging via Rx CQ events and a UART |
| @@ -626,7 +626,7 @@ out: | |||
| 626 | 626 | ||
| 627 | /** | 627 | /** |
| 628 | * ice_output_fw_log | 628 | * ice_output_fw_log |
| 629 | * @hw: pointer to the hw struct | 629 | * @hw: pointer to the HW struct |
| 630 | * @desc: pointer to the AQ message descriptor | 630 | * @desc: pointer to the AQ message descriptor |
| 631 | * @buf: pointer to the buffer accompanying the AQ message | 631 | * @buf: pointer to the buffer accompanying the AQ message |
| 632 | * | 632 | * |
| @@ -642,7 +642,7 @@ void ice_output_fw_log(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf) | |||
| 642 | 642 | ||
| 643 | /** | 643 | /** |
| 644 | * ice_get_itr_intrl_gran - determine int/intrl granularity | 644 | * ice_get_itr_intrl_gran - determine int/intrl granularity |
| 645 | * @hw: pointer to the hw struct | 645 | * @hw: pointer to the HW struct |
| 646 | * | 646 | * |
| 647 | * Determines the itr/intrl granularities based on the maximum aggregate | 647 | * Determines the itr/intrl granularities based on the maximum aggregate |
| 648 | * bandwidth according to the device's configuration during power-on. | 648 | * bandwidth according to the device's configuration during power-on. |
| @@ -731,7 +731,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw) | |||
| 731 | goto err_unroll_cqinit; | 731 | goto err_unroll_cqinit; |
| 732 | } | 732 | } |
| 733 | 733 | ||
| 734 | /* set the back pointer to hw */ | 734 | /* set the back pointer to HW */ |
| 735 | hw->port_info->hw = hw; | 735 | hw->port_info->hw = hw; |
| 736 | 736 | ||
| 737 | /* Initialize port_info struct with switch configuration data */ | 737 | /* Initialize port_info struct with switch configuration data */ |
| @@ -988,7 +988,7 @@ enum ice_status ice_reset(struct ice_hw *hw, enum ice_reset_req req) | |||
| 988 | * @ice_rxq_ctx: pointer to the rxq context | 988 | * @ice_rxq_ctx: pointer to the rxq context |
| 989 | * @rxq_index: the index of the Rx queue | 989 | * @rxq_index: the index of the Rx queue |
| 990 | * | 990 | * |
| 991 | * Copies rxq context from dense structure to hw register space | 991 | * Copies rxq context from dense structure to HW register space |
| 992 | */ | 992 | */ |
| 993 | static enum ice_status | 993 | static enum ice_status |
| 994 | ice_copy_rxq_ctx_to_hw(struct ice_hw *hw, u8 *ice_rxq_ctx, u32 rxq_index) | 994 | ice_copy_rxq_ctx_to_hw(struct ice_hw *hw, u8 *ice_rxq_ctx, u32 rxq_index) |
| @@ -1001,7 +1001,7 @@ ice_copy_rxq_ctx_to_hw(struct ice_hw *hw, u8 *ice_rxq_ctx, u32 rxq_index) | |||
| 1001 | if (rxq_index > QRX_CTRL_MAX_INDEX) | 1001 | if (rxq_index > QRX_CTRL_MAX_INDEX) |
| 1002 | return ICE_ERR_PARAM; | 1002 | return ICE_ERR_PARAM; |
| 1003 | 1003 | ||
| 1004 | /* Copy each dword separately to hw */ | 1004 | /* Copy each dword separately to HW */ |
| 1005 | for (i = 0; i < ICE_RXQ_CTX_SIZE_DWORDS; i++) { | 1005 | for (i = 0; i < ICE_RXQ_CTX_SIZE_DWORDS; i++) { |
| 1006 | wr32(hw, QRX_CONTEXT(i, rxq_index), | 1006 | wr32(hw, QRX_CONTEXT(i, rxq_index), |
| 1007 | *((u32 *)(ice_rxq_ctx + (i * sizeof(u32))))); | 1007 | *((u32 *)(ice_rxq_ctx + (i * sizeof(u32))))); |
| @@ -1045,7 +1045,7 @@ static const struct ice_ctx_ele ice_rlan_ctx_info[] = { | |||
| 1045 | * @rxq_index: the index of the Rx queue | 1045 | * @rxq_index: the index of the Rx queue |
| 1046 | * | 1046 | * |
| 1047 | * Converts rxq context from sparse to dense structure and then writes | 1047 | * Converts rxq context from sparse to dense structure and then writes |
| 1048 | * it to hw register space | 1048 | * it to HW register space |
| 1049 | */ | 1049 | */ |
| 1050 | enum ice_status | 1050 | enum ice_status |
| 1051 | ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx, | 1051 | ice_write_rxq_ctx(struct ice_hw *hw, struct ice_rlan_ctx *rlan_ctx, |
| @@ -1144,7 +1144,7 @@ ice_debug_cq(struct ice_hw *hw, u32 __maybe_unused mask, void *desc, void *buf, | |||
| 1144 | 1144 | ||
| 1145 | /** | 1145 | /** |
| 1146 | * ice_aq_send_cmd - send FW Admin Queue command to FW Admin Queue | 1146 | * ice_aq_send_cmd - send FW Admin Queue command to FW Admin Queue |
| 1147 | * @hw: pointer to the hw struct | 1147 | * @hw: pointer to the HW struct |
| 1148 | * @desc: descriptor describing the command | 1148 | * @desc: descriptor describing the command |
| 1149 | * @buf: buffer to use for indirect commands (NULL for direct commands) | 1149 | * @buf: buffer to use for indirect commands (NULL for direct commands) |
| 1150 | * @buf_size: size of buffer for indirect commands (0 for direct commands) | 1150 | * @buf_size: size of buffer for indirect commands (0 for direct commands) |
| @@ -1161,7 +1161,7 @@ ice_aq_send_cmd(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf, | |||
| 1161 | 1161 | ||
| 1162 | /** | 1162 | /** |
| 1163 | * ice_aq_get_fw_ver | 1163 | * ice_aq_get_fw_ver |
| 1164 | * @hw: pointer to the hw struct | 1164 | * @hw: pointer to the HW struct |
| 1165 | * @cd: pointer to command details structure or NULL | 1165 | * @cd: pointer to command details structure or NULL |
| 1166 | * | 1166 | * |
| 1167 | * Get the firmware version (0x0001) from the admin queue commands | 1167 | * Get the firmware version (0x0001) from the admin queue commands |
| @@ -1195,7 +1195,7 @@ enum ice_status ice_aq_get_fw_ver(struct ice_hw *hw, struct ice_sq_cd *cd) | |||
| 1195 | 1195 | ||
| 1196 | /** | 1196 | /** |
| 1197 | * ice_aq_q_shutdown | 1197 | * ice_aq_q_shutdown |
| 1198 | * @hw: pointer to the hw struct | 1198 | * @hw: pointer to the HW struct |
| 1199 | * @unloading: is the driver unloading itself | 1199 | * @unloading: is the driver unloading itself |
| 1200 | * | 1200 | * |
| 1201 | * Tell the Firmware that we're shutting down the AdminQ and whether | 1201 | * Tell the Firmware that we're shutting down the AdminQ and whether |
| @@ -1218,8 +1218,8 @@ enum ice_status ice_aq_q_shutdown(struct ice_hw *hw, bool unloading) | |||
| 1218 | 1218 | ||
| 1219 | /** | 1219 | /** |
| 1220 | * ice_aq_req_res | 1220 | * ice_aq_req_res |
| 1221 | * @hw: pointer to the hw struct | 1221 | * @hw: pointer to the HW struct |
| 1222 | * @res: resource id | 1222 | * @res: resource ID |
| 1223 | * @access: access type | 1223 | * @access: access type |
| 1224 | * @sdp_number: resource number | 1224 | * @sdp_number: resource number |
| 1225 | * @timeout: the maximum time in ms that the driver may hold the resource | 1225 | * @timeout: the maximum time in ms that the driver may hold the resource |
| @@ -1304,8 +1304,8 @@ ice_aq_req_res(struct ice_hw *hw, enum ice_aq_res_ids res, | |||
| 1304 | 1304 | ||
| 1305 | /** | 1305 | /** |
| 1306 | * ice_aq_release_res | 1306 | * ice_aq_release_res |
| 1307 | * @hw: pointer to the hw struct | 1307 | * @hw: pointer to the HW struct |
| 1308 | * @res: resource id | 1308 | * @res: resource ID |
| 1309 | * @sdp_number: resource number | 1309 | * @sdp_number: resource number |
| 1310 | * @cd: pointer to command details structure or NULL | 1310 | * @cd: pointer to command details structure or NULL |
| 1311 | * | 1311 | * |
| @@ -1331,7 +1331,7 @@ ice_aq_release_res(struct ice_hw *hw, enum ice_aq_res_ids res, u8 sdp_number, | |||
| 1331 | /** | 1331 | /** |
| 1332 | * ice_acquire_res | 1332 | * ice_acquire_res |
| 1333 | * @hw: pointer to the HW structure | 1333 | * @hw: pointer to the HW structure |
| 1334 | * @res: resource id | 1334 | * @res: resource ID |
| 1335 | * @access: access type (read or write) | 1335 | * @access: access type (read or write) |
| 1336 | * @timeout: timeout in milliseconds | 1336 | * @timeout: timeout in milliseconds |
| 1337 | * | 1337 | * |
| @@ -1393,7 +1393,7 @@ ice_acquire_res_exit: | |||
| 1393 | /** | 1393 | /** |
| 1394 | * ice_release_res | 1394 | * ice_release_res |
| 1395 | * @hw: pointer to the HW structure | 1395 | * @hw: pointer to the HW structure |
| 1396 | * @res: resource id | 1396 | * @res: resource ID |
| 1397 | * | 1397 | * |
| 1398 | * This function will release a resource using the proper Admin Command. | 1398 | * This function will release a resource using the proper Admin Command. |
| 1399 | */ | 1399 | */ |
| @@ -1405,7 +1405,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res) | |||
| 1405 | status = ice_aq_release_res(hw, res, 0, NULL); | 1405 | status = ice_aq_release_res(hw, res, 0, NULL); |
| 1406 | 1406 | ||
| 1407 | /* there are some rare cases when trying to release the resource | 1407 | /* there are some rare cases when trying to release the resource |
| 1408 | * results in an admin Q timeout, so handle them correctly | 1408 | * results in an admin queue timeout, so handle them correctly |
| 1409 | */ | 1409 | */ |
| 1410 | while ((status == ICE_ERR_AQ_TIMEOUT) && | 1410 | while ((status == ICE_ERR_AQ_TIMEOUT) && |
| 1411 | (total_delay < hw->adminq.sq_cmd_timeout)) { | 1411 | (total_delay < hw->adminq.sq_cmd_timeout)) { |
| @@ -1417,7 +1417,7 @@ void ice_release_res(struct ice_hw *hw, enum ice_aq_res_ids res) | |||
| 1417 | 1417 | ||
| 1418 | /** | 1418 | /** |
| 1419 | * ice_get_num_per_func - determine number of resources per PF | 1419 | * ice_get_num_per_func - determine number of resources per PF |
| 1420 | * @hw: pointer to the hw structure | 1420 | * @hw: pointer to the HW structure |
| 1421 | * @max: value to be evenly split between each PF | 1421 | * @max: value to be evenly split between each PF |
| 1422 | * | 1422 | * |
| 1423 | * Determine the number of valid functions by going through the bitmap returned | 1423 | * Determine the number of valid functions by going through the bitmap returned |
| @@ -1440,7 +1440,7 @@ static u32 ice_get_num_per_func(struct ice_hw *hw, u32 max) | |||
| 1440 | 1440 | ||
| 1441 | /** | 1441 | /** |
| 1442 | * ice_parse_caps - parse function/device capabilities | 1442 | * ice_parse_caps - parse function/device capabilities |
| 1443 | * @hw: pointer to the hw struct | 1443 | * @hw: pointer to the HW struct |
| 1444 | * @buf: pointer to a buffer containing function/device capability records | 1444 | * @buf: pointer to a buffer containing function/device capability records |
| 1445 | * @cap_count: number of capability records in the list | 1445 | * @cap_count: number of capability records in the list |
| 1446 | * @opc: type of capabilities list to parse | 1446 | * @opc: type of capabilities list to parse |
| @@ -1582,7 +1582,7 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 cap_count, | |||
| 1582 | 1582 | ||
| 1583 | /** | 1583 | /** |
| 1584 | * ice_aq_discover_caps - query function/device capabilities | 1584 | * ice_aq_discover_caps - query function/device capabilities |
| 1585 | * @hw: pointer to the hw struct | 1585 | * @hw: pointer to the HW struct |
| 1586 | * @buf: a virtual buffer to hold the capabilities | 1586 | * @buf: a virtual buffer to hold the capabilities |
| 1587 | * @buf_size: Size of the virtual buffer | 1587 | * @buf_size: Size of the virtual buffer |
| 1588 | * @cap_count: cap count needed if AQ err==ENOMEM | 1588 | * @cap_count: cap count needed if AQ err==ENOMEM |
| @@ -1681,7 +1681,7 @@ enum ice_status ice_get_caps(struct ice_hw *hw) | |||
| 1681 | 1681 | ||
| 1682 | /** | 1682 | /** |
| 1683 | * ice_aq_manage_mac_write - manage MAC address write command | 1683 | * ice_aq_manage_mac_write - manage MAC address write command |
| 1684 | * @hw: pointer to the hw struct | 1684 | * @hw: pointer to the HW struct |
| 1685 | * @mac_addr: MAC address to be written as LAA/LAA+WoL/Port address | 1685 | * @mac_addr: MAC address to be written as LAA/LAA+WoL/Port address |
| 1686 | * @flags: flags to control write behavior | 1686 | * @flags: flags to control write behavior |
| 1687 | * @cd: pointer to command details structure or NULL | 1687 | * @cd: pointer to command details structure or NULL |
| @@ -1709,7 +1709,7 @@ ice_aq_manage_mac_write(struct ice_hw *hw, const u8 *mac_addr, u8 flags, | |||
| 1709 | 1709 | ||
| 1710 | /** | 1710 | /** |
| 1711 | * ice_aq_clear_pxe_mode | 1711 | * ice_aq_clear_pxe_mode |
| 1712 | * @hw: pointer to the hw struct | 1712 | * @hw: pointer to the HW struct |
| 1713 | * | 1713 | * |
| 1714 | * Tell the firmware that the driver is taking over from PXE (0x0110). | 1714 | * Tell the firmware that the driver is taking over from PXE (0x0110). |
| 1715 | */ | 1715 | */ |
| @@ -1725,7 +1725,7 @@ static enum ice_status ice_aq_clear_pxe_mode(struct ice_hw *hw) | |||
| 1725 | 1725 | ||
| 1726 | /** | 1726 | /** |
| 1727 | * ice_clear_pxe_mode - clear pxe operations mode | 1727 | * ice_clear_pxe_mode - clear pxe operations mode |
| 1728 | * @hw: pointer to the hw struct | 1728 | * @hw: pointer to the HW struct |
| 1729 | * | 1729 | * |
| 1730 | * Make sure all PXE mode settings are cleared, including things | 1730 | * Make sure all PXE mode settings are cleared, including things |
| 1731 | * like descriptor fetch/write-back mode. | 1731 | * like descriptor fetch/write-back mode. |
| @@ -1741,10 +1741,10 @@ void ice_clear_pxe_mode(struct ice_hw *hw) | |||
| 1741 | * @phy_type_low: lower part of phy_type | 1741 | * @phy_type_low: lower part of phy_type |
| 1742 | * @phy_type_high: higher part of phy_type | 1742 | * @phy_type_high: higher part of phy_type |
| 1743 | * | 1743 | * |
| 1744 | * This helper function will convert an entry in phy type structure | 1744 | * This helper function will convert an entry in PHY type structure |
| 1745 | * [phy_type_low, phy_type_high] to its corresponding link speed. | 1745 | * [phy_type_low, phy_type_high] to its corresponding link speed. |
| 1746 | * Note: In the structure of [phy_type_low, phy_type_high], there should | 1746 | * Note: In the structure of [phy_type_low, phy_type_high], there should |
| 1747 | * be one bit set, as this function will convert one phy type to its | 1747 | * be one bit set, as this function will convert one PHY type to its |
| 1748 | * speed. | 1748 | * speed. |
| 1749 | * If no bit gets set, ICE_LINK_SPEED_UNKNOWN will be returned | 1749 | * If no bit gets set, ICE_LINK_SPEED_UNKNOWN will be returned |
| 1750 | * If more than one bit gets set, ICE_LINK_SPEED_UNKNOWN will be returned | 1750 | * If more than one bit gets set, ICE_LINK_SPEED_UNKNOWN will be returned |
| @@ -1914,7 +1914,7 @@ ice_update_phy_type(u64 *phy_type_low, u64 *phy_type_high, | |||
| 1914 | 1914 | ||
| 1915 | /** | 1915 | /** |
| 1916 | * ice_aq_set_phy_cfg | 1916 | * ice_aq_set_phy_cfg |
| 1917 | * @hw: pointer to the hw struct | 1917 | * @hw: pointer to the HW struct |
| 1918 | * @lport: logical port number | 1918 | * @lport: logical port number |
| 1919 | * @cfg: structure with PHY configuration data to be set | 1919 | * @cfg: structure with PHY configuration data to be set |
| 1920 | * @cd: pointer to command details structure or NULL | 1920 | * @cd: pointer to command details structure or NULL |
| @@ -2029,7 +2029,7 @@ ice_set_fc(struct ice_port_info *pi, u8 *aq_failures, bool ena_auto_link_update) | |||
| 2029 | if (!pcaps) | 2029 | if (!pcaps) |
| 2030 | return ICE_ERR_NO_MEMORY; | 2030 | return ICE_ERR_NO_MEMORY; |
| 2031 | 2031 | ||
| 2032 | /* Get the current phy config */ | 2032 | /* Get the current PHY config */ |
| 2033 | status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps, | 2033 | status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps, |
| 2034 | NULL); | 2034 | NULL); |
| 2035 | if (status) { | 2035 | if (status) { |
| @@ -2338,7 +2338,7 @@ ice_aq_set_rss_lut(struct ice_hw *hw, u16 vsi_handle, u8 lut_type, | |||
| 2338 | 2338 | ||
| 2339 | /** | 2339 | /** |
| 2340 | * __ice_aq_get_set_rss_key | 2340 | * __ice_aq_get_set_rss_key |
| 2341 | * @hw: pointer to the hw struct | 2341 | * @hw: pointer to the HW struct |
| 2342 | * @vsi_id: VSI FW index | 2342 | * @vsi_id: VSI FW index |
| 2343 | * @key: pointer to key info struct | 2343 | * @key: pointer to key info struct |
| 2344 | * @set: set true to set the key, false to get the key | 2344 | * @set: set true to set the key, false to get the key |
| @@ -2373,7 +2373,7 @@ ice_status __ice_aq_get_set_rss_key(struct ice_hw *hw, u16 vsi_id, | |||
| 2373 | 2373 | ||
| 2374 | /** | 2374 | /** |
| 2375 | * ice_aq_get_rss_key | 2375 | * ice_aq_get_rss_key |
| 2376 | * @hw: pointer to the hw struct | 2376 | * @hw: pointer to the HW struct |
| 2377 | * @vsi_handle: software VSI handle | 2377 | * @vsi_handle: software VSI handle |
| 2378 | * @key: pointer to key info struct | 2378 | * @key: pointer to key info struct |
| 2379 | * | 2379 | * |
| @@ -2392,7 +2392,7 @@ ice_aq_get_rss_key(struct ice_hw *hw, u16 vsi_handle, | |||
| 2392 | 2392 | ||
| 2393 | /** | 2393 | /** |
| 2394 | * ice_aq_set_rss_key | 2394 | * ice_aq_set_rss_key |
| 2395 | * @hw: pointer to the hw struct | 2395 | * @hw: pointer to the HW struct |
| 2396 | * @vsi_handle: software VSI handle | 2396 | * @vsi_handle: software VSI handle |
| 2397 | * @keys: pointer to key info struct | 2397 | * @keys: pointer to key info struct |
| 2398 | * | 2398 | * |
| @@ -2517,7 +2517,7 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps, | |||
| 2517 | break; | 2517 | break; |
| 2518 | case ICE_VF_RESET: | 2518 | case ICE_VF_RESET: |
| 2519 | cmd->cmd_type = ICE_AQC_Q_DIS_CMD_VF_RESET; | 2519 | cmd->cmd_type = ICE_AQC_Q_DIS_CMD_VF_RESET; |
| 2520 | /* In this case, FW expects vmvf_num to be absolute VF id */ | 2520 | /* In this case, FW expects vmvf_num to be absolute VF ID */ |
| 2521 | cmd->vmvf_and_timeout |= | 2521 | cmd->vmvf_and_timeout |= |
| 2522 | cpu_to_le16((vmvf_num + hw->func_caps.vf_base_id) & | 2522 | cpu_to_le16((vmvf_num + hw->func_caps.vf_base_id) & |
| 2523 | ICE_AQC_Q_DIS_VMVF_NUM_M); | 2523 | ICE_AQC_Q_DIS_VMVF_NUM_M); |
| @@ -2794,13 +2794,13 @@ ice_set_ctx(u8 *src_ctx, u8 *dest_ctx, const struct ice_ctx_ele *ce_info) | |||
| 2794 | * ice_ena_vsi_txq | 2794 | * ice_ena_vsi_txq |
| 2795 | * @pi: port information structure | 2795 | * @pi: port information structure |
| 2796 | * @vsi_handle: software VSI handle | 2796 | * @vsi_handle: software VSI handle |
| 2797 | * @tc: tc number | 2797 | * @tc: TC number |
| 2798 | * @num_qgrps: Number of added queue groups | 2798 | * @num_qgrps: Number of added queue groups |
| 2799 | * @buf: list of queue groups to be added | 2799 | * @buf: list of queue groups to be added |
| 2800 | * @buf_size: size of buffer for indirect command | 2800 | * @buf_size: size of buffer for indirect command |
| 2801 | * @cd: pointer to command details structure or NULL | 2801 | * @cd: pointer to command details structure or NULL |
| 2802 | * | 2802 | * |
| 2803 | * This function adds one lan q | 2803 | * This function adds one LAN queue |
| 2804 | */ | 2804 | */ |
| 2805 | enum ice_status | 2805 | enum ice_status |
| 2806 | ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps, | 2806 | ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps, |
| @@ -2844,11 +2844,11 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps, | |||
| 2844 | * Bit 5-6. | 2844 | * Bit 5-6. |
| 2845 | * - Bit 7 is reserved. | 2845 | * - Bit 7 is reserved. |
| 2846 | * Without setting the generic section as valid in valid_sections, the | 2846 | * Without setting the generic section as valid in valid_sections, the |
| 2847 | * Admin Q command will fail with error code ICE_AQ_RC_EINVAL. | 2847 | * Admin queue command will fail with error code ICE_AQ_RC_EINVAL. |
| 2848 | */ | 2848 | */ |
| 2849 | buf->txqs[0].info.valid_sections = ICE_AQC_ELEM_VALID_GENERIC; | 2849 | buf->txqs[0].info.valid_sections = ICE_AQC_ELEM_VALID_GENERIC; |
| 2850 | 2850 | ||
| 2851 | /* add the lan q */ | 2851 | /* add the LAN queue */ |
| 2852 | status = ice_aq_add_lan_txq(hw, num_qgrps, buf, buf_size, cd); | 2852 | status = ice_aq_add_lan_txq(hw, num_qgrps, buf, buf_size, cd); |
| 2853 | if (status) { | 2853 | if (status) { |
| 2854 | ice_debug(hw, ICE_DBG_SCHED, "enable Q %d failed %d\n", | 2854 | ice_debug(hw, ICE_DBG_SCHED, "enable Q %d failed %d\n", |
| @@ -2860,7 +2860,7 @@ ice_ena_vsi_txq(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u8 num_qgrps, | |||
| 2860 | node.node_teid = buf->txqs[0].q_teid; | 2860 | node.node_teid = buf->txqs[0].q_teid; |
| 2861 | node.data.elem_type = ICE_AQC_ELEM_TYPE_LEAF; | 2861 | node.data.elem_type = ICE_AQC_ELEM_TYPE_LEAF; |
| 2862 | 2862 | ||
| 2863 | /* add a leaf node into schduler tree q layer */ | 2863 | /* add a leaf node into schduler tree queue layer */ |
| 2864 | status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node); | 2864 | status = ice_sched_add_node(pi, hw->num_tx_sched_layers - 1, &node); |
| 2865 | 2865 | ||
| 2866 | ena_txq_exit: | 2866 | ena_txq_exit: |
| @@ -2930,7 +2930,7 @@ ice_dis_vsi_txq(struct ice_port_info *pi, u8 num_queues, u16 *q_ids, | |||
| 2930 | * @vsi_handle: software VSI handle | 2930 | * @vsi_handle: software VSI handle |
| 2931 | * @tc_bitmap: TC bitmap | 2931 | * @tc_bitmap: TC bitmap |
| 2932 | * @maxqs: max queues array per TC | 2932 | * @maxqs: max queues array per TC |
| 2933 | * @owner: lan or rdma | 2933 | * @owner: LAN or RDMA |
| 2934 | * | 2934 | * |
| 2935 | * This function adds/updates the VSI queues per TC. | 2935 | * This function adds/updates the VSI queues per TC. |
| 2936 | */ | 2936 | */ |
| @@ -2965,13 +2965,13 @@ ice_cfg_vsi_qs(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap, | |||
| 2965 | } | 2965 | } |
| 2966 | 2966 | ||
| 2967 | /** | 2967 | /** |
| 2968 | * ice_cfg_vsi_lan - configure VSI lan queues | 2968 | * ice_cfg_vsi_lan - configure VSI LAN queues |
| 2969 | * @pi: port information structure | 2969 | * @pi: port information structure |
| 2970 | * @vsi_handle: software VSI handle | 2970 | * @vsi_handle: software VSI handle |
| 2971 | * @tc_bitmap: TC bitmap | 2971 | * @tc_bitmap: TC bitmap |
| 2972 | * @max_lanqs: max lan queues array per TC | 2972 | * @max_lanqs: max LAN queues array per TC |
| 2973 | * | 2973 | * |
| 2974 | * This function adds/updates the VSI lan queues per TC. | 2974 | * This function adds/updates the VSI LAN queues per TC. |
| 2975 | */ | 2975 | */ |
| 2976 | enum ice_status | 2976 | enum ice_status |
| 2977 | ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap, | 2977 | ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap, |
| @@ -2983,7 +2983,7 @@ ice_cfg_vsi_lan(struct ice_port_info *pi, u16 vsi_handle, u8 tc_bitmap, | |||
| 2983 | 2983 | ||
| 2984 | /** | 2984 | /** |
| 2985 | * ice_replay_pre_init - replay pre initialization | 2985 | * ice_replay_pre_init - replay pre initialization |
| 2986 | * @hw: pointer to the hw struct | 2986 | * @hw: pointer to the HW struct |
| 2987 | * | 2987 | * |
| 2988 | * Initializes required config data for VSI, FD, ACL, and RSS before replay. | 2988 | * Initializes required config data for VSI, FD, ACL, and RSS before replay. |
| 2989 | */ | 2989 | */ |
| @@ -3007,7 +3007,7 @@ static enum ice_status ice_replay_pre_init(struct ice_hw *hw) | |||
| 3007 | 3007 | ||
| 3008 | /** | 3008 | /** |
| 3009 | * ice_replay_vsi - replay VSI configuration | 3009 | * ice_replay_vsi - replay VSI configuration |
| 3010 | * @hw: pointer to the hw struct | 3010 | * @hw: pointer to the HW struct |
| 3011 | * @vsi_handle: driver VSI handle | 3011 | * @vsi_handle: driver VSI handle |
| 3012 | * | 3012 | * |
| 3013 | * Restore all VSI configuration after reset. It is required to call this | 3013 | * Restore all VSI configuration after reset. It is required to call this |
| @@ -3034,7 +3034,7 @@ enum ice_status ice_replay_vsi(struct ice_hw *hw, u16 vsi_handle) | |||
| 3034 | 3034 | ||
| 3035 | /** | 3035 | /** |
| 3036 | * ice_replay_post - post replay configuration cleanup | 3036 | * ice_replay_post - post replay configuration cleanup |
| 3037 | * @hw: pointer to the hw struct | 3037 | * @hw: pointer to the HW struct |
| 3038 | * | 3038 | * |
| 3039 | * Post replay cleanup. | 3039 | * Post replay cleanup. |
| 3040 | */ | 3040 | */ |
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c index 2bf5e11f559a..cc8cb5fdcdc1 100644 --- a/drivers/net/ethernet/intel/ice/ice_controlq.c +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c | |||
| @@ -51,7 +51,7 @@ static void ice_mailbox_init_regs(struct ice_hw *hw) | |||
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * ice_check_sq_alive | 53 | * ice_check_sq_alive |
| 54 | * @hw: pointer to the hw struct | 54 | * @hw: pointer to the HW struct |
| 55 | * @cq: pointer to the specific Control queue | 55 | * @cq: pointer to the specific Control queue |
| 56 | * | 56 | * |
| 57 | * Returns true if Queue is enabled else false. | 57 | * Returns true if Queue is enabled else false. |
| @@ -287,7 +287,7 @@ ice_cfg_sq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq) | |||
| 287 | * @hw: pointer to the hardware structure | 287 | * @hw: pointer to the hardware structure |
| 288 | * @cq: pointer to the specific Control queue | 288 | * @cq: pointer to the specific Control queue |
| 289 | * | 289 | * |
| 290 | * Configure base address and length registers for the receive (event q) | 290 | * Configure base address and length registers for the receive (event queue) |
| 291 | */ | 291 | */ |
| 292 | static enum ice_status | 292 | static enum ice_status |
| 293 | ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq) | 293 | ice_cfg_rq_regs(struct ice_hw *hw, struct ice_ctl_q_info *cq) |
| @@ -751,7 +751,7 @@ static u16 ice_clean_sq(struct ice_hw *hw, struct ice_ctl_q_info *cq) | |||
| 751 | 751 | ||
| 752 | /** | 752 | /** |
| 753 | * ice_sq_done - check if FW has processed the Admin Send Queue (ATQ) | 753 | * ice_sq_done - check if FW has processed the Admin Send Queue (ATQ) |
| 754 | * @hw: pointer to the hw struct | 754 | * @hw: pointer to the HW struct |
| 755 | * @cq: pointer to the specific Control queue | 755 | * @cq: pointer to the specific Control queue |
| 756 | * | 756 | * |
| 757 | * Returns true if the firmware has processed all descriptors on the | 757 | * Returns true if the firmware has processed all descriptors on the |
| @@ -767,7 +767,7 @@ static bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq) | |||
| 767 | 767 | ||
| 768 | /** | 768 | /** |
| 769 | * ice_sq_send_cmd - send command to Control Queue (ATQ) | 769 | * ice_sq_send_cmd - send command to Control Queue (ATQ) |
| 770 | * @hw: pointer to the hw struct | 770 | * @hw: pointer to the HW struct |
| 771 | * @cq: pointer to the specific Control queue | 771 | * @cq: pointer to the specific Control queue |
| 772 | * @desc: prefilled descriptor describing the command (non DMA mem) | 772 | * @desc: prefilled descriptor describing the command (non DMA mem) |
| 773 | * @buf: buffer to use for indirect commands (or NULL for direct commands) | 773 | * @buf: buffer to use for indirect commands (or NULL for direct commands) |
| @@ -962,7 +962,7 @@ void ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc *desc, u16 opcode) | |||
| 962 | 962 | ||
| 963 | /** | 963 | /** |
| 964 | * ice_clean_rq_elem | 964 | * ice_clean_rq_elem |
| 965 | * @hw: pointer to the hw struct | 965 | * @hw: pointer to the HW struct |
| 966 | * @cq: pointer to the specific Control queue | 966 | * @cq: pointer to the specific Control queue |
| 967 | * @e: event info from the receive descriptor, includes any buffers | 967 | * @e: event info from the receive descriptor, includes any buffers |
| 968 | * @pending: number of events that could be left to process | 968 | * @pending: number of events that could be left to process |
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c index 4a1920e8f168..1447ffc5d2b0 100644 --- a/drivers/net/ethernet/intel/ice/ice_ethtool.c +++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c | |||
| @@ -811,7 +811,7 @@ ice_get_settings_link_up(struct ethtool_link_ksettings *ks, | |||
| 811 | 811 | ||
| 812 | link_info = &vsi->port_info->phy.link_info; | 812 | link_info = &vsi->port_info->phy.link_info; |
| 813 | 813 | ||
| 814 | /* Initialize supported and advertised settings based on phy settings */ | 814 | /* Initialize supported and advertised settings based on PHY settings */ |
| 815 | switch (link_info->phy_type_low) { | 815 | switch (link_info->phy_type_low) { |
| 816 | case ICE_PHY_TYPE_LOW_100BASE_TX: | 816 | case ICE_PHY_TYPE_LOW_100BASE_TX: |
| 817 | ethtool_link_ksettings_add_link_mode(ks, supported, Autoneg); | 817 | ethtool_link_ksettings_add_link_mode(ks, supported, Autoneg); |
| @@ -1140,7 +1140,7 @@ ice_get_settings_link_down(struct ethtool_link_ksettings *ks, | |||
| 1140 | struct net_device __always_unused *netdev) | 1140 | struct net_device __always_unused *netdev) |
| 1141 | { | 1141 | { |
| 1142 | /* link is down and the driver needs to fall back on | 1142 | /* link is down and the driver needs to fall back on |
| 1143 | * supported phy types to figure out what info to display | 1143 | * supported PHY types to figure out what info to display |
| 1144 | */ | 1144 | */ |
| 1145 | ice_phy_type_to_ethtool(netdev, ks); | 1145 | ice_phy_type_to_ethtool(netdev, ks); |
| 1146 | 1146 | ||
| @@ -1350,7 +1350,7 @@ ice_setup_autoneg(struct ice_port_info *p, struct ethtool_link_ksettings *ks, | |||
| 1350 | } else { | 1350 | } else { |
| 1351 | /* If autoneg is currently enabled */ | 1351 | /* If autoneg is currently enabled */ |
| 1352 | if (p->phy.link_info.an_info & ICE_AQ_AN_COMPLETED) { | 1352 | if (p->phy.link_info.an_info & ICE_AQ_AN_COMPLETED) { |
| 1353 | /* If autoneg is supported 10GBASE_T is the only phy | 1353 | /* If autoneg is supported 10GBASE_T is the only PHY |
| 1354 | * that can disable it, so otherwise return error | 1354 | * that can disable it, so otherwise return error |
| 1355 | */ | 1355 | */ |
| 1356 | if (ethtool_link_ksettings_test_link_mode(ks, | 1356 | if (ethtool_link_ksettings_test_link_mode(ks, |
| @@ -1400,7 +1400,7 @@ ice_set_link_ksettings(struct net_device *netdev, | |||
| 1400 | if (!p) | 1400 | if (!p) |
| 1401 | return -EOPNOTSUPP; | 1401 | return -EOPNOTSUPP; |
| 1402 | 1402 | ||
| 1403 | /* Check if this is lan vsi */ | 1403 | /* Check if this is LAN VSI */ |
| 1404 | ice_for_each_vsi(pf, idx) | 1404 | ice_for_each_vsi(pf, idx) |
| 1405 | if (pf->vsi[idx]->type == ICE_VSI_PF) { | 1405 | if (pf->vsi[idx]->type == ICE_VSI_PF) { |
| 1406 | if (np->vsi != pf->vsi[idx]) | 1406 | if (np->vsi != pf->vsi[idx]) |
| @@ -1464,7 +1464,7 @@ ice_set_link_ksettings(struct net_device *netdev, | |||
| 1464 | if (!abilities) | 1464 | if (!abilities) |
| 1465 | return -ENOMEM; | 1465 | return -ENOMEM; |
| 1466 | 1466 | ||
| 1467 | /* Get the current phy config */ | 1467 | /* Get the current PHY config */ |
| 1468 | status = ice_aq_get_phy_caps(p, false, ICE_AQC_REPORT_SW_CFG, abilities, | 1468 | status = ice_aq_get_phy_caps(p, false, ICE_AQC_REPORT_SW_CFG, abilities, |
| 1469 | NULL); | 1469 | NULL); |
| 1470 | if (status) { | 1470 | if (status) { |
| @@ -1559,7 +1559,7 @@ done: | |||
| 1559 | } | 1559 | } |
| 1560 | 1560 | ||
| 1561 | /** | 1561 | /** |
| 1562 | * ice_get_rxnfc - command to get RX flow classification rules | 1562 | * ice_get_rxnfc - command to get Rx flow classification rules |
| 1563 | * @netdev: network interface device structure | 1563 | * @netdev: network interface device structure |
| 1564 | * @cmd: ethtool rxnfc command | 1564 | * @cmd: ethtool rxnfc command |
| 1565 | * @rule_locs: buffer to rturn Rx flow classification rules | 1565 | * @rule_locs: buffer to rturn Rx flow classification rules |
| @@ -1833,7 +1833,7 @@ ice_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *pause) | |||
| 1833 | if (!pcaps) | 1833 | if (!pcaps) |
| 1834 | return; | 1834 | return; |
| 1835 | 1835 | ||
| 1836 | /* Get current phy config */ | 1836 | /* Get current PHY config */ |
| 1837 | status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps, | 1837 | status = ice_aq_get_phy_caps(pi, false, ICE_AQC_REPORT_SW_CFG, pcaps, |
| 1838 | NULL); | 1838 | NULL); |
| 1839 | if (status) | 1839 | if (status) |
| @@ -2022,7 +2022,7 @@ out: | |||
| 2022 | * @key: hash key | 2022 | * @key: hash key |
| 2023 | * @hfunc: hash function | 2023 | * @hfunc: hash function |
| 2024 | * | 2024 | * |
| 2025 | * Returns -EINVAL if the table specifies an invalid queue id, otherwise | 2025 | * Returns -EINVAL if the table specifies an invalid queue ID, otherwise |
| 2026 | * returns 0 after programming the table. | 2026 | * returns 0 after programming the table. |
| 2027 | */ | 2027 | */ |
| 2028 | static int | 2028 | static int |
| @@ -2089,7 +2089,7 @@ enum ice_container_type { | |||
| 2089 | /** | 2089 | /** |
| 2090 | * ice_get_rc_coalesce - get ITR values for specific ring container | 2090 | * ice_get_rc_coalesce - get ITR values for specific ring container |
| 2091 | * @ec: ethtool structure to fill with driver's coalesce settings | 2091 | * @ec: ethtool structure to fill with driver's coalesce settings |
| 2092 | * @c_type: container type, RX or TX | 2092 | * @c_type: container type, Rx or Tx |
| 2093 | * @rc: ring container that the ITR values will come from | 2093 | * @rc: ring container that the ITR values will come from |
| 2094 | * | 2094 | * |
| 2095 | * Query the device for ice_ring_container specific ITR values. This is | 2095 | * Query the device for ice_ring_container specific ITR values. This is |
| @@ -2191,7 +2191,7 @@ ice_get_per_q_coalesce(struct net_device *netdev, u32 q_num, | |||
| 2191 | 2191 | ||
| 2192 | /** | 2192 | /** |
| 2193 | * ice_set_rc_coalesce - set ITR values for specific ring container | 2193 | * ice_set_rc_coalesce - set ITR values for specific ring container |
| 2194 | * @c_type: container type, RX or TX | 2194 | * @c_type: container type, Rx or Tx |
| 2195 | * @ec: ethtool structure from user to update ITR settings | 2195 | * @ec: ethtool structure from user to update ITR settings |
| 2196 | * @rc: ring container that the ITR values will come from | 2196 | * @rc: ring container that the ITR values will come from |
| 2197 | * @vsi: VSI associated to the ring container | 2197 | * @vsi: VSI associated to the ring container |
diff --git a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h index a8c3fe87d7aa..510a8c900e61 100644 --- a/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h +++ b/drivers/net/ethernet/intel/ice/ice_lan_tx_rx.h | |||
| @@ -20,7 +20,7 @@ union ice_32byte_rx_desc { | |||
| 20 | } lo_dword; | 20 | } lo_dword; |
| 21 | union { | 21 | union { |
| 22 | __le32 rss; /* RSS Hash */ | 22 | __le32 rss; /* RSS Hash */ |
| 23 | __le32 fd_id; /* Flow Director filter id */ | 23 | __le32 fd_id; /* Flow Director filter ID */ |
| 24 | } hi_dword; | 24 | } hi_dword; |
| 25 | } qword0; | 25 | } qword0; |
| 26 | struct { | 26 | struct { |
| @@ -99,7 +99,7 @@ enum ice_rx_ptype_payload_layer { | |||
| 99 | ICE_RX_PTYPE_PAYLOAD_LAYER_PAY4 = 3, | 99 | ICE_RX_PTYPE_PAYLOAD_LAYER_PAY4 = 3, |
| 100 | }; | 100 | }; |
| 101 | 101 | ||
| 102 | /* RX Flex Descriptor | 102 | /* Rx Flex Descriptor |
| 103 | * This descriptor is used instead of the legacy version descriptor when | 103 | * This descriptor is used instead of the legacy version descriptor when |
| 104 | * ice_rlan_ctx.adv_desc is set | 104 | * ice_rlan_ctx.adv_desc is set |
| 105 | */ | 105 | */ |
| @@ -113,7 +113,7 @@ union ice_32b_rx_flex_desc { | |||
| 113 | } read; | 113 | } read; |
| 114 | struct { | 114 | struct { |
| 115 | /* Qword 0 */ | 115 | /* Qword 0 */ |
| 116 | u8 rxdid; /* descriptor builder profile id */ | 116 | u8 rxdid; /* descriptor builder profile ID */ |
| 117 | u8 mir_id_umb_cast; /* mirror=[5:0], umb=[7:6] */ | 117 | u8 mir_id_umb_cast; /* mirror=[5:0], umb=[7:6] */ |
| 118 | __le16 ptype_flex_flags0; /* ptype=[9:0], ff0=[15:10] */ | 118 | __le16 ptype_flex_flags0; /* ptype=[9:0], ff0=[15:10] */ |
| 119 | __le16 pkt_len; /* [15:14] are reserved */ | 119 | __le16 pkt_len; /* [15:14] are reserved */ |
| @@ -149,7 +149,7 @@ union ice_32b_rx_flex_desc { | |||
| 149 | 149 | ||
| 150 | /* Rx Flex Descriptor NIC Profile | 150 | /* Rx Flex Descriptor NIC Profile |
| 151 | * This descriptor corresponds to RxDID 2 which contains | 151 | * This descriptor corresponds to RxDID 2 which contains |
| 152 | * metadata fields for RSS, flow id and timestamp info | 152 | * metadata fields for RSS, flow ID and timestamp info |
| 153 | */ | 153 | */ |
| 154 | struct ice_32b_rx_flex_desc_nic { | 154 | struct ice_32b_rx_flex_desc_nic { |
| 155 | /* Qword 0 */ | 155 | /* Qword 0 */ |
| @@ -208,7 +208,7 @@ enum ice_flex_rx_mdid { | |||
| 208 | ICE_RX_MDID_HASH_HIGH, | 208 | ICE_RX_MDID_HASH_HIGH, |
| 209 | }; | 209 | }; |
| 210 | 210 | ||
| 211 | /* RX/TX Flag64 packet flag bits */ | 211 | /* Rx/Tx Flag64 packet flag bits */ |
| 212 | enum ice_flg64_bits { | 212 | enum ice_flg64_bits { |
| 213 | ICE_FLG_PKT_DSI = 0, | 213 | ICE_FLG_PKT_DSI = 0, |
| 214 | ICE_FLG_EVLAN_x8100 = 15, | 214 | ICE_FLG_EVLAN_x8100 = 15, |
| @@ -322,7 +322,7 @@ enum ice_rlan_ctx_rx_hsplit_1 { | |||
| 322 | ICE_RLAN_RX_HSPLIT_1_SPLIT_ALWAYS = 2, | 322 | ICE_RLAN_RX_HSPLIT_1_SPLIT_ALWAYS = 2, |
| 323 | }; | 323 | }; |
| 324 | 324 | ||
| 325 | /* TX Descriptor */ | 325 | /* Tx Descriptor */ |
| 326 | struct ice_tx_desc { | 326 | struct ice_tx_desc { |
| 327 | __le64 buf_addr; /* Address of descriptor's data buf */ | 327 | __le64 buf_addr; /* Address of descriptor's data buf */ |
| 328 | __le64 cmd_type_offset_bsz; | 328 | __le64 cmd_type_offset_bsz; |
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c index 45e361f72057..d24da511b775 100644 --- a/drivers/net/ethernet/intel/ice/ice_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_lib.c | |||
| @@ -73,7 +73,7 @@ static int ice_setup_rx_ctx(struct ice_ring *ring) | |||
| 73 | regval |= (rxdid << QRXFLXP_CNTXT_RXDID_IDX_S) & | 73 | regval |= (rxdid << QRXFLXP_CNTXT_RXDID_IDX_S) & |
| 74 | QRXFLXP_CNTXT_RXDID_IDX_M; | 74 | QRXFLXP_CNTXT_RXDID_IDX_M; |
| 75 | 75 | ||
| 76 | /* increasing context priority to pick up profile id; | 76 | /* increasing context priority to pick up profile ID; |
| 77 | * default is 0x01; setting to 0x03 to ensure profile | 77 | * default is 0x01; setting to 0x03 to ensure profile |
| 78 | * is programming if prev context is of same priority | 78 | * is programming if prev context is of same priority |
| 79 | */ | 79 | */ |
| @@ -138,7 +138,7 @@ ice_setup_tx_ctx(struct ice_ring *ring, struct ice_tlan_ctx *tlan_ctx, u16 pf_q) | |||
| 138 | tlan_ctx->vmvf_type = ICE_TLAN_CTX_VMVF_TYPE_PF; | 138 | tlan_ctx->vmvf_type = ICE_TLAN_CTX_VMVF_TYPE_PF; |
| 139 | break; | 139 | break; |
| 140 | case ICE_VSI_VF: | 140 | case ICE_VSI_VF: |
| 141 | /* Firmware expects vmvf_num to be absolute VF id */ | 141 | /* Firmware expects vmvf_num to be absolute VF ID */ |
| 142 | tlan_ctx->vmvf_num = hw->func_caps.vf_base_id + vsi->vf_id; | 142 | tlan_ctx->vmvf_num = hw->func_caps.vf_base_id + vsi->vf_id; |
| 143 | tlan_ctx->vmvf_type = ICE_TLAN_CTX_VMVF_TYPE_VF; | 143 | tlan_ctx->vmvf_type = ICE_TLAN_CTX_VMVF_TYPE_VF; |
| 144 | break; | 144 | break; |
| @@ -297,7 +297,7 @@ static void ice_vsi_set_num_desc(struct ice_vsi *vsi) | |||
| 297 | /** | 297 | /** |
| 298 | * ice_vsi_set_num_qs - Set number of queues, descriptors and vectors for a VSI | 298 | * ice_vsi_set_num_qs - Set number of queues, descriptors and vectors for a VSI |
| 299 | * @vsi: the VSI being configured | 299 | * @vsi: the VSI being configured |
| 300 | * @vf_id: Id of the VF being configured | 300 | * @vf_id: ID of the VF being configured |
| 301 | * | 301 | * |
| 302 | * Return 0 on success and a negative value on error | 302 | * Return 0 on success and a negative value on error |
| 303 | */ | 303 | */ |
| @@ -479,7 +479,7 @@ static irqreturn_t ice_msix_clean_rings(int __always_unused irq, void *data) | |||
| 479 | * ice_vsi_alloc - Allocates the next available struct VSI in the PF | 479 | * ice_vsi_alloc - Allocates the next available struct VSI in the PF |
| 480 | * @pf: board private structure | 480 | * @pf: board private structure |
| 481 | * @type: type of VSI | 481 | * @type: type of VSI |
| 482 | * @vf_id: Id of the VF being configured | 482 | * @vf_id: ID of the VF being configured |
| 483 | * | 483 | * |
| 484 | * returns a pointer to a VSI on success, NULL on failure. | 484 | * returns a pointer to a VSI on success, NULL on failure. |
| 485 | */ | 485 | */ |
| @@ -1445,12 +1445,12 @@ ice_vsi_cfg_rss_exit: | |||
| 1445 | } | 1445 | } |
| 1446 | 1446 | ||
| 1447 | /** | 1447 | /** |
| 1448 | * ice_add_mac_to_list - Add a mac address filter entry to the list | 1448 | * ice_add_mac_to_list - Add a MAC address filter entry to the list |
| 1449 | * @vsi: the VSI to be forwarded to | 1449 | * @vsi: the VSI to be forwarded to |
| 1450 | * @add_list: pointer to the list which contains MAC filter entries | 1450 | * @add_list: pointer to the list which contains MAC filter entries |
| 1451 | * @macaddr: the MAC address to be added. | 1451 | * @macaddr: the MAC address to be added. |
| 1452 | * | 1452 | * |
| 1453 | * Adds mac address filter entry to the temp list | 1453 | * Adds MAC address filter entry to the temp list |
| 1454 | * | 1454 | * |
| 1455 | * Returns 0 on success or ENOMEM on failure. | 1455 | * Returns 0 on success or ENOMEM on failure. |
| 1456 | */ | 1456 | */ |
| @@ -1552,7 +1552,7 @@ void ice_free_fltr_list(struct device *dev, struct list_head *h) | |||
| 1552 | /** | 1552 | /** |
| 1553 | * ice_vsi_add_vlan - Add VSI membership for given VLAN | 1553 | * ice_vsi_add_vlan - Add VSI membership for given VLAN |
| 1554 | * @vsi: the VSI being configured | 1554 | * @vsi: the VSI being configured |
| 1555 | * @vid: VLAN id to be added | 1555 | * @vid: VLAN ID to be added |
| 1556 | */ | 1556 | */ |
| 1557 | int ice_vsi_add_vlan(struct ice_vsi *vsi, u16 vid) | 1557 | int ice_vsi_add_vlan(struct ice_vsi *vsi, u16 vid) |
| 1558 | { | 1558 | { |
| @@ -1590,7 +1590,7 @@ int ice_vsi_add_vlan(struct ice_vsi *vsi, u16 vid) | |||
| 1590 | /** | 1590 | /** |
| 1591 | * ice_vsi_kill_vlan - Remove VSI membership for a given VLAN | 1591 | * ice_vsi_kill_vlan - Remove VSI membership for a given VLAN |
| 1592 | * @vsi: the VSI being configured | 1592 | * @vsi: the VSI being configured |
| 1593 | * @vid: VLAN id to be removed | 1593 | * @vid: VLAN ID to be removed |
| 1594 | * | 1594 | * |
| 1595 | * Returns 0 on success and negative on failure | 1595 | * Returns 0 on success and negative on failure |
| 1596 | */ | 1596 | */ |
| @@ -2016,7 +2016,7 @@ int ice_vsi_stop_rx_rings(struct ice_vsi *vsi) | |||
| 2016 | * ice_vsi_stop_tx_rings - Disable Tx rings | 2016 | * ice_vsi_stop_tx_rings - Disable Tx rings |
| 2017 | * @vsi: the VSI being configured | 2017 | * @vsi: the VSI being configured |
| 2018 | * @rst_src: reset source | 2018 | * @rst_src: reset source |
| 2019 | * @rel_vmvf_num: Relative id of VF/VM | 2019 | * @rel_vmvf_num: Relative ID of VF/VM |
| 2020 | * @rings: Tx ring array to be stopped | 2020 | * @rings: Tx ring array to be stopped |
| 2021 | * @offset: offset within vsi->txq_map | 2021 | * @offset: offset within vsi->txq_map |
| 2022 | */ | 2022 | */ |
| @@ -2102,7 +2102,7 @@ err_alloc_q_ids: | |||
| 2102 | * ice_vsi_stop_lan_tx_rings - Disable LAN Tx rings | 2102 | * ice_vsi_stop_lan_tx_rings - Disable LAN Tx rings |
| 2103 | * @vsi: the VSI being configured | 2103 | * @vsi: the VSI being configured |
| 2104 | * @rst_src: reset source | 2104 | * @rst_src: reset source |
| 2105 | * @rel_vmvf_num: Relative id of VF/VM | 2105 | * @rel_vmvf_num: Relative ID of VF/VM |
| 2106 | */ | 2106 | */ |
| 2107 | int | 2107 | int |
| 2108 | ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src, | 2108 | ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src, |
| @@ -2177,7 +2177,7 @@ err_out: | |||
| 2177 | * @pf: board private structure | 2177 | * @pf: board private structure |
| 2178 | * @pi: pointer to the port_info instance | 2178 | * @pi: pointer to the port_info instance |
| 2179 | * @type: VSI type | 2179 | * @type: VSI type |
| 2180 | * @vf_id: defines VF id to which this VSI connects. This field is meant to be | 2180 | * @vf_id: defines VF ID to which this VSI connects. This field is meant to be |
| 2181 | * used only for ICE_VSI_VF VSI type. For other VSI types, should | 2181 | * used only for ICE_VSI_VF VSI type. For other VSI types, should |
| 2182 | * fill-in ICE_INVAL_VFID as input. | 2182 | * fill-in ICE_INVAL_VFID as input. |
| 2183 | * | 2183 | * |
| @@ -2219,7 +2219,7 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi, | |||
| 2219 | /* set RSS capabilities */ | 2219 | /* set RSS capabilities */ |
| 2220 | ice_vsi_set_rss_params(vsi); | 2220 | ice_vsi_set_rss_params(vsi); |
| 2221 | 2221 | ||
| 2222 | /* set tc configuration */ | 2222 | /* set TC configuration */ |
| 2223 | ice_vsi_set_tc_cfg(vsi); | 2223 | ice_vsi_set_tc_cfg(vsi); |
| 2224 | 2224 | ||
| 2225 | /* create the VSI */ | 2225 | /* create the VSI */ |
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c index 033910b63cf7..b47a58913103 100644 --- a/drivers/net/ethernet/intel/ice/ice_main.c +++ b/drivers/net/ethernet/intel/ice/ice_main.c | |||
| @@ -113,14 +113,14 @@ static void ice_check_for_hang_subtask(struct ice_pf *pf) | |||
| 113 | } | 113 | } |
| 114 | 114 | ||
| 115 | /** | 115 | /** |
| 116 | * ice_add_mac_to_sync_list - creates list of mac addresses to be synced | 116 | * ice_add_mac_to_sync_list - creates list of MAC addresses to be synced |
| 117 | * @netdev: the net device on which the sync is happening | 117 | * @netdev: the net device on which the sync is happening |
| 118 | * @addr: mac address to sync | 118 | * @addr: MAC address to sync |
| 119 | * | 119 | * |
| 120 | * This is a callback function which is called by the in kernel device sync | 120 | * This is a callback function which is called by the in kernel device sync |
| 121 | * functions (like __dev_uc_sync, __dev_mc_sync, etc). This function only | 121 | * functions (like __dev_uc_sync, __dev_mc_sync, etc). This function only |
| 122 | * populates the tmp_sync_list, which is later used by ice_add_mac to add the | 122 | * populates the tmp_sync_list, which is later used by ice_add_mac to add the |
| 123 | * mac filters from the hardware. | 123 | * MAC filters from the hardware. |
| 124 | */ | 124 | */ |
| 125 | static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr) | 125 | static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr) |
| 126 | { | 126 | { |
| @@ -134,14 +134,14 @@ static int ice_add_mac_to_sync_list(struct net_device *netdev, const u8 *addr) | |||
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | /** | 136 | /** |
| 137 | * ice_add_mac_to_unsync_list - creates list of mac addresses to be unsynced | 137 | * ice_add_mac_to_unsync_list - creates list of MAC addresses to be unsynced |
| 138 | * @netdev: the net device on which the unsync is happening | 138 | * @netdev: the net device on which the unsync is happening |
| 139 | * @addr: mac address to unsync | 139 | * @addr: MAC address to unsync |
| 140 | * | 140 | * |
| 141 | * This is a callback function which is called by the in kernel device unsync | 141 | * This is a callback function which is called by the in kernel device unsync |
| 142 | * functions (like __dev_uc_unsync, __dev_mc_unsync, etc). This function only | 142 | * functions (like __dev_uc_unsync, __dev_mc_unsync, etc). This function only |
| 143 | * populates the tmp_unsync_list, which is later used by ice_remove_mac to | 143 | * populates the tmp_unsync_list, which is later used by ice_remove_mac to |
| 144 | * delete the mac filters from the hardware. | 144 | * delete the MAC filters from the hardware. |
| 145 | */ | 145 | */ |
| 146 | static int ice_add_mac_to_unsync_list(struct net_device *netdev, const u8 *addr) | 146 | static int ice_add_mac_to_unsync_list(struct net_device *netdev, const u8 *addr) |
| 147 | { | 147 | { |
| @@ -245,7 +245,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 245 | netif_addr_unlock_bh(netdev); | 245 | netif_addr_unlock_bh(netdev); |
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | /* Remove mac addresses in the unsync list */ | 248 | /* Remove MAC addresses in the unsync list */ |
| 249 | status = ice_remove_mac(hw, &vsi->tmp_unsync_list); | 249 | status = ice_remove_mac(hw, &vsi->tmp_unsync_list); |
| 250 | ice_free_fltr_list(dev, &vsi->tmp_unsync_list); | 250 | ice_free_fltr_list(dev, &vsi->tmp_unsync_list); |
| 251 | if (status) { | 251 | if (status) { |
| @@ -257,7 +257,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 257 | } | 257 | } |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | /* Add mac addresses in the sync list */ | 260 | /* Add MAC addresses in the sync list */ |
| 261 | status = ice_add_mac(hw, &vsi->tmp_sync_list); | 261 | status = ice_add_mac(hw, &vsi->tmp_sync_list); |
| 262 | ice_free_fltr_list(dev, &vsi->tmp_sync_list); | 262 | ice_free_fltr_list(dev, &vsi->tmp_sync_list); |
| 263 | /* If filter is added successfully or already exists, do not go into | 263 | /* If filter is added successfully or already exists, do not go into |
| @@ -266,7 +266,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 266 | */ | 266 | */ |
| 267 | if (status && status != ICE_ERR_ALREADY_EXISTS) { | 267 | if (status && status != ICE_ERR_ALREADY_EXISTS) { |
| 268 | netdev_err(netdev, "Failed to add MAC filters\n"); | 268 | netdev_err(netdev, "Failed to add MAC filters\n"); |
| 269 | /* If there is no more space for new umac filters, vsi | 269 | /* If there is no more space for new umac filters, VSI |
| 270 | * should go into promiscuous mode. There should be some | 270 | * should go into promiscuous mode. There should be some |
| 271 | * space reserved for promiscuous filters. | 271 | * space reserved for promiscuous filters. |
| 272 | */ | 272 | */ |
| @@ -317,7 +317,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 317 | test_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags)) { | 317 | test_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags)) { |
| 318 | clear_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags); | 318 | clear_bit(ICE_VSI_FLAG_PROMISC_CHANGED, vsi->flags); |
| 319 | if (vsi->current_netdev_flags & IFF_PROMISC) { | 319 | if (vsi->current_netdev_flags & IFF_PROMISC) { |
| 320 | /* Apply TX filter rule to get traffic from VMs */ | 320 | /* Apply Tx filter rule to get traffic from VMs */ |
| 321 | status = ice_cfg_dflt_vsi(hw, vsi->idx, true, | 321 | status = ice_cfg_dflt_vsi(hw, vsi->idx, true, |
| 322 | ICE_FLTR_TX); | 322 | ICE_FLTR_TX); |
| 323 | if (status) { | 323 | if (status) { |
| @@ -327,7 +327,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 327 | err = -EIO; | 327 | err = -EIO; |
| 328 | goto out_promisc; | 328 | goto out_promisc; |
| 329 | } | 329 | } |
| 330 | /* Apply RX filter rule to get traffic from wire */ | 330 | /* Apply Rx filter rule to get traffic from wire */ |
| 331 | status = ice_cfg_dflt_vsi(hw, vsi->idx, true, | 331 | status = ice_cfg_dflt_vsi(hw, vsi->idx, true, |
| 332 | ICE_FLTR_RX); | 332 | ICE_FLTR_RX); |
| 333 | if (status) { | 333 | if (status) { |
| @@ -338,7 +338,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 338 | goto out_promisc; | 338 | goto out_promisc; |
| 339 | } | 339 | } |
| 340 | } else { | 340 | } else { |
| 341 | /* Clear TX filter rule to stop traffic from VMs */ | 341 | /* Clear Tx filter rule to stop traffic from VMs */ |
| 342 | status = ice_cfg_dflt_vsi(hw, vsi->idx, false, | 342 | status = ice_cfg_dflt_vsi(hw, vsi->idx, false, |
| 343 | ICE_FLTR_TX); | 343 | ICE_FLTR_TX); |
| 344 | if (status) { | 344 | if (status) { |
| @@ -348,7 +348,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi) | |||
| 348 | err = -EIO; | 348 | err = -EIO; |
| 349 | goto out_promisc; | 349 | goto out_promisc; |
| 350 | } | 350 | } |
| 351 | /* Clear RX filter to remove traffic from wire */ | 351 | /* Clear Rx filter to remove traffic from wire */ |
| 352 | status = ice_cfg_dflt_vsi(hw, vsi->idx, false, | 352 | status = ice_cfg_dflt_vsi(hw, vsi->idx, false, |
| 353 | ICE_FLTR_RX); | 353 | ICE_FLTR_RX); |
| 354 | if (status) { | 354 | if (status) { |
| @@ -608,9 +608,9 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup) | |||
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | /** | 610 | /** |
| 611 | * ice_vsi_link_event - update the vsi's netdev | 611 | * ice_vsi_link_event - update the VSI's netdev |
| 612 | * @vsi: the vsi on which the link event occurred | 612 | * @vsi: the VSI on which the link event occurred |
| 613 | * @link_up: whether or not the vsi needs to be set up or down | 613 | * @link_up: whether or not the VSI needs to be set up or down |
| 614 | */ | 614 | */ |
| 615 | static void ice_vsi_link_event(struct ice_vsi *vsi, bool link_up) | 615 | static void ice_vsi_link_event(struct ice_vsi *vsi, bool link_up) |
| 616 | { | 616 | { |
| @@ -1236,7 +1236,7 @@ static void ice_service_task(struct work_struct *work) | |||
| 1236 | 1236 | ||
| 1237 | /** | 1237 | /** |
| 1238 | * ice_set_ctrlq_len - helper function to set controlq length | 1238 | * ice_set_ctrlq_len - helper function to set controlq length |
| 1239 | * @hw: pointer to the hw instance | 1239 | * @hw: pointer to the HW instance |
| 1240 | */ | 1240 | */ |
| 1241 | static void ice_set_ctrlq_len(struct ice_hw *hw) | 1241 | static void ice_set_ctrlq_len(struct ice_hw *hw) |
| 1242 | { | 1242 | { |
| @@ -1796,12 +1796,12 @@ ice_pf_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi) | |||
| 1796 | } | 1796 | } |
| 1797 | 1797 | ||
| 1798 | /** | 1798 | /** |
| 1799 | * ice_vlan_rx_add_vid - Add a vlan id filter to HW offload | 1799 | * ice_vlan_rx_add_vid - Add a VLAN ID filter to HW offload |
| 1800 | * @netdev: network interface to be adjusted | 1800 | * @netdev: network interface to be adjusted |
| 1801 | * @proto: unused protocol | 1801 | * @proto: unused protocol |
| 1802 | * @vid: vlan id to be added | 1802 | * @vid: VLAN ID to be added |
| 1803 | * | 1803 | * |
| 1804 | * net_device_ops implementation for adding vlan ids | 1804 | * net_device_ops implementation for adding VLAN IDs |
| 1805 | */ | 1805 | */ |
| 1806 | static int | 1806 | static int |
| 1807 | ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto, | 1807 | ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto, |
| @@ -1827,7 +1827,7 @@ ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto, | |||
| 1827 | return ret; | 1827 | return ret; |
| 1828 | } | 1828 | } |
| 1829 | 1829 | ||
| 1830 | /* Add all VLAN ids including 0 to the switch filter. VLAN id 0 is | 1830 | /* Add all VLAN IDs including 0 to the switch filter. VLAN ID 0 is |
| 1831 | * needed to continue allowing all untagged packets since VLAN prune | 1831 | * needed to continue allowing all untagged packets since VLAN prune |
| 1832 | * list is applied to all packets by the switch | 1832 | * list is applied to all packets by the switch |
| 1833 | */ | 1833 | */ |
| @@ -1841,12 +1841,12 @@ ice_vlan_rx_add_vid(struct net_device *netdev, __always_unused __be16 proto, | |||
| 1841 | } | 1841 | } |
| 1842 | 1842 | ||
| 1843 | /** | 1843 | /** |
| 1844 | * ice_vlan_rx_kill_vid - Remove a vlan id filter from HW offload | 1844 | * ice_vlan_rx_kill_vid - Remove a VLAN ID filter from HW offload |
| 1845 | * @netdev: network interface to be adjusted | 1845 | * @netdev: network interface to be adjusted |
| 1846 | * @proto: unused protocol | 1846 | * @proto: unused protocol |
| 1847 | * @vid: vlan id to be removed | 1847 | * @vid: VLAN ID to be removed |
| 1848 | * | 1848 | * |
| 1849 | * net_device_ops implementation for removing vlan ids | 1849 | * net_device_ops implementation for removing VLAN IDs |
| 1850 | */ | 1850 | */ |
| 1851 | static int | 1851 | static int |
| 1852 | ice_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto, | 1852 | ice_vlan_rx_kill_vid(struct net_device *netdev, __always_unused __be16 proto, |
| @@ -2622,7 +2622,7 @@ static void __exit ice_module_exit(void) | |||
| 2622 | module_exit(ice_module_exit); | 2622 | module_exit(ice_module_exit); |
| 2623 | 2623 | ||
| 2624 | /** | 2624 | /** |
| 2625 | * ice_set_mac_address - NDO callback to set mac address | 2625 | * ice_set_mac_address - NDO callback to set MAC address |
| 2626 | * @netdev: network interface device structure | 2626 | * @netdev: network interface device structure |
| 2627 | * @pi: pointer to an address structure | 2627 | * @pi: pointer to an address structure |
| 2628 | * | 2628 | * |
| @@ -2659,14 +2659,14 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi) | |||
| 2659 | return -EBUSY; | 2659 | return -EBUSY; |
| 2660 | } | 2660 | } |
| 2661 | 2661 | ||
| 2662 | /* When we change the mac address we also have to change the mac address | 2662 | /* When we change the MAC address we also have to change the MAC address |
| 2663 | * based filter rules that were created previously for the old mac | 2663 | * based filter rules that were created previously for the old MAC |
| 2664 | * address. So first, we remove the old filter rule using ice_remove_mac | 2664 | * address. So first, we remove the old filter rule using ice_remove_mac |
| 2665 | * and then create a new filter rule using ice_add_mac. Note that for | 2665 | * and then create a new filter rule using ice_add_mac. Note that for |
| 2666 | * both these operations, we first need to form a "list" of mac | 2666 | * both these operations, we first need to form a "list" of MAC |
| 2667 | * addresses (even though in this case, we have only 1 mac address to be | 2667 | * addresses (even though in this case, we have only 1 MAC address to be |
| 2668 | * added/removed) and this done using ice_add_mac_to_list. Depending on | 2668 | * added/removed) and this done using ice_add_mac_to_list. Depending on |
| 2669 | * the ensuing operation this "list" of mac addresses is either to be | 2669 | * the ensuing operation this "list" of MAC addresses is either to be |
| 2670 | * added or removed from the filter. | 2670 | * added or removed from the filter. |
| 2671 | */ | 2671 | */ |
| 2672 | err = ice_add_mac_to_list(vsi, &r_mac_list, netdev->dev_addr); | 2672 | err = ice_add_mac_to_list(vsi, &r_mac_list, netdev->dev_addr); |
| @@ -2704,12 +2704,12 @@ free_lists: | |||
| 2704 | return err; | 2704 | return err; |
| 2705 | } | 2705 | } |
| 2706 | 2706 | ||
| 2707 | /* change the netdev's mac address */ | 2707 | /* change the netdev's MAC address */ |
| 2708 | memcpy(netdev->dev_addr, mac, netdev->addr_len); | 2708 | memcpy(netdev->dev_addr, mac, netdev->addr_len); |
| 2709 | netdev_dbg(vsi->netdev, "updated mac address to %pM\n", | 2709 | netdev_dbg(vsi->netdev, "updated mac address to %pM\n", |
| 2710 | netdev->dev_addr); | 2710 | netdev->dev_addr); |
| 2711 | 2711 | ||
| 2712 | /* write new mac address to the firmware */ | 2712 | /* write new MAC address to the firmware */ |
| 2713 | flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL; | 2713 | flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL; |
| 2714 | status = ice_aq_manage_mac_write(hw, mac, flags, NULL); | 2714 | status = ice_aq_manage_mac_write(hw, mac, flags, NULL); |
| 2715 | if (status) { | 2715 | if (status) { |
| @@ -2751,7 +2751,7 @@ static void ice_set_rx_mode(struct net_device *netdev) | |||
| 2751 | * @tb: pointer to array of nladdr (unused) | 2751 | * @tb: pointer to array of nladdr (unused) |
| 2752 | * @dev: the net device pointer | 2752 | * @dev: the net device pointer |
| 2753 | * @addr: the MAC address entry being added | 2753 | * @addr: the MAC address entry being added |
| 2754 | * @vid: VLAN id | 2754 | * @vid: VLAN ID |
| 2755 | * @flags: instructions from stack about fdb operation | 2755 | * @flags: instructions from stack about fdb operation |
| 2756 | * @extack: netlink extended ack | 2756 | * @extack: netlink extended ack |
| 2757 | */ | 2757 | */ |
| @@ -2791,7 +2791,7 @@ ice_fdb_add(struct ndmsg *ndm, struct nlattr __always_unused *tb[], | |||
| 2791 | * @tb: pointer to array of nladdr (unused) | 2791 | * @tb: pointer to array of nladdr (unused) |
| 2792 | * @dev: the net device pointer | 2792 | * @dev: the net device pointer |
| 2793 | * @addr: the MAC address entry being added | 2793 | * @addr: the MAC address entry being added |
| 2794 | * @vid: VLAN id | 2794 | * @vid: VLAN ID |
| 2795 | */ | 2795 | */ |
| 2796 | static int | 2796 | static int |
| 2797 | ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[], | 2797 | ice_fdb_del(struct ndmsg *ndm, __always_unused struct nlattr *tb[], |
| @@ -2850,8 +2850,8 @@ ice_set_features(struct net_device *netdev, netdev_features_t features) | |||
| 2850 | } | 2850 | } |
| 2851 | 2851 | ||
| 2852 | /** | 2852 | /** |
| 2853 | * ice_vsi_vlan_setup - Setup vlan offload properties on a VSI | 2853 | * ice_vsi_vlan_setup - Setup VLAN offload properties on a VSI |
| 2854 | * @vsi: VSI to setup vlan properties for | 2854 | * @vsi: VSI to setup VLAN properties for |
| 2855 | */ | 2855 | */ |
| 2856 | static int ice_vsi_vlan_setup(struct ice_vsi *vsi) | 2856 | static int ice_vsi_vlan_setup(struct ice_vsi *vsi) |
| 2857 | { | 2857 | { |
| @@ -3986,7 +3986,7 @@ int ice_get_rss(struct ice_vsi *vsi, u8 *seed, u8 *lut, u16 lut_size) | |||
| 3986 | /** | 3986 | /** |
| 3987 | * ice_bridge_getlink - Get the hardware bridge mode | 3987 | * ice_bridge_getlink - Get the hardware bridge mode |
| 3988 | * @skb: skb buff | 3988 | * @skb: skb buff |
| 3989 | * @pid: process id | 3989 | * @pid: process ID |
| 3990 | * @seq: RTNL message seq | 3990 | * @seq: RTNL message seq |
| 3991 | * @dev: the netdev being configured | 3991 | * @dev: the netdev being configured |
| 3992 | * @filter_mask: filter mask passed in | 3992 | * @filter_mask: filter mask passed in |
diff --git a/drivers/net/ethernet/intel/ice/ice_nvm.c b/drivers/net/ethernet/intel/ice/ice_nvm.c index 413fdbbcc4d0..62571d33d0d6 100644 --- a/drivers/net/ethernet/intel/ice/ice_nvm.c +++ b/drivers/net/ethernet/intel/ice/ice_nvm.c | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | /** | 6 | /** |
| 7 | * ice_aq_read_nvm | 7 | * ice_aq_read_nvm |
| 8 | * @hw: pointer to the hw struct | 8 | * @hw: pointer to the HW struct |
| 9 | * @module_typeid: module pointer location in words from the NVM beginning | 9 | * @module_typeid: module pointer location in words from the NVM beginning |
| 10 | * @offset: byte offset from the module beginning | 10 | * @offset: byte offset from the module beginning |
| 11 | * @length: length of the section to be read (in bytes from the offset) | 11 | * @length: length of the section to be read (in bytes from the offset) |
| @@ -235,7 +235,7 @@ ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data) | |||
| 235 | 235 | ||
| 236 | /** | 236 | /** |
| 237 | * ice_init_nvm - initializes NVM setting | 237 | * ice_init_nvm - initializes NVM setting |
| 238 | * @hw: pointer to the hw struct | 238 | * @hw: pointer to the HW struct |
| 239 | * | 239 | * |
| 240 | * This function reads and populates NVM settings such as Shadow RAM size, | 240 | * This function reads and populates NVM settings such as Shadow RAM size, |
| 241 | * max_timeout, and blank_nvm_mode | 241 | * max_timeout, and blank_nvm_mode |
| @@ -248,7 +248,7 @@ enum ice_status ice_init_nvm(struct ice_hw *hw) | |||
| 248 | u32 fla, gens_stat; | 248 | u32 fla, gens_stat; |
| 249 | u8 sr_size; | 249 | u8 sr_size; |
| 250 | 250 | ||
| 251 | /* The SR size is stored regardless of the nvm programming mode | 251 | /* The SR size is stored regardless of the NVM programming mode |
| 252 | * as the blank mode may be used in the factory line. | 252 | * as the blank mode may be used in the factory line. |
| 253 | */ | 253 | */ |
| 254 | gens_stat = rd32(hw, GLNVM_GENS); | 254 | gens_stat = rd32(hw, GLNVM_GENS); |
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.c b/drivers/net/ethernet/intel/ice/ice_sched.c index e0218f4c8f0b..3d1c941a938e 100644 --- a/drivers/net/ethernet/intel/ice/ice_sched.c +++ b/drivers/net/ethernet/intel/ice/ice_sched.c | |||
| @@ -43,9 +43,9 @@ ice_sched_add_root_node(struct ice_port_info *pi, | |||
| 43 | /** | 43 | /** |
| 44 | * ice_sched_find_node_by_teid - Find the Tx scheduler node in SW DB | 44 | * ice_sched_find_node_by_teid - Find the Tx scheduler node in SW DB |
| 45 | * @start_node: pointer to the starting ice_sched_node struct in a sub-tree | 45 | * @start_node: pointer to the starting ice_sched_node struct in a sub-tree |
| 46 | * @teid: node teid to search | 46 | * @teid: node TEID to search |
| 47 | * | 47 | * |
| 48 | * This function searches for a node matching the teid in the scheduling tree | 48 | * This function searches for a node matching the TEID in the scheduling tree |
| 49 | * from the SW DB. The search is recursive and is restricted by the number of | 49 | * from the SW DB. The search is recursive and is restricted by the number of |
| 50 | * layers it has searched through; stopping at the max supported layer. | 50 | * layers it has searched through; stopping at the max supported layer. |
| 51 | * | 51 | * |
| @@ -66,7 +66,7 @@ ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid) | |||
| 66 | start_node->info.data.elem_type == ICE_AQC_ELEM_TYPE_LEAF) | 66 | start_node->info.data.elem_type == ICE_AQC_ELEM_TYPE_LEAF) |
| 67 | return NULL; | 67 | return NULL; |
| 68 | 68 | ||
| 69 | /* Check if teid matches to any of the children nodes */ | 69 | /* Check if TEID matches to any of the children nodes */ |
| 70 | for (i = 0; i < start_node->num_children; i++) | 70 | for (i = 0; i < start_node->num_children; i++) |
| 71 | if (ICE_TXSCHED_GET_NODE_TEID(start_node->children[i]) == teid) | 71 | if (ICE_TXSCHED_GET_NODE_TEID(start_node->children[i]) == teid) |
| 72 | return start_node->children[i]; | 72 | return start_node->children[i]; |
| @@ -86,7 +86,7 @@ ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid) | |||
| 86 | 86 | ||
| 87 | /** | 87 | /** |
| 88 | * ice_aqc_send_sched_elem_cmd - send scheduling elements cmd | 88 | * ice_aqc_send_sched_elem_cmd - send scheduling elements cmd |
| 89 | * @hw: pointer to the hw struct | 89 | * @hw: pointer to the HW struct |
| 90 | * @cmd_opc: cmd opcode | 90 | * @cmd_opc: cmd opcode |
| 91 | * @elems_req: number of elements to request | 91 | * @elems_req: number of elements to request |
| 92 | * @buf: pointer to buffer | 92 | * @buf: pointer to buffer |
| @@ -118,7 +118,7 @@ ice_aqc_send_sched_elem_cmd(struct ice_hw *hw, enum ice_adminq_opc cmd_opc, | |||
| 118 | 118 | ||
| 119 | /** | 119 | /** |
| 120 | * ice_aq_query_sched_elems - query scheduler elements | 120 | * ice_aq_query_sched_elems - query scheduler elements |
| 121 | * @hw: pointer to the hw struct | 121 | * @hw: pointer to the HW struct |
| 122 | * @elems_req: number of elements to query | 122 | * @elems_req: number of elements to query |
| 123 | * @buf: pointer to buffer | 123 | * @buf: pointer to buffer |
| 124 | * @buf_size: buffer size in bytes | 124 | * @buf_size: buffer size in bytes |
| @@ -138,9 +138,9 @@ ice_aq_query_sched_elems(struct ice_hw *hw, u16 elems_req, | |||
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | /** | 140 | /** |
| 141 | * ice_sched_query_elem - query element information from hw | 141 | * ice_sched_query_elem - query element information from HW |
| 142 | * @hw: pointer to the hw struct | 142 | * @hw: pointer to the HW struct |
| 143 | * @node_teid: node teid to be queried | 143 | * @node_teid: node TEID to be queried |
| 144 | * @buf: buffer to element information | 144 | * @buf: buffer to element information |
| 145 | * | 145 | * |
| 146 | * This function queries HW element information | 146 | * This function queries HW element information |
| @@ -226,7 +226,7 @@ ice_sched_add_node(struct ice_port_info *pi, u8 layer, | |||
| 226 | 226 | ||
| 227 | /** | 227 | /** |
| 228 | * ice_aq_delete_sched_elems - delete scheduler elements | 228 | * ice_aq_delete_sched_elems - delete scheduler elements |
| 229 | * @hw: pointer to the hw struct | 229 | * @hw: pointer to the HW struct |
| 230 | * @grps_req: number of groups to delete | 230 | * @grps_req: number of groups to delete |
| 231 | * @buf: pointer to buffer | 231 | * @buf: pointer to buffer |
| 232 | * @buf_size: buffer size in bytes | 232 | * @buf_size: buffer size in bytes |
| @@ -246,13 +246,13 @@ ice_aq_delete_sched_elems(struct ice_hw *hw, u16 grps_req, | |||
| 246 | } | 246 | } |
| 247 | 247 | ||
| 248 | /** | 248 | /** |
| 249 | * ice_sched_remove_elems - remove nodes from hw | 249 | * ice_sched_remove_elems - remove nodes from HW |
| 250 | * @hw: pointer to the hw struct | 250 | * @hw: pointer to the HW struct |
| 251 | * @parent: pointer to the parent node | 251 | * @parent: pointer to the parent node |
| 252 | * @num_nodes: number of nodes | 252 | * @num_nodes: number of nodes |
| 253 | * @node_teids: array of node teids to be deleted | 253 | * @node_teids: array of node teids to be deleted |
| 254 | * | 254 | * |
| 255 | * This function remove nodes from hw | 255 | * This function remove nodes from HW |
| 256 | */ | 256 | */ |
| 257 | static enum ice_status | 257 | static enum ice_status |
| 258 | ice_sched_remove_elems(struct ice_hw *hw, struct ice_sched_node *parent, | 258 | ice_sched_remove_elems(struct ice_hw *hw, struct ice_sched_node *parent, |
| @@ -285,7 +285,7 @@ ice_sched_remove_elems(struct ice_hw *hw, struct ice_sched_node *parent, | |||
| 285 | 285 | ||
| 286 | /** | 286 | /** |
| 287 | * ice_sched_get_first_node - get the first node of the given layer | 287 | * ice_sched_get_first_node - get the first node of the given layer |
| 288 | * @hw: pointer to the hw struct | 288 | * @hw: pointer to the HW struct |
| 289 | * @parent: pointer the base node of the subtree | 289 | * @parent: pointer the base node of the subtree |
| 290 | * @layer: layer number | 290 | * @layer: layer number |
| 291 | * | 291 | * |
| @@ -406,7 +406,7 @@ err_exit: | |||
| 406 | 406 | ||
| 407 | /** | 407 | /** |
| 408 | * ice_aq_get_dflt_topo - gets default scheduler topology | 408 | * ice_aq_get_dflt_topo - gets default scheduler topology |
| 409 | * @hw: pointer to the hw struct | 409 | * @hw: pointer to the HW struct |
| 410 | * @lport: logical port number | 410 | * @lport: logical port number |
| 411 | * @buf: pointer to buffer | 411 | * @buf: pointer to buffer |
| 412 | * @buf_size: buffer size in bytes | 412 | * @buf_size: buffer size in bytes |
| @@ -436,7 +436,7 @@ ice_aq_get_dflt_topo(struct ice_hw *hw, u8 lport, | |||
| 436 | 436 | ||
| 437 | /** | 437 | /** |
| 438 | * ice_aq_add_sched_elems - adds scheduling element | 438 | * ice_aq_add_sched_elems - adds scheduling element |
| 439 | * @hw: pointer to the hw struct | 439 | * @hw: pointer to the HW struct |
| 440 | * @grps_req: the number of groups that are requested to be added | 440 | * @grps_req: the number of groups that are requested to be added |
| 441 | * @buf: pointer to buffer | 441 | * @buf: pointer to buffer |
| 442 | * @buf_size: buffer size in bytes | 442 | * @buf_size: buffer size in bytes |
| @@ -457,7 +457,7 @@ ice_aq_add_sched_elems(struct ice_hw *hw, u16 grps_req, | |||
| 457 | 457 | ||
| 458 | /** | 458 | /** |
| 459 | * ice_aq_suspend_sched_elems - suspend scheduler elements | 459 | * ice_aq_suspend_sched_elems - suspend scheduler elements |
| 460 | * @hw: pointer to the hw struct | 460 | * @hw: pointer to the HW struct |
| 461 | * @elems_req: number of elements to suspend | 461 | * @elems_req: number of elements to suspend |
| 462 | * @buf: pointer to buffer | 462 | * @buf: pointer to buffer |
| 463 | * @buf_size: buffer size in bytes | 463 | * @buf_size: buffer size in bytes |
| @@ -478,7 +478,7 @@ ice_aq_suspend_sched_elems(struct ice_hw *hw, u16 elems_req, | |||
| 478 | 478 | ||
| 479 | /** | 479 | /** |
| 480 | * ice_aq_resume_sched_elems - resume scheduler elements | 480 | * ice_aq_resume_sched_elems - resume scheduler elements |
| 481 | * @hw: pointer to the hw struct | 481 | * @hw: pointer to the HW struct |
| 482 | * @elems_req: number of elements to resume | 482 | * @elems_req: number of elements to resume |
| 483 | * @buf: pointer to buffer | 483 | * @buf: pointer to buffer |
| 484 | * @buf_size: buffer size in bytes | 484 | * @buf_size: buffer size in bytes |
| @@ -499,7 +499,7 @@ ice_aq_resume_sched_elems(struct ice_hw *hw, u16 elems_req, | |||
| 499 | 499 | ||
| 500 | /** | 500 | /** |
| 501 | * ice_aq_query_sched_res - query scheduler resource | 501 | * ice_aq_query_sched_res - query scheduler resource |
| 502 | * @hw: pointer to the hw struct | 502 | * @hw: pointer to the HW struct |
| 503 | * @buf_size: buffer size in bytes | 503 | * @buf_size: buffer size in bytes |
| 504 | * @buf: pointer to buffer | 504 | * @buf: pointer to buffer |
| 505 | * @cd: pointer to command details structure or NULL | 505 | * @cd: pointer to command details structure or NULL |
| @@ -518,13 +518,13 @@ ice_aq_query_sched_res(struct ice_hw *hw, u16 buf_size, | |||
| 518 | } | 518 | } |
| 519 | 519 | ||
| 520 | /** | 520 | /** |
| 521 | * ice_sched_suspend_resume_elems - suspend or resume hw nodes | 521 | * ice_sched_suspend_resume_elems - suspend or resume HW nodes |
| 522 | * @hw: pointer to the hw struct | 522 | * @hw: pointer to the HW struct |
| 523 | * @num_nodes: number of nodes | 523 | * @num_nodes: number of nodes |
| 524 | * @node_teids: array of node teids to be suspended or resumed | 524 | * @node_teids: array of node teids to be suspended or resumed |
| 525 | * @suspend: true means suspend / false means resume | 525 | * @suspend: true means suspend / false means resume |
| 526 | * | 526 | * |
| 527 | * This function suspends or resumes hw nodes | 527 | * This function suspends or resumes HW nodes |
| 528 | */ | 528 | */ |
| 529 | static enum ice_status | 529 | static enum ice_status |
| 530 | ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids, | 530 | ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids, |
| @@ -558,10 +558,10 @@ ice_sched_suspend_resume_elems(struct ice_hw *hw, u8 num_nodes, u32 *node_teids, | |||
| 558 | } | 558 | } |
| 559 | 559 | ||
| 560 | /** | 560 | /** |
| 561 | * ice_sched_clear_agg - clears the agg related information | 561 | * ice_sched_clear_agg - clears the aggregator related information |
| 562 | * @hw: pointer to the hardware structure | 562 | * @hw: pointer to the hardware structure |
| 563 | * | 563 | * |
| 564 | * This function removes agg list and free up agg related memory | 564 | * This function removes aggregator list and free up aggregator related memory |
| 565 | * previously allocated. | 565 | * previously allocated. |
| 566 | */ | 566 | */ |
| 567 | void ice_sched_clear_agg(struct ice_hw *hw) | 567 | void ice_sched_clear_agg(struct ice_hw *hw) |
| @@ -619,7 +619,7 @@ void ice_sched_clear_port(struct ice_port_info *pi) | |||
| 619 | 619 | ||
| 620 | /** | 620 | /** |
| 621 | * ice_sched_cleanup_all - cleanup scheduler elements from SW DB for all ports | 621 | * ice_sched_cleanup_all - cleanup scheduler elements from SW DB for all ports |
| 622 | * @hw: pointer to the hw struct | 622 | * @hw: pointer to the HW struct |
| 623 | * | 623 | * |
| 624 | * Cleanup scheduling elements from SW DB for all the ports | 624 | * Cleanup scheduling elements from SW DB for all the ports |
| 625 | */ | 625 | */ |
| @@ -643,16 +643,16 @@ void ice_sched_cleanup_all(struct ice_hw *hw) | |||
| 643 | } | 643 | } |
| 644 | 644 | ||
| 645 | /** | 645 | /** |
| 646 | * ice_sched_add_elems - add nodes to hw and SW DB | 646 | * ice_sched_add_elems - add nodes to HW and SW DB |
| 647 | * @pi: port information structure | 647 | * @pi: port information structure |
| 648 | * @tc_node: pointer to the branch node | 648 | * @tc_node: pointer to the branch node |
| 649 | * @parent: pointer to the parent node | 649 | * @parent: pointer to the parent node |
| 650 | * @layer: layer number to add nodes | 650 | * @layer: layer number to add nodes |
| 651 | * @num_nodes: number of nodes | 651 | * @num_nodes: number of nodes |
| 652 | * @num_nodes_added: pointer to num nodes added | 652 | * @num_nodes_added: pointer to num nodes added |
| 653 | * @first_node_teid: if new nodes are added then return the teid of first node | 653 | * @first_node_teid: if new nodes are added then return the TEID of first node |
| 654 | * | 654 | * |
| 655 | * This function add nodes to hw as well as to SW DB for a given layer | 655 | * This function add nodes to HW as well as to SW DB for a given layer |
| 656 | */ | 656 | */ |
| 657 | static enum ice_status | 657 | static enum ice_status |
| 658 | ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node, | 658 | ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node, |
| @@ -746,7 +746,7 @@ ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node, | |||
| 746 | * @parent: pointer to parent node | 746 | * @parent: pointer to parent node |
| 747 | * @layer: layer number to add nodes | 747 | * @layer: layer number to add nodes |
| 748 | * @num_nodes: number of nodes to be added | 748 | * @num_nodes: number of nodes to be added |
| 749 | * @first_node_teid: pointer to the first node teid | 749 | * @first_node_teid: pointer to the first node TEID |
| 750 | * @num_nodes_added: pointer to number of nodes added | 750 | * @num_nodes_added: pointer to number of nodes added |
| 751 | * | 751 | * |
| 752 | * This function add nodes to a given layer. | 752 | * This function add nodes to a given layer. |
| @@ -798,7 +798,7 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi, | |||
| 798 | 798 | ||
| 799 | *num_nodes_added += num_added; | 799 | *num_nodes_added += num_added; |
| 800 | } | 800 | } |
| 801 | /* Don't modify the first node teid memory if the first node was | 801 | /* Don't modify the first node TEID memory if the first node was |
| 802 | * added already in the above call. Instead send some temp | 802 | * added already in the above call. Instead send some temp |
| 803 | * memory for all other recursive calls. | 803 | * memory for all other recursive calls. |
| 804 | */ | 804 | */ |
| @@ -830,7 +830,7 @@ ice_sched_add_nodes_to_layer(struct ice_port_info *pi, | |||
| 830 | 830 | ||
| 831 | /** | 831 | /** |
| 832 | * ice_sched_get_qgrp_layer - get the current queue group layer number | 832 | * ice_sched_get_qgrp_layer - get the current queue group layer number |
| 833 | * @hw: pointer to the hw struct | 833 | * @hw: pointer to the HW struct |
| 834 | * | 834 | * |
| 835 | * This function returns the current queue group layer number | 835 | * This function returns the current queue group layer number |
| 836 | */ | 836 | */ |
| @@ -842,7 +842,7 @@ static u8 ice_sched_get_qgrp_layer(struct ice_hw *hw) | |||
| 842 | 842 | ||
| 843 | /** | 843 | /** |
| 844 | * ice_sched_get_vsi_layer - get the current VSI layer number | 844 | * ice_sched_get_vsi_layer - get the current VSI layer number |
| 845 | * @hw: pointer to the hw struct | 845 | * @hw: pointer to the HW struct |
| 846 | * | 846 | * |
| 847 | * This function returns the current VSI layer number | 847 | * This function returns the current VSI layer number |
| 848 | */ | 848 | */ |
| @@ -853,7 +853,7 @@ static u8 ice_sched_get_vsi_layer(struct ice_hw *hw) | |||
| 853 | * 7 4 | 853 | * 7 4 |
| 854 | * 5 or less sw_entry_point_layer | 854 | * 5 or less sw_entry_point_layer |
| 855 | */ | 855 | */ |
| 856 | /* calculate the vsi layer based on number of layers. */ | 856 | /* calculate the VSI layer based on number of layers. */ |
| 857 | if (hw->num_tx_sched_layers > ICE_VSI_LAYER_OFFSET + 1) { | 857 | if (hw->num_tx_sched_layers > ICE_VSI_LAYER_OFFSET + 1) { |
| 858 | u8 layer = hw->num_tx_sched_layers - ICE_VSI_LAYER_OFFSET; | 858 | u8 layer = hw->num_tx_sched_layers - ICE_VSI_LAYER_OFFSET; |
| 859 | 859 | ||
| @@ -971,7 +971,7 @@ enum ice_status ice_sched_init_port(struct ice_port_info *pi) | |||
| 971 | goto err_init_port; | 971 | goto err_init_port; |
| 972 | } | 972 | } |
| 973 | 973 | ||
| 974 | /* If the last node is a leaf node then the index of the Q group | 974 | /* If the last node is a leaf node then the index of the queue group |
| 975 | * layer is two less than the number of elements. | 975 | * layer is two less than the number of elements. |
| 976 | */ | 976 | */ |
| 977 | if (num_elems > 2 && buf[0].generic[num_elems - 1].data.elem_type == | 977 | if (num_elems > 2 && buf[0].generic[num_elems - 1].data.elem_type == |
| @@ -1080,7 +1080,7 @@ sched_query_out: | |||
| 1080 | 1080 | ||
| 1081 | /** | 1081 | /** |
| 1082 | * ice_sched_find_node_in_subtree - Find node in part of base node subtree | 1082 | * ice_sched_find_node_in_subtree - Find node in part of base node subtree |
| 1083 | * @hw: pointer to the hw struct | 1083 | * @hw: pointer to the HW struct |
| 1084 | * @base: pointer to the base node | 1084 | * @base: pointer to the base node |
| 1085 | * @node: pointer to the node to search | 1085 | * @node: pointer to the node to search |
| 1086 | * | 1086 | * |
| @@ -1112,13 +1112,13 @@ ice_sched_find_node_in_subtree(struct ice_hw *hw, struct ice_sched_node *base, | |||
| 1112 | } | 1112 | } |
| 1113 | 1113 | ||
| 1114 | /** | 1114 | /** |
| 1115 | * ice_sched_get_free_qparent - Get a free lan or rdma q group node | 1115 | * ice_sched_get_free_qparent - Get a free LAN or RDMA queue group node |
| 1116 | * @pi: port information structure | 1116 | * @pi: port information structure |
| 1117 | * @vsi_handle: software VSI handle | 1117 | * @vsi_handle: software VSI handle |
| 1118 | * @tc: branch number | 1118 | * @tc: branch number |
| 1119 | * @owner: lan or rdma | 1119 | * @owner: LAN or RDMA |
| 1120 | * | 1120 | * |
| 1121 | * This function retrieves a free lan or rdma q group node | 1121 | * This function retrieves a free LAN or RDMA queue group node |
| 1122 | */ | 1122 | */ |
| 1123 | struct ice_sched_node * | 1123 | struct ice_sched_node * |
| 1124 | ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc, | 1124 | ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc, |
| @@ -1136,11 +1136,11 @@ ice_sched_get_free_qparent(struct ice_port_info *pi, u16 vsi_handle, u8 tc, | |||
| 1136 | if (!vsi_ctx) | 1136 | if (!vsi_ctx) |
| 1137 | return NULL; | 1137 | return NULL; |
| 1138 | vsi_node = vsi_ctx->sched.vsi_node[tc]; | 1138 | vsi_node = vsi_ctx->sched.vsi_node[tc]; |
| 1139 | /* validate invalid VSI id */ | 1139 | /* validate invalid VSI ID */ |
| 1140 | if (!vsi_node) | 1140 | if (!vsi_node) |
| 1141 | goto lan_q_exit; | 1141 | goto lan_q_exit; |
| 1142 | 1142 | ||
| 1143 | /* get the first q group node from VSI sub-tree */ | 1143 | /* get the first queue group node from VSI sub-tree */ |
| 1144 | qgrp_node = ice_sched_get_first_node(pi->hw, vsi_node, qgrp_layer); | 1144 | qgrp_node = ice_sched_get_first_node(pi->hw, vsi_node, qgrp_layer); |
| 1145 | while (qgrp_node) { | 1145 | while (qgrp_node) { |
| 1146 | /* make sure the qgroup node is part of the VSI subtree */ | 1146 | /* make sure the qgroup node is part of the VSI subtree */ |
| @@ -1156,12 +1156,12 @@ lan_q_exit: | |||
| 1156 | } | 1156 | } |
| 1157 | 1157 | ||
| 1158 | /** | 1158 | /** |
| 1159 | * ice_sched_get_vsi_node - Get a VSI node based on VSI id | 1159 | * ice_sched_get_vsi_node - Get a VSI node based on VSI ID |
| 1160 | * @hw: pointer to the hw struct | 1160 | * @hw: pointer to the HW struct |
| 1161 | * @tc_node: pointer to the TC node | 1161 | * @tc_node: pointer to the TC node |
| 1162 | * @vsi_handle: software VSI handle | 1162 | * @vsi_handle: software VSI handle |
| 1163 | * | 1163 | * |
| 1164 | * This function retrieves a VSI node for a given VSI id from a given | 1164 | * This function retrieves a VSI node for a given VSI ID from a given |
| 1165 | * TC branch | 1165 | * TC branch |
| 1166 | */ | 1166 | */ |
| 1167 | static struct ice_sched_node * | 1167 | static struct ice_sched_node * |
| @@ -1186,7 +1186,7 @@ ice_sched_get_vsi_node(struct ice_hw *hw, struct ice_sched_node *tc_node, | |||
| 1186 | 1186 | ||
| 1187 | /** | 1187 | /** |
| 1188 | * ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes | 1188 | * ice_sched_calc_vsi_child_nodes - calculate number of VSI child nodes |
| 1189 | * @hw: pointer to the hw struct | 1189 | * @hw: pointer to the HW struct |
| 1190 | * @num_qs: number of queues | 1190 | * @num_qs: number of queues |
| 1191 | * @num_nodes: num nodes array | 1191 | * @num_nodes: num nodes array |
| 1192 | * | 1192 | * |
| @@ -1202,7 +1202,7 @@ ice_sched_calc_vsi_child_nodes(struct ice_hw *hw, u16 num_qs, u16 *num_nodes) | |||
| 1202 | qgl = ice_sched_get_qgrp_layer(hw); | 1202 | qgl = ice_sched_get_qgrp_layer(hw); |
| 1203 | vsil = ice_sched_get_vsi_layer(hw); | 1203 | vsil = ice_sched_get_vsi_layer(hw); |
| 1204 | 1204 | ||
| 1205 | /* calculate num nodes from q group to VSI layer */ | 1205 | /* calculate num nodes from queue group to VSI layer */ |
| 1206 | for (i = qgl; i > vsil; i--) { | 1206 | for (i = qgl; i > vsil; i--) { |
| 1207 | /* round to the next integer if there is a remainder */ | 1207 | /* round to the next integer if there is a remainder */ |
| 1208 | num = DIV_ROUND_UP(num, hw->max_children[i]); | 1208 | num = DIV_ROUND_UP(num, hw->max_children[i]); |
| @@ -1218,10 +1218,10 @@ ice_sched_calc_vsi_child_nodes(struct ice_hw *hw, u16 num_qs, u16 *num_nodes) | |||
| 1218 | * @vsi_handle: software VSI handle | 1218 | * @vsi_handle: software VSI handle |
| 1219 | * @tc_node: pointer to the TC node | 1219 | * @tc_node: pointer to the TC node |
| 1220 | * @num_nodes: pointer to the num nodes that needs to be added per layer | 1220 | * @num_nodes: pointer to the num nodes that needs to be added per layer |
| 1221 | * @owner: node owner (lan or rdma) | 1221 | * @owner: node owner (LAN or RDMA) |
| 1222 | * | 1222 | * |
| 1223 | * This function adds the VSI child nodes to tree. It gets called for | 1223 | * This function adds the VSI child nodes to tree. It gets called for |
| 1224 | * lan and rdma separately. | 1224 | * LAN and RDMA separately. |
| 1225 | */ | 1225 | */ |
| 1226 | static enum ice_status | 1226 | static enum ice_status |
| 1227 | ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle, | 1227 | ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle, |
| @@ -1270,7 +1270,7 @@ ice_sched_add_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle, | |||
| 1270 | 1270 | ||
| 1271 | /** | 1271 | /** |
| 1272 | * ice_sched_calc_vsi_support_nodes - calculate number of VSI support nodes | 1272 | * ice_sched_calc_vsi_support_nodes - calculate number of VSI support nodes |
| 1273 | * @hw: pointer to the hw struct | 1273 | * @hw: pointer to the HW struct |
| 1274 | * @tc_node: pointer to TC node | 1274 | * @tc_node: pointer to TC node |
| 1275 | * @num_nodes: pointer to num nodes array | 1275 | * @num_nodes: pointer to num nodes array |
| 1276 | * | 1276 | * |
| @@ -1389,7 +1389,7 @@ ice_sched_add_vsi_to_topo(struct ice_port_info *pi, u16 vsi_handle, u8 tc) | |||
| 1389 | /* calculate number of supported nodes needed for this VSI */ | 1389 | /* calculate number of supported nodes needed for this VSI */ |
| 1390 | ice_sched_calc_vsi_support_nodes(hw, tc_node, num_nodes); | 1390 | ice_sched_calc_vsi_support_nodes(hw, tc_node, num_nodes); |
| 1391 | 1391 | ||
| 1392 | /* add vsi supported nodes to tc subtree */ | 1392 | /* add VSI supported nodes to TC subtree */ |
| 1393 | return ice_sched_add_vsi_support_nodes(pi, vsi_handle, tc_node, | 1393 | return ice_sched_add_vsi_support_nodes(pi, vsi_handle, tc_node, |
| 1394 | num_nodes); | 1394 | num_nodes); |
| 1395 | } | 1395 | } |
| @@ -1460,7 +1460,7 @@ ice_sched_update_vsi_child_nodes(struct ice_port_info *pi, u16 vsi_handle, | |||
| 1460 | * @vsi_handle: software VSI handle | 1460 | * @vsi_handle: software VSI handle |
| 1461 | * @tc: TC number | 1461 | * @tc: TC number |
| 1462 | * @maxqs: max number of queues | 1462 | * @maxqs: max number of queues |
| 1463 | * @owner: lan or rdma | 1463 | * @owner: LAN or RDMA |
| 1464 | * @enable: TC enabled or disabled | 1464 | * @enable: TC enabled or disabled |
| 1465 | * | 1465 | * |
| 1466 | * This function adds/updates VSI nodes based on the number of queues. If TC is | 1466 | * This function adds/updates VSI nodes based on the number of queues. If TC is |
| @@ -1485,7 +1485,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs, | |||
| 1485 | return ICE_ERR_PARAM; | 1485 | return ICE_ERR_PARAM; |
| 1486 | vsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle); | 1486 | vsi_node = ice_sched_get_vsi_node(hw, tc_node, vsi_handle); |
| 1487 | 1487 | ||
| 1488 | /* suspend the VSI if tc is not enabled */ | 1488 | /* suspend the VSI if TC is not enabled */ |
| 1489 | if (!enable) { | 1489 | if (!enable) { |
| 1490 | if (vsi_node && vsi_node->in_use) { | 1490 | if (vsi_node && vsi_node->in_use) { |
| 1491 | u32 teid = le32_to_cpu(vsi_node->info.node_teid); | 1491 | u32 teid = le32_to_cpu(vsi_node->info.node_teid); |
| @@ -1536,7 +1536,7 @@ ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs, | |||
| 1536 | } | 1536 | } |
| 1537 | 1537 | ||
| 1538 | /** | 1538 | /** |
| 1539 | * ice_sched_rm_agg_vsi_entry - remove agg related VSI info entry | 1539 | * ice_sched_rm_agg_vsi_entry - remove aggregator related VSI info entry |
| 1540 | * @pi: port information structure | 1540 | * @pi: port information structure |
| 1541 | * @vsi_handle: software VSI handle | 1541 | * @vsi_handle: software VSI handle |
| 1542 | * | 1542 | * |
| @@ -1641,7 +1641,7 @@ ice_sched_rm_vsi_cfg(struct ice_port_info *pi, u16 vsi_handle, u8 owner) | |||
| 1641 | ice_free_sched_node(pi, vsi_node); | 1641 | ice_free_sched_node(pi, vsi_node); |
| 1642 | vsi_ctx->sched.vsi_node[i] = NULL; | 1642 | vsi_ctx->sched.vsi_node[i] = NULL; |
| 1643 | 1643 | ||
| 1644 | /* clean up agg related vsi info if any */ | 1644 | /* clean up aggregator related VSI info if any */ |
| 1645 | ice_sched_rm_agg_vsi_info(pi, vsi_handle); | 1645 | ice_sched_rm_agg_vsi_info(pi, vsi_handle); |
| 1646 | } | 1646 | } |
| 1647 | if (owner == ICE_SCHED_NODE_OWNER_LAN) | 1647 | if (owner == ICE_SCHED_NODE_OWNER_LAN) |
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c index 7dcd9ddf54f7..ad6bb0fce5d1 100644 --- a/drivers/net/ethernet/intel/ice/ice_switch.c +++ b/drivers/net/ethernet/intel/ice/ice_switch.c | |||
| @@ -19,7 +19,7 @@ | |||
| 19 | * byte 6 = 0x2: to identify it as locally administered SA MAC | 19 | * byte 6 = 0x2: to identify it as locally administered SA MAC |
| 20 | * byte 12 = 0x81 & byte 13 = 0x00: | 20 | * byte 12 = 0x81 & byte 13 = 0x00: |
| 21 | * In case of VLAN filter first two bytes defines ether type (0x8100) | 21 | * In case of VLAN filter first two bytes defines ether type (0x8100) |
| 22 | * and remaining two bytes are placeholder for programming a given VLAN id | 22 | * and remaining two bytes are placeholder for programming a given VLAN ID |
| 23 | * In case of Ether type filter it is treated as header without VLAN tag | 23 | * In case of Ether type filter it is treated as header without VLAN tag |
| 24 | * and byte 12 and 13 is used to program a given Ether type instead | 24 | * and byte 12 and 13 is used to program a given Ether type instead |
| 25 | */ | 25 | */ |
| @@ -51,7 +51,7 @@ static const u8 dummy_eth_header[DUMMY_ETH_HDR_LEN] = { 0x2, 0, 0, 0, 0, 0, | |||
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * ice_aq_alloc_free_res - command to allocate/free resources | 53 | * ice_aq_alloc_free_res - command to allocate/free resources |
| 54 | * @hw: pointer to the hw struct | 54 | * @hw: pointer to the HW struct |
| 55 | * @num_entries: number of resource entries in buffer | 55 | * @num_entries: number of resource entries in buffer |
| 56 | * @buf: Indirect buffer to hold data parameters and response | 56 | * @buf: Indirect buffer to hold data parameters and response |
| 57 | * @buf_size: size of buffer for indirect commands | 57 | * @buf_size: size of buffer for indirect commands |
| @@ -87,7 +87,7 @@ ice_aq_alloc_free_res(struct ice_hw *hw, u16 num_entries, | |||
| 87 | 87 | ||
| 88 | /** | 88 | /** |
| 89 | * ice_init_def_sw_recp - initialize the recipe book keeping tables | 89 | * ice_init_def_sw_recp - initialize the recipe book keeping tables |
| 90 | * @hw: pointer to the hw struct | 90 | * @hw: pointer to the HW struct |
| 91 | * | 91 | * |
| 92 | * Allocate memory for the entire recipe table and initialize the structures/ | 92 | * Allocate memory for the entire recipe table and initialize the structures/ |
| 93 | * entries corresponding to basic recipes. | 93 | * entries corresponding to basic recipes. |
| @@ -163,7 +163,7 @@ ice_aq_get_sw_cfg(struct ice_hw *hw, struct ice_aqc_get_sw_cfg_resp *buf, | |||
| 163 | 163 | ||
| 164 | /** | 164 | /** |
| 165 | * ice_aq_add_vsi | 165 | * ice_aq_add_vsi |
| 166 | * @hw: pointer to the hw struct | 166 | * @hw: pointer to the HW struct |
| 167 | * @vsi_ctx: pointer to a VSI context struct | 167 | * @vsi_ctx: pointer to a VSI context struct |
| 168 | * @cd: pointer to command details structure or NULL | 168 | * @cd: pointer to command details structure or NULL |
| 169 | * | 169 | * |
| @@ -206,7 +206,7 @@ ice_aq_add_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx, | |||
| 206 | 206 | ||
| 207 | /** | 207 | /** |
| 208 | * ice_aq_free_vsi | 208 | * ice_aq_free_vsi |
| 209 | * @hw: pointer to the hw struct | 209 | * @hw: pointer to the HW struct |
| 210 | * @vsi_ctx: pointer to a VSI context struct | 210 | * @vsi_ctx: pointer to a VSI context struct |
| 211 | * @keep_vsi_alloc: keep VSI allocation as part of this PF's resources | 211 | * @keep_vsi_alloc: keep VSI allocation as part of this PF's resources |
| 212 | * @cd: pointer to command details structure or NULL | 212 | * @cd: pointer to command details structure or NULL |
| @@ -242,7 +242,7 @@ ice_aq_free_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx, | |||
| 242 | 242 | ||
| 243 | /** | 243 | /** |
| 244 | * ice_aq_update_vsi | 244 | * ice_aq_update_vsi |
| 245 | * @hw: pointer to the hw struct | 245 | * @hw: pointer to the HW struct |
| 246 | * @vsi_ctx: pointer to a VSI context struct | 246 | * @vsi_ctx: pointer to a VSI context struct |
| 247 | * @cd: pointer to command details structure or NULL | 247 | * @cd: pointer to command details structure or NULL |
| 248 | * | 248 | * |
| @@ -279,7 +279,7 @@ ice_aq_update_vsi(struct ice_hw *hw, struct ice_vsi_ctx *vsi_ctx, | |||
| 279 | 279 | ||
| 280 | /** | 280 | /** |
| 281 | * ice_is_vsi_valid - check whether the VSI is valid or not | 281 | * ice_is_vsi_valid - check whether the VSI is valid or not |
| 282 | * @hw: pointer to the hw struct | 282 | * @hw: pointer to the HW struct |
| 283 | * @vsi_handle: VSI handle | 283 | * @vsi_handle: VSI handle |
| 284 | * | 284 | * |
| 285 | * check whether the VSI is valid or not | 285 | * check whether the VSI is valid or not |
| @@ -290,11 +290,11 @@ bool ice_is_vsi_valid(struct ice_hw *hw, u16 vsi_handle) | |||
| 290 | } | 290 | } |
| 291 | 291 | ||
| 292 | /** | 292 | /** |
| 293 | * ice_get_hw_vsi_num - return the hw VSI number | 293 | * ice_get_hw_vsi_num - return the HW VSI number |
| 294 | * @hw: pointer to the hw struct | 294 | * @hw: pointer to the HW struct |
| 295 | * @vsi_handle: VSI handle | 295 | * @vsi_handle: VSI handle |
| 296 | * | 296 | * |
| 297 | * return the hw VSI number | 297 | * return the HW VSI number |
| 298 | * Caution: call this function only if VSI is valid (ice_is_vsi_valid) | 298 | * Caution: call this function only if VSI is valid (ice_is_vsi_valid) |
| 299 | */ | 299 | */ |
| 300 | u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle) | 300 | u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle) |
| @@ -304,7 +304,7 @@ u16 ice_get_hw_vsi_num(struct ice_hw *hw, u16 vsi_handle) | |||
| 304 | 304 | ||
| 305 | /** | 305 | /** |
| 306 | * ice_get_vsi_ctx - return the VSI context entry for a given VSI handle | 306 | * ice_get_vsi_ctx - return the VSI context entry for a given VSI handle |
| 307 | * @hw: pointer to the hw struct | 307 | * @hw: pointer to the HW struct |
| 308 | * @vsi_handle: VSI handle | 308 | * @vsi_handle: VSI handle |
| 309 | * | 309 | * |
| 310 | * return the VSI context entry for a given VSI handle | 310 | * return the VSI context entry for a given VSI handle |
| @@ -316,7 +316,7 @@ struct ice_vsi_ctx *ice_get_vsi_ctx(struct ice_hw *hw, u16 vsi_handle) | |||
| 316 | 316 | ||
| 317 | /** | 317 | /** |
| 318 | * ice_save_vsi_ctx - save the VSI context for a given VSI handle | 318 | * ice_save_vsi_ctx - save the VSI context for a given VSI handle |
| 319 | * @hw: pointer to the hw struct | 319 | * @hw: pointer to the HW struct |
| 320 | * @vsi_handle: VSI handle | 320 | * @vsi_handle: VSI handle |
| 321 | * @vsi: VSI context pointer | 321 | * @vsi: VSI context pointer |
| 322 | * | 322 | * |
| @@ -330,7 +330,7 @@ ice_save_vsi_ctx(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi) | |||
| 330 | 330 | ||
| 331 | /** | 331 | /** |
| 332 | * ice_clear_vsi_ctx - clear the VSI context entry | 332 | * ice_clear_vsi_ctx - clear the VSI context entry |
| 333 | * @hw: pointer to the hw struct | 333 | * @hw: pointer to the HW struct |
| 334 | * @vsi_handle: VSI handle | 334 | * @vsi_handle: VSI handle |
| 335 | * | 335 | * |
| 336 | * clear the VSI context entry | 336 | * clear the VSI context entry |
| @@ -348,7 +348,7 @@ static void ice_clear_vsi_ctx(struct ice_hw *hw, u16 vsi_handle) | |||
| 348 | 348 | ||
| 349 | /** | 349 | /** |
| 350 | * ice_clear_all_vsi_ctx - clear all the VSI context entries | 350 | * ice_clear_all_vsi_ctx - clear all the VSI context entries |
| 351 | * @hw: pointer to the hw struct | 351 | * @hw: pointer to the HW struct |
| 352 | */ | 352 | */ |
| 353 | void ice_clear_all_vsi_ctx(struct ice_hw *hw) | 353 | void ice_clear_all_vsi_ctx(struct ice_hw *hw) |
| 354 | { | 354 | { |
| @@ -360,7 +360,7 @@ void ice_clear_all_vsi_ctx(struct ice_hw *hw) | |||
| 360 | 360 | ||
| 361 | /** | 361 | /** |
| 362 | * ice_add_vsi - add VSI context to the hardware and VSI handle list | 362 | * ice_add_vsi - add VSI context to the hardware and VSI handle list |
| 363 | * @hw: pointer to the hw struct | 363 | * @hw: pointer to the HW struct |
| 364 | * @vsi_handle: unique VSI handle provided by drivers | 364 | * @vsi_handle: unique VSI handle provided by drivers |
| 365 | * @vsi_ctx: pointer to a VSI context struct | 365 | * @vsi_ctx: pointer to a VSI context struct |
| 366 | * @cd: pointer to command details structure or NULL | 366 | * @cd: pointer to command details structure or NULL |
| @@ -383,7 +383,7 @@ ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx, | |||
| 383 | return status; | 383 | return status; |
| 384 | tmp_vsi_ctx = ice_get_vsi_ctx(hw, vsi_handle); | 384 | tmp_vsi_ctx = ice_get_vsi_ctx(hw, vsi_handle); |
| 385 | if (!tmp_vsi_ctx) { | 385 | if (!tmp_vsi_ctx) { |
| 386 | /* Create a new vsi context */ | 386 | /* Create a new VSI context */ |
| 387 | tmp_vsi_ctx = devm_kzalloc(ice_hw_to_dev(hw), | 387 | tmp_vsi_ctx = devm_kzalloc(ice_hw_to_dev(hw), |
| 388 | sizeof(*tmp_vsi_ctx), GFP_KERNEL); | 388 | sizeof(*tmp_vsi_ctx), GFP_KERNEL); |
| 389 | if (!tmp_vsi_ctx) { | 389 | if (!tmp_vsi_ctx) { |
| @@ -403,7 +403,7 @@ ice_add_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx, | |||
| 403 | 403 | ||
| 404 | /** | 404 | /** |
| 405 | * ice_free_vsi- free VSI context from hardware and VSI handle list | 405 | * ice_free_vsi- free VSI context from hardware and VSI handle list |
| 406 | * @hw: pointer to the hw struct | 406 | * @hw: pointer to the HW struct |
| 407 | * @vsi_handle: unique VSI handle | 407 | * @vsi_handle: unique VSI handle |
| 408 | * @vsi_ctx: pointer to a VSI context struct | 408 | * @vsi_ctx: pointer to a VSI context struct |
| 409 | * @keep_vsi_alloc: keep VSI allocation as part of this PF's resources | 409 | * @keep_vsi_alloc: keep VSI allocation as part of this PF's resources |
| @@ -428,7 +428,7 @@ ice_free_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx, | |||
| 428 | 428 | ||
| 429 | /** | 429 | /** |
| 430 | * ice_update_vsi | 430 | * ice_update_vsi |
| 431 | * @hw: pointer to the hw struct | 431 | * @hw: pointer to the HW struct |
| 432 | * @vsi_handle: unique VSI handle | 432 | * @vsi_handle: unique VSI handle |
| 433 | * @vsi_ctx: pointer to a VSI context struct | 433 | * @vsi_ctx: pointer to a VSI context struct |
| 434 | * @cd: pointer to command details structure or NULL | 434 | * @cd: pointer to command details structure or NULL |
| @@ -447,8 +447,8 @@ ice_update_vsi(struct ice_hw *hw, u16 vsi_handle, struct ice_vsi_ctx *vsi_ctx, | |||
| 447 | 447 | ||
| 448 | /** | 448 | /** |
| 449 | * ice_aq_alloc_free_vsi_list | 449 | * ice_aq_alloc_free_vsi_list |
| 450 | * @hw: pointer to the hw struct | 450 | * @hw: pointer to the HW struct |
| 451 | * @vsi_list_id: VSI list id returned or used for lookup | 451 | * @vsi_list_id: VSI list ID returned or used for lookup |
| 452 | * @lkup_type: switch rule filter lookup type | 452 | * @lkup_type: switch rule filter lookup type |
| 453 | * @opc: switch rules population command type - pass in the command opcode | 453 | * @opc: switch rules population command type - pass in the command opcode |
| 454 | * | 454 | * |
| @@ -504,7 +504,7 @@ ice_aq_alloc_free_vsi_list_exit: | |||
| 504 | 504 | ||
| 505 | /** | 505 | /** |
| 506 | * ice_aq_sw_rules - add/update/remove switch rules | 506 | * ice_aq_sw_rules - add/update/remove switch rules |
| 507 | * @hw: pointer to the hw struct | 507 | * @hw: pointer to the HW struct |
| 508 | * @rule_list: pointer to switch rule population list | 508 | * @rule_list: pointer to switch rule population list |
| 509 | * @rule_list_sz: total size of the rule list in bytes | 509 | * @rule_list_sz: total size of the rule list in bytes |
| 510 | * @num_rules: number of switch rules in the rule_list | 510 | * @num_rules: number of switch rules in the rule_list |
| @@ -653,7 +653,7 @@ static void ice_fill_sw_info(struct ice_hw *hw, struct ice_fltr_info *fi) | |||
| 653 | * 1. The switch is a VEB AND | 653 | * 1. The switch is a VEB AND |
| 654 | * 2 | 654 | * 2 |
| 655 | * 2.1 The lookup is a directional lookup like ethertype, | 655 | * 2.1 The lookup is a directional lookup like ethertype, |
| 656 | * promiscuous, ethertype-mac, promiscuous-vlan | 656 | * promiscuous, ethertype-MAC, promiscuous-VLAN |
| 657 | * and default-port OR | 657 | * and default-port OR |
| 658 | * 2.2 The lookup is VLAN, OR | 658 | * 2.2 The lookup is VLAN, OR |
| 659 | * 2.3 The lookup is MAC with mcast or bcast addr for MAC, OR | 659 | * 2.3 The lookup is MAC with mcast or bcast addr for MAC, OR |
| @@ -821,7 +821,7 @@ ice_fill_sw_rule(struct ice_hw *hw, struct ice_fltr_info *f_info, | |||
| 821 | * @hw: pointer to the hardware structure | 821 | * @hw: pointer to the hardware structure |
| 822 | * @m_ent: the management entry for which sw marker needs to be added | 822 | * @m_ent: the management entry for which sw marker needs to be added |
| 823 | * @sw_marker: sw marker to tag the Rx descriptor with | 823 | * @sw_marker: sw marker to tag the Rx descriptor with |
| 824 | * @l_id: large action resource id | 824 | * @l_id: large action resource ID |
| 825 | * | 825 | * |
| 826 | * Create a large action to hold software marker and update the switch rule | 826 | * Create a large action to hold software marker and update the switch rule |
| 827 | * entry pointed by m_ent with newly created large action | 827 | * entry pointed by m_ent with newly created large action |
| @@ -833,8 +833,8 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent, | |||
| 833 | struct ice_aqc_sw_rules_elem *lg_act, *rx_tx; | 833 | struct ice_aqc_sw_rules_elem *lg_act, *rx_tx; |
| 834 | /* For software marker we need 3 large actions | 834 | /* For software marker we need 3 large actions |
| 835 | * 1. FWD action: FWD TO VSI or VSI LIST | 835 | * 1. FWD action: FWD TO VSI or VSI LIST |
| 836 | * 2. GENERIC VALUE action to hold the profile id | 836 | * 2. GENERIC VALUE action to hold the profile ID |
| 837 | * 3. GENERIC VALUE action to hold the software marker id | 837 | * 3. GENERIC VALUE action to hold the software marker ID |
| 838 | */ | 838 | */ |
| 839 | const u16 num_lg_acts = 3; | 839 | const u16 num_lg_acts = 3; |
| 840 | enum ice_status status; | 840 | enum ice_status status; |
| @@ -897,13 +897,13 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent, | |||
| 897 | ice_fill_sw_rule(hw, &m_ent->fltr_info, rx_tx, | 897 | ice_fill_sw_rule(hw, &m_ent->fltr_info, rx_tx, |
| 898 | ice_aqc_opc_update_sw_rules); | 898 | ice_aqc_opc_update_sw_rules); |
| 899 | 899 | ||
| 900 | /* Update the action to point to the large action id */ | 900 | /* Update the action to point to the large action ID */ |
| 901 | rx_tx->pdata.lkup_tx_rx.act = | 901 | rx_tx->pdata.lkup_tx_rx.act = |
| 902 | cpu_to_le32(ICE_SINGLE_ACT_PTR | | 902 | cpu_to_le32(ICE_SINGLE_ACT_PTR | |
| 903 | ((l_id << ICE_SINGLE_ACT_PTR_VAL_S) & | 903 | ((l_id << ICE_SINGLE_ACT_PTR_VAL_S) & |
| 904 | ICE_SINGLE_ACT_PTR_VAL_M)); | 904 | ICE_SINGLE_ACT_PTR_VAL_M)); |
| 905 | 905 | ||
| 906 | /* Use the filter rule id of the previously created rule with single | 906 | /* Use the filter rule ID of the previously created rule with single |
| 907 | * act. Once the update happens, hardware will treat this as large | 907 | * act. Once the update happens, hardware will treat this as large |
| 908 | * action | 908 | * action |
| 909 | */ | 909 | */ |
| @@ -926,10 +926,10 @@ ice_add_marker_act(struct ice_hw *hw, struct ice_fltr_mgmt_list_entry *m_ent, | |||
| 926 | * @hw: pointer to the hardware structure | 926 | * @hw: pointer to the hardware structure |
| 927 | * @vsi_handle_arr: array of VSI handles to set in the VSI mapping | 927 | * @vsi_handle_arr: array of VSI handles to set in the VSI mapping |
| 928 | * @num_vsi: number of VSI handles in the array | 928 | * @num_vsi: number of VSI handles in the array |
| 929 | * @vsi_list_id: VSI list id generated as part of allocate resource | 929 | * @vsi_list_id: VSI list ID generated as part of allocate resource |
| 930 | * | 930 | * |
| 931 | * Helper function to create a new entry of VSI list id to VSI mapping | 931 | * Helper function to create a new entry of VSI list ID to VSI mapping |
| 932 | * using the given VSI list id | 932 | * using the given VSI list ID |
| 933 | */ | 933 | */ |
| 934 | static struct ice_vsi_list_map_info * | 934 | static struct ice_vsi_list_map_info * |
| 935 | ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, | 935 | ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, |
| @@ -957,13 +957,13 @@ ice_create_vsi_list_map(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, | |||
| 957 | * @hw: pointer to the hardware structure | 957 | * @hw: pointer to the hardware structure |
| 958 | * @vsi_handle_arr: array of VSI handles to form a VSI list | 958 | * @vsi_handle_arr: array of VSI handles to form a VSI list |
| 959 | * @num_vsi: number of VSI handles in the array | 959 | * @num_vsi: number of VSI handles in the array |
| 960 | * @vsi_list_id: VSI list id generated as part of allocate resource | 960 | * @vsi_list_id: VSI list ID generated as part of allocate resource |
| 961 | * @remove: Boolean value to indicate if this is a remove action | 961 | * @remove: Boolean value to indicate if this is a remove action |
| 962 | * @opc: switch rules population command type - pass in the command opcode | 962 | * @opc: switch rules population command type - pass in the command opcode |
| 963 | * @lkup_type: lookup type of the filter | 963 | * @lkup_type: lookup type of the filter |
| 964 | * | 964 | * |
| 965 | * Call AQ command to add a new switch rule or update existing switch rule | 965 | * Call AQ command to add a new switch rule or update existing switch rule |
| 966 | * using the given VSI list id | 966 | * using the given VSI list ID |
| 967 | */ | 967 | */ |
| 968 | static enum ice_status | 968 | static enum ice_status |
| 969 | ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, | 969 | ice_update_vsi_list_rule(struct ice_hw *hw, u16 *vsi_handle_arr, u16 num_vsi, |
| @@ -1020,7 +1020,7 @@ exit: | |||
| 1020 | 1020 | ||
| 1021 | /** | 1021 | /** |
| 1022 | * ice_create_vsi_list_rule - Creates and populates a VSI list rule | 1022 | * ice_create_vsi_list_rule - Creates and populates a VSI list rule |
| 1023 | * @hw: pointer to the hw struct | 1023 | * @hw: pointer to the HW struct |
| 1024 | * @vsi_handle_arr: array of VSI handles to form a VSI list | 1024 | * @vsi_handle_arr: array of VSI handles to form a VSI list |
| 1025 | * @num_vsi: number of VSI handles in the array | 1025 | * @num_vsi: number of VSI handles in the array |
| 1026 | * @vsi_list_id: stores the ID of the VSI list to be created | 1026 | * @vsi_list_id: stores the ID of the VSI list to be created |
| @@ -1114,7 +1114,7 @@ ice_create_pkt_fwd_rule_exit: | |||
| 1114 | * @f_info: filter information for switch rule | 1114 | * @f_info: filter information for switch rule |
| 1115 | * | 1115 | * |
| 1116 | * Call AQ command to update a previously created switch rule with a | 1116 | * Call AQ command to update a previously created switch rule with a |
| 1117 | * VSI list id | 1117 | * VSI list ID |
| 1118 | */ | 1118 | */ |
| 1119 | static enum ice_status | 1119 | static enum ice_status |
| 1120 | ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info) | 1120 | ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info) |
| @@ -1141,7 +1141,7 @@ ice_update_pkt_fwd_rule(struct ice_hw *hw, struct ice_fltr_info *f_info) | |||
| 1141 | 1141 | ||
| 1142 | /** | 1142 | /** |
| 1143 | * ice_update_sw_rule_bridge_mode | 1143 | * ice_update_sw_rule_bridge_mode |
| 1144 | * @hw: pointer to the hw struct | 1144 | * @hw: pointer to the HW struct |
| 1145 | * | 1145 | * |
| 1146 | * Updates unicast switch filter rules based on VEB/VEPA mode | 1146 | * Updates unicast switch filter rules based on VEB/VEPA mode |
| 1147 | */ | 1147 | */ |
| @@ -1196,7 +1196,7 @@ enum ice_status ice_update_sw_rule_bridge_mode(struct ice_hw *hw) | |||
| 1196 | * Allocate a new VSI list and add two VSIs | 1196 | * Allocate a new VSI list and add two VSIs |
| 1197 | * to this list using switch rule command | 1197 | * to this list using switch rule command |
| 1198 | * Update the previously created switch rule with the | 1198 | * Update the previously created switch rule with the |
| 1199 | * newly created VSI list id | 1199 | * newly created VSI list ID |
| 1200 | * if a VSI list was previously created | 1200 | * if a VSI list was previously created |
| 1201 | * Add the new VSI to the previously created VSI list set | 1201 | * Add the new VSI to the previously created VSI list set |
| 1202 | * using the update switch rule command | 1202 | * using the update switch rule command |
| @@ -1277,7 +1277,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, | |||
| 1277 | return 0; | 1277 | return 0; |
| 1278 | 1278 | ||
| 1279 | /* Update the previously created VSI list set with | 1279 | /* Update the previously created VSI list set with |
| 1280 | * the new VSI id passed in | 1280 | * the new VSI ID passed in |
| 1281 | */ | 1281 | */ |
| 1282 | vsi_list_id = cur_fltr->fwd_id.vsi_list_id; | 1282 | vsi_list_id = cur_fltr->fwd_id.vsi_list_id; |
| 1283 | opcode = ice_aqc_opc_update_sw_rules; | 1283 | opcode = ice_aqc_opc_update_sw_rules; |
| @@ -1285,7 +1285,7 @@ ice_add_update_vsi_list(struct ice_hw *hw, | |||
| 1285 | status = ice_update_vsi_list_rule(hw, &vsi_handle, 1, | 1285 | status = ice_update_vsi_list_rule(hw, &vsi_handle, 1, |
| 1286 | vsi_list_id, false, opcode, | 1286 | vsi_list_id, false, opcode, |
| 1287 | new_fltr->lkup_type); | 1287 | new_fltr->lkup_type); |
| 1288 | /* update VSI list mapping info with new VSI id */ | 1288 | /* update VSI list mapping info with new VSI ID */ |
| 1289 | if (!status) | 1289 | if (!status) |
| 1290 | set_bit(vsi_handle, m_entry->vsi_list_info->vsi_map); | 1290 | set_bit(vsi_handle, m_entry->vsi_list_info->vsi_map); |
| 1291 | } | 1291 | } |
| @@ -1327,7 +1327,7 @@ ice_find_rule_entry(struct ice_hw *hw, u8 recp_id, struct ice_fltr_info *f_info) | |||
| 1327 | * @hw: pointer to the hardware structure | 1327 | * @hw: pointer to the hardware structure |
| 1328 | * @recp_id: lookup type for which VSI lists needs to be searched | 1328 | * @recp_id: lookup type for which VSI lists needs to be searched |
| 1329 | * @vsi_handle: VSI handle to be found in VSI list | 1329 | * @vsi_handle: VSI handle to be found in VSI list |
| 1330 | * @vsi_list_id: VSI list id found containing vsi_handle | 1330 | * @vsi_list_id: VSI list ID found containing vsi_handle |
| 1331 | * | 1331 | * |
| 1332 | * Helper function to search a VSI list with single entry containing given VSI | 1332 | * Helper function to search a VSI list with single entry containing given VSI |
| 1333 | * handle element. This can be extended further to search VSI list with more | 1333 | * handle element. This can be extended further to search VSI list with more |
| @@ -1358,7 +1358,7 @@ ice_find_vsi_list_entry(struct ice_hw *hw, u8 recp_id, u16 vsi_handle, | |||
| 1358 | /** | 1358 | /** |
| 1359 | * ice_add_rule_internal - add rule for a given lookup type | 1359 | * ice_add_rule_internal - add rule for a given lookup type |
| 1360 | * @hw: pointer to the hardware structure | 1360 | * @hw: pointer to the hardware structure |
| 1361 | * @recp_id: lookup type (recipe id) for which rule has to be added | 1361 | * @recp_id: lookup type (recipe ID) for which rule has to be added |
| 1362 | * @f_entry: structure containing MAC forwarding information | 1362 | * @f_entry: structure containing MAC forwarding information |
| 1363 | * | 1363 | * |
| 1364 | * Adds or updates the rule lists for a given recipe | 1364 | * Adds or updates the rule lists for a given recipe |
| @@ -1403,7 +1403,7 @@ ice_add_rule_internal(struct ice_hw *hw, u8 recp_id, | |||
| 1403 | /** | 1403 | /** |
| 1404 | * ice_remove_vsi_list_rule | 1404 | * ice_remove_vsi_list_rule |
| 1405 | * @hw: pointer to the hardware structure | 1405 | * @hw: pointer to the hardware structure |
| 1406 | * @vsi_list_id: VSI list id generated as part of allocate resource | 1406 | * @vsi_list_id: VSI list ID generated as part of allocate resource |
| 1407 | * @lkup_type: switch rule filter lookup type | 1407 | * @lkup_type: switch rule filter lookup type |
| 1408 | * | 1408 | * |
| 1409 | * The VSI list should be emptied before this function is called to remove the | 1409 | * The VSI list should be emptied before this function is called to remove the |
| @@ -1528,7 +1528,7 @@ ice_rem_update_vsi_list(struct ice_hw *hw, u16 vsi_handle, | |||
| 1528 | /** | 1528 | /** |
| 1529 | * ice_remove_rule_internal - Remove a filter rule of a given type | 1529 | * ice_remove_rule_internal - Remove a filter rule of a given type |
| 1530 | * @hw: pointer to the hardware structure | 1530 | * @hw: pointer to the hardware structure |
| 1531 | * @recp_id: recipe id for which the rule needs to removed | 1531 | * @recp_id: recipe ID for which the rule needs to removed |
| 1532 | * @f_entry: rule entry containing filter information | 1532 | * @f_entry: rule entry containing filter information |
| 1533 | */ | 1533 | */ |
| 1534 | static enum ice_status | 1534 | static enum ice_status |
| @@ -1578,7 +1578,7 @@ ice_remove_rule_internal(struct ice_hw *hw, u8 recp_id, | |||
| 1578 | status = ice_rem_update_vsi_list(hw, vsi_handle, list_elem); | 1578 | status = ice_rem_update_vsi_list(hw, vsi_handle, list_elem); |
| 1579 | if (status) | 1579 | if (status) |
| 1580 | goto exit; | 1580 | goto exit; |
| 1581 | /* if vsi count goes to zero after updating the vsi list */ | 1581 | /* if VSI count goes to zero after updating the VSI list */ |
| 1582 | if (list_elem->vsi_count == 0) | 1582 | if (list_elem->vsi_count == 0) |
| 1583 | remove_rule = true; | 1583 | remove_rule = true; |
| 1584 | } | 1584 | } |
| @@ -1656,7 +1656,7 @@ ice_add_mac(struct ice_hw *hw, struct list_head *m_list) | |||
| 1656 | return ICE_ERR_PARAM; | 1656 | return ICE_ERR_PARAM; |
| 1657 | hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); | 1657 | hw_vsi_id = ice_get_hw_vsi_num(hw, vsi_handle); |
| 1658 | m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id; | 1658 | m_list_itr->fltr_info.fwd_id.hw_vsi_id = hw_vsi_id; |
| 1659 | /* update the src in case it is vsi num */ | 1659 | /* update the src in case it is VSI num */ |
| 1660 | if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI) | 1660 | if (m_list_itr->fltr_info.src_id != ICE_SRC_ID_VSI) |
| 1661 | return ICE_ERR_PARAM; | 1661 | return ICE_ERR_PARAM; |
| 1662 | m_list_itr->fltr_info.src = hw_vsi_id; | 1662 | m_list_itr->fltr_info.src = hw_vsi_id; |
| @@ -1732,7 +1732,7 @@ ice_add_mac(struct ice_hw *hw, struct list_head *m_list) | |||
| 1732 | ((u8 *)r_iter + (elem_sent * s_rule_size)); | 1732 | ((u8 *)r_iter + (elem_sent * s_rule_size)); |
| 1733 | } | 1733 | } |
| 1734 | 1734 | ||
| 1735 | /* Fill up rule id based on the value returned from FW */ | 1735 | /* Fill up rule ID based on the value returned from FW */ |
| 1736 | r_iter = s_rule; | 1736 | r_iter = s_rule; |
| 1737 | list_for_each_entry(m_list_itr, m_list, list_entry) { | 1737 | list_for_each_entry(m_list_itr, m_list, list_entry) { |
| 1738 | struct ice_fltr_info *f_info = &m_list_itr->fltr_info; | 1738 | struct ice_fltr_info *f_info = &m_list_itr->fltr_info; |
| @@ -1792,7 +1792,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry) | |||
| 1792 | ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle); | 1792 | ice_get_hw_vsi_num(hw, f_entry->fltr_info.vsi_handle); |
| 1793 | new_fltr = &f_entry->fltr_info; | 1793 | new_fltr = &f_entry->fltr_info; |
| 1794 | 1794 | ||
| 1795 | /* VLAN id should only be 12 bits */ | 1795 | /* VLAN ID should only be 12 bits */ |
| 1796 | if (new_fltr->l_data.vlan.vlan_id > ICE_MAX_VLAN_ID) | 1796 | if (new_fltr->l_data.vlan.vlan_id > ICE_MAX_VLAN_ID) |
| 1797 | return ICE_ERR_PARAM; | 1797 | return ICE_ERR_PARAM; |
| 1798 | 1798 | ||
| @@ -1850,7 +1850,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry) | |||
| 1850 | } | 1850 | } |
| 1851 | } | 1851 | } |
| 1852 | } else if (v_list_itr->vsi_list_info->ref_cnt == 1) { | 1852 | } else if (v_list_itr->vsi_list_info->ref_cnt == 1) { |
| 1853 | /* Update existing VSI list to add new VSI id only if it used | 1853 | /* Update existing VSI list to add new VSI ID only if it used |
| 1854 | * by one VLAN rule. | 1854 | * by one VLAN rule. |
| 1855 | */ | 1855 | */ |
| 1856 | cur_fltr = &v_list_itr->fltr_info; | 1856 | cur_fltr = &v_list_itr->fltr_info; |
| @@ -1860,7 +1860,7 @@ ice_add_vlan_internal(struct ice_hw *hw, struct ice_fltr_list_entry *f_entry) | |||
| 1860 | /* If VLAN rule exists and VSI list being used by this rule is | 1860 | /* If VLAN rule exists and VSI list being used by this rule is |
| 1861 | * referenced by more than 1 VLAN rule. Then create a new VSI | 1861 | * referenced by more than 1 VLAN rule. Then create a new VSI |
| 1862 | * list appending previous VSI with new VSI and update existing | 1862 | * list appending previous VSI with new VSI and update existing |
| 1863 | * VLAN rule to point to new VSI list id | 1863 | * VLAN rule to point to new VSI list ID |
| 1864 | */ | 1864 | */ |
| 1865 | struct ice_fltr_info tmp_fltr; | 1865 | struct ice_fltr_info tmp_fltr; |
| 1866 | u16 vsi_handle_arr[2]; | 1866 | u16 vsi_handle_arr[2]; |
| @@ -2192,7 +2192,7 @@ ice_add_to_vsi_fltr_list(struct ice_hw *hw, u16 vsi_handle, | |||
| 2192 | struct ice_fltr_mgmt_list_entry *fm_entry; | 2192 | struct ice_fltr_mgmt_list_entry *fm_entry; |
| 2193 | enum ice_status status = 0; | 2193 | enum ice_status status = 0; |
| 2194 | 2194 | ||
| 2195 | /* check to make sure VSI id is valid and within boundary */ | 2195 | /* check to make sure VSI ID is valid and within boundary */ |
| 2196 | if (!ice_is_vsi_valid(hw, vsi_handle)) | 2196 | if (!ice_is_vsi_valid(hw, vsi_handle)) |
| 2197 | return ICE_ERR_PARAM; | 2197 | return ICE_ERR_PARAM; |
| 2198 | 2198 | ||
| @@ -2247,7 +2247,7 @@ static u8 ice_determine_promisc_mask(struct ice_fltr_info *fi) | |||
| 2247 | /** | 2247 | /** |
| 2248 | * ice_remove_promisc - Remove promisc based filter rules | 2248 | * ice_remove_promisc - Remove promisc based filter rules |
| 2249 | * @hw: pointer to the hardware structure | 2249 | * @hw: pointer to the hardware structure |
| 2250 | * @recp_id: recipe id for which the rule needs to removed | 2250 | * @recp_id: recipe ID for which the rule needs to removed |
| 2251 | * @v_list: list of promisc entries | 2251 | * @v_list: list of promisc entries |
| 2252 | */ | 2252 | */ |
| 2253 | static enum ice_status | 2253 | static enum ice_status |
| @@ -2572,7 +2572,7 @@ void ice_remove_vsi_fltr(struct ice_hw *hw, u16 vsi_handle) | |||
| 2572 | * ice_replay_vsi_fltr - Replay filters for requested VSI | 2572 | * ice_replay_vsi_fltr - Replay filters for requested VSI |
| 2573 | * @hw: pointer to the hardware structure | 2573 | * @hw: pointer to the hardware structure |
| 2574 | * @vsi_handle: driver VSI handle | 2574 | * @vsi_handle: driver VSI handle |
| 2575 | * @recp_id: Recipe id for which rules need to be replayed | 2575 | * @recp_id: Recipe ID for which rules need to be replayed |
| 2576 | * @list_head: list for which filters need to be replayed | 2576 | * @list_head: list for which filters need to be replayed |
| 2577 | * | 2577 | * |
| 2578 | * Replays the filter of recipe recp_id for a VSI represented via vsi_handle. | 2578 | * Replays the filter of recipe recp_id for a VSI represented via vsi_handle. |
| @@ -2596,7 +2596,7 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id, | |||
| 2596 | f_entry.fltr_info = itr->fltr_info; | 2596 | f_entry.fltr_info = itr->fltr_info; |
| 2597 | if (itr->vsi_count < 2 && recp_id != ICE_SW_LKUP_VLAN && | 2597 | if (itr->vsi_count < 2 && recp_id != ICE_SW_LKUP_VLAN && |
| 2598 | itr->fltr_info.vsi_handle == vsi_handle) { | 2598 | itr->fltr_info.vsi_handle == vsi_handle) { |
| 2599 | /* update the src in case it is vsi num */ | 2599 | /* update the src in case it is VSI num */ |
| 2600 | if (f_entry.fltr_info.src_id == ICE_SRC_ID_VSI) | 2600 | if (f_entry.fltr_info.src_id == ICE_SRC_ID_VSI) |
| 2601 | f_entry.fltr_info.src = hw_vsi_id; | 2601 | f_entry.fltr_info.src = hw_vsi_id; |
| 2602 | status = ice_add_rule_internal(hw, recp_id, &f_entry); | 2602 | status = ice_add_rule_internal(hw, recp_id, &f_entry); |
| @@ -2611,7 +2611,7 @@ ice_replay_vsi_fltr(struct ice_hw *hw, u16 vsi_handle, u8 recp_id, | |||
| 2611 | clear_bit(vsi_handle, itr->vsi_list_info->vsi_map); | 2611 | clear_bit(vsi_handle, itr->vsi_list_info->vsi_map); |
| 2612 | f_entry.fltr_info.vsi_handle = vsi_handle; | 2612 | f_entry.fltr_info.vsi_handle = vsi_handle; |
| 2613 | f_entry.fltr_info.fltr_act = ICE_FWD_TO_VSI; | 2613 | f_entry.fltr_info.fltr_act = ICE_FWD_TO_VSI; |
| 2614 | /* update the src in case it is vsi num */ | 2614 | /* update the src in case it is VSI num */ |
| 2615 | if (f_entry.fltr_info.src_id == ICE_SRC_ID_VSI) | 2615 | if (f_entry.fltr_info.src_id == ICE_SRC_ID_VSI) |
| 2616 | f_entry.fltr_info.src = hw_vsi_id; | 2616 | f_entry.fltr_info.src = hw_vsi_id; |
| 2617 | if (recp_id == ICE_SW_LKUP_VLAN) | 2617 | if (recp_id == ICE_SW_LKUP_VLAN) |
| @@ -2651,7 +2651,7 @@ enum ice_status ice_replay_vsi_all_fltr(struct ice_hw *hw, u16 vsi_handle) | |||
| 2651 | 2651 | ||
| 2652 | /** | 2652 | /** |
| 2653 | * ice_rm_all_sw_replay_rule_info - deletes filter replay rules | 2653 | * ice_rm_all_sw_replay_rule_info - deletes filter replay rules |
| 2654 | * @hw: pointer to the hw struct | 2654 | * @hw: pointer to the HW struct |
| 2655 | * | 2655 | * |
| 2656 | * Deletes the filter replay rules. | 2656 | * Deletes the filter replay rules. |
| 2657 | */ | 2657 | */ |
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h index e4ce0720b871..64a2fecfce20 100644 --- a/drivers/net/ethernet/intel/ice/ice_switch.h +++ b/drivers/net/ethernet/intel/ice/ice_switch.h | |||
| @@ -44,7 +44,7 @@ enum ice_sw_lkup_type { | |||
| 44 | ICE_SW_LKUP_LAST | 44 | ICE_SW_LKUP_LAST |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | /* type of filter src id */ | 47 | /* type of filter src ID */ |
| 48 | enum ice_src_id { | 48 | enum ice_src_id { |
| 49 | ICE_SRC_ID_UNKNOWN = 0, | 49 | ICE_SRC_ID_UNKNOWN = 0, |
| 50 | ICE_SRC_ID_VSI, | 50 | ICE_SRC_ID_VSI, |
| @@ -95,8 +95,8 @@ struct ice_fltr_info { | |||
| 95 | 95 | ||
| 96 | /* Depending on filter action */ | 96 | /* Depending on filter action */ |
| 97 | union { | 97 | union { |
| 98 | /* queue id in case of ICE_FWD_TO_Q and starting | 98 | /* queue ID in case of ICE_FWD_TO_Q and starting |
| 99 | * queue id in case of ICE_FWD_TO_QGRP. | 99 | * queue ID in case of ICE_FWD_TO_QGRP. |
| 100 | */ | 100 | */ |
| 101 | u16 q_id:11; | 101 | u16 q_id:11; |
| 102 | u16 hw_vsi_id:10; | 102 | u16 hw_vsi_id:10; |
| @@ -143,7 +143,7 @@ struct ice_sw_recipe { | |||
| 143 | DECLARE_BITMAP(r_bitmap, ICE_MAX_NUM_RECIPES); | 143 | DECLARE_BITMAP(r_bitmap, ICE_MAX_NUM_RECIPES); |
| 144 | }; | 144 | }; |
| 145 | 145 | ||
| 146 | /* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list id */ | 146 | /* Bookkeeping structure to hold bitmap of VSIs corresponding to VSI list ID */ |
| 147 | struct ice_vsi_list_map_info { | 147 | struct ice_vsi_list_map_info { |
| 148 | struct list_head list_entry; | 148 | struct list_head list_entry; |
| 149 | DECLARE_BITMAP(vsi_map, ICE_MAX_VSI); | 149 | DECLARE_BITMAP(vsi_map, ICE_MAX_VSI); |
| @@ -165,7 +165,7 @@ struct ice_fltr_list_entry { | |||
| 165 | * used for VLAN membership. | 165 | * used for VLAN membership. |
| 166 | */ | 166 | */ |
| 167 | struct ice_fltr_mgmt_list_entry { | 167 | struct ice_fltr_mgmt_list_entry { |
| 168 | /* back pointer to VSI list id to VSI list mapping */ | 168 | /* back pointer to VSI list ID to VSI list mapping */ |
| 169 | struct ice_vsi_list_map_info *vsi_list_info; | 169 | struct ice_vsi_list_map_info *vsi_list_info; |
| 170 | u16 vsi_count; | 170 | u16 vsi_count; |
| 171 | #define ICE_INVAL_LG_ACT_INDEX 0xffff | 171 | #define ICE_INVAL_LG_ACT_INDEX 0xffff |
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c index a6f7b7feaf3c..bd1b27dd29a4 100644 --- a/drivers/net/ethernet/intel/ice/ice_txrx.c +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c | |||
| @@ -456,7 +456,7 @@ bool ice_alloc_rx_bufs(struct ice_ring *rx_ring, u16 cleaned_count) | |||
| 456 | if (!rx_ring->netdev || !cleaned_count) | 456 | if (!rx_ring->netdev || !cleaned_count) |
| 457 | return false; | 457 | return false; |
| 458 | 458 | ||
| 459 | /* get the RX descriptor and buffer based on next_to_use */ | 459 | /* get the Rx descriptor and buffer based on next_to_use */ |
| 460 | rx_desc = ICE_RX_DESC(rx_ring, ntu); | 460 | rx_desc = ICE_RX_DESC(rx_ring, ntu); |
| 461 | bi = &rx_ring->rx_buf[ntu]; | 461 | bi = &rx_ring->rx_buf[ntu]; |
| 462 | 462 | ||
| @@ -959,10 +959,10 @@ ice_process_skb_fields(struct ice_ring *rx_ring, | |||
| 959 | * ice_receive_skb - Send a completed packet up the stack | 959 | * ice_receive_skb - Send a completed packet up the stack |
| 960 | * @rx_ring: Rx ring in play | 960 | * @rx_ring: Rx ring in play |
| 961 | * @skb: packet to send up | 961 | * @skb: packet to send up |
| 962 | * @vlan_tag: vlan tag for packet | 962 | * @vlan_tag: VLAN tag for packet |
| 963 | * | 963 | * |
| 964 | * This function sends the completed packet (via. skb) up the stack using | 964 | * This function sends the completed packet (via. skb) up the stack using |
| 965 | * gro receive functions (with/without vlan tag) | 965 | * gro receive functions (with/without VLAN tag) |
| 966 | */ | 966 | */ |
| 967 | static void | 967 | static void |
| 968 | ice_receive_skb(struct ice_ring *rx_ring, struct sk_buff *skb, u16 vlan_tag) | 968 | ice_receive_skb(struct ice_ring *rx_ring, struct sk_buff *skb, u16 vlan_tag) |
| @@ -991,7 +991,7 @@ static int ice_clean_rx_irq(struct ice_ring *rx_ring, int budget) | |||
| 991 | u16 cleaned_count = ICE_DESC_UNUSED(rx_ring); | 991 | u16 cleaned_count = ICE_DESC_UNUSED(rx_ring); |
| 992 | bool failure = false; | 992 | bool failure = false; |
| 993 | 993 | ||
| 994 | /* start the loop to process RX packets bounded by 'budget' */ | 994 | /* start the loop to process Rx packets bounded by 'budget' */ |
| 995 | while (likely(total_rx_pkts < (unsigned int)budget)) { | 995 | while (likely(total_rx_pkts < (unsigned int)budget)) { |
| 996 | union ice_32b_rx_flex_desc *rx_desc; | 996 | union ice_32b_rx_flex_desc *rx_desc; |
| 997 | struct ice_rx_buf *rx_buf; | 997 | struct ice_rx_buf *rx_buf; |
| @@ -1008,7 +1008,7 @@ static int ice_clean_rx_irq(struct ice_ring *rx_ring, int budget) | |||
| 1008 | cleaned_count = 0; | 1008 | cleaned_count = 0; |
| 1009 | } | 1009 | } |
| 1010 | 1010 | ||
| 1011 | /* get the RX desc from RX ring based on 'next_to_clean' */ | 1011 | /* get the Rx desc from Rx ring based on 'next_to_clean' */ |
| 1012 | rx_desc = ICE_RX_DESC(rx_ring, rx_ring->next_to_clean); | 1012 | rx_desc = ICE_RX_DESC(rx_ring, rx_ring->next_to_clean); |
| 1013 | 1013 | ||
| 1014 | /* status_error_len will always be zero for unused descriptors | 1014 | /* status_error_len will always be zero for unused descriptors |
| @@ -1772,7 +1772,7 @@ int ice_tx_csum(struct ice_tx_buf *first, struct ice_tx_offload_params *off) | |||
| 1772 | } | 1772 | } |
| 1773 | 1773 | ||
| 1774 | /** | 1774 | /** |
| 1775 | * ice_tx_prepare_vlan_flags - prepare generic TX VLAN tagging flags for HW | 1775 | * ice_tx_prepare_vlan_flags - prepare generic Tx VLAN tagging flags for HW |
| 1776 | * @tx_ring: ring to send buffer on | 1776 | * @tx_ring: ring to send buffer on |
| 1777 | * @first: pointer to struct ice_tx_buf | 1777 | * @first: pointer to struct ice_tx_buf |
| 1778 | * | 1778 | * |
diff --git a/drivers/net/ethernet/intel/ice/ice_type.h b/drivers/net/ethernet/intel/ice/ice_type.h index 3a4e67484487..119fda5674cc 100644 --- a/drivers/net/ethernet/intel/ice/ice_type.h +++ b/drivers/net/ethernet/intel/ice/ice_type.h | |||
| @@ -107,7 +107,7 @@ struct ice_link_status { | |||
| 107 | }; | 107 | }; |
| 108 | 108 | ||
| 109 | /* Different reset sources for which a disable queue AQ call has to be made in | 109 | /* Different reset sources for which a disable queue AQ call has to be made in |
| 110 | * order to clean the TX scheduler as a part of the reset | 110 | * order to clean the Tx scheduler as a part of the reset |
| 111 | */ | 111 | */ |
| 112 | enum ice_disq_rst_src { | 112 | enum ice_disq_rst_src { |
| 113 | ICE_NO_RESET = 0, | 113 | ICE_NO_RESET = 0, |
| @@ -129,11 +129,11 @@ struct ice_phy_info { | |||
| 129 | struct ice_hw_common_caps { | 129 | struct ice_hw_common_caps { |
| 130 | u32 valid_functions; | 130 | u32 valid_functions; |
| 131 | 131 | ||
| 132 | /* TX/RX queues */ | 132 | /* Tx/Rx queues */ |
| 133 | u16 num_rxq; /* Number/Total RX queues */ | 133 | u16 num_rxq; /* Number/Total Rx queues */ |
| 134 | u16 rxq_first_id; /* First queue ID for RX queues */ | 134 | u16 rxq_first_id; /* First queue ID for Rx queues */ |
| 135 | u16 num_txq; /* Number/Total TX queues */ | 135 | u16 num_txq; /* Number/Total Tx queues */ |
| 136 | u16 txq_first_id; /* First queue ID for TX queues */ | 136 | u16 txq_first_id; /* First queue ID for Tx queues */ |
| 137 | 137 | ||
| 138 | /* MSI-X vectors */ | 138 | /* MSI-X vectors */ |
| 139 | u16 num_msix_vectors; | 139 | u16 num_msix_vectors; |
| @@ -218,7 +218,7 @@ struct ice_sched_node { | |||
| 218 | struct ice_sched_node *sibling; /* next sibling in the same layer */ | 218 | struct ice_sched_node *sibling; /* next sibling in the same layer */ |
| 219 | struct ice_sched_node **children; | 219 | struct ice_sched_node **children; |
| 220 | struct ice_aqc_txsched_elem_data info; | 220 | struct ice_aqc_txsched_elem_data info; |
| 221 | u32 agg_id; /* aggregator group id */ | 221 | u32 agg_id; /* aggregator group ID */ |
| 222 | u16 vsi_handle; | 222 | u16 vsi_handle; |
| 223 | u8 in_use; /* suspended or in use */ | 223 | u8 in_use; /* suspended or in use */ |
| 224 | u8 tx_sched_layer; /* Logical Layer (1-9) */ | 224 | u8 tx_sched_layer; /* Logical Layer (1-9) */ |
| @@ -245,7 +245,7 @@ enum ice_agg_type { | |||
| 245 | #define ICE_SCHED_DFLT_RL_PROF_ID 0 | 245 | #define ICE_SCHED_DFLT_RL_PROF_ID 0 |
| 246 | #define ICE_SCHED_DFLT_BW_WT 1 | 246 | #define ICE_SCHED_DFLT_BW_WT 1 |
| 247 | 247 | ||
| 248 | /* vsi type list entry to locate corresponding vsi/ag nodes */ | 248 | /* VSI type list entry to locate corresponding VSI/ag nodes */ |
| 249 | struct ice_sched_vsi_info { | 249 | struct ice_sched_vsi_info { |
| 250 | struct ice_sched_node *vsi_node[ICE_MAX_TRAFFIC_CLASS]; | 250 | struct ice_sched_node *vsi_node[ICE_MAX_TRAFFIC_CLASS]; |
| 251 | struct ice_sched_node *ag_node[ICE_MAX_TRAFFIC_CLASS]; | 251 | struct ice_sched_node *ag_node[ICE_MAX_TRAFFIC_CLASS]; |
| @@ -262,7 +262,7 @@ struct ice_sched_tx_policy { | |||
| 262 | 262 | ||
| 263 | struct ice_port_info { | 263 | struct ice_port_info { |
| 264 | struct ice_sched_node *root; /* Root Node per Port */ | 264 | struct ice_sched_node *root; /* Root Node per Port */ |
| 265 | struct ice_hw *hw; /* back pointer to hw instance */ | 265 | struct ice_hw *hw; /* back pointer to HW instance */ |
| 266 | u32 last_node_teid; /* scheduler last node info */ | 266 | u32 last_node_teid; /* scheduler last node info */ |
| 267 | u16 sw_id; /* Initial switch ID belongs to port */ | 267 | u16 sw_id; /* Initial switch ID belongs to port */ |
| 268 | u16 pf_vf_num; | 268 | u16 pf_vf_num; |
| @@ -323,7 +323,7 @@ struct ice_hw { | |||
| 323 | 323 | ||
| 324 | u8 pf_id; /* device profile info */ | 324 | u8 pf_id; /* device profile info */ |
| 325 | 325 | ||
| 326 | /* TX Scheduler values */ | 326 | /* Tx Scheduler values */ |
| 327 | u16 num_tx_sched_layers; | 327 | u16 num_tx_sched_layers; |
| 328 | u16 num_tx_sched_phys_layers; | 328 | u16 num_tx_sched_phys_layers; |
| 329 | u8 flattened_layers; | 329 | u8 flattened_layers; |
| @@ -334,7 +334,7 @@ struct ice_hw { | |||
| 334 | 334 | ||
| 335 | struct ice_vsi_ctx *vsi_ctx[ICE_MAX_VSI]; | 335 | struct ice_vsi_ctx *vsi_ctx[ICE_MAX_VSI]; |
| 336 | u8 evb_veb; /* true for VEB, false for VEPA */ | 336 | u8 evb_veb; /* true for VEB, false for VEPA */ |
| 337 | u8 reset_ongoing; /* true if hw is in reset, false otherwise */ | 337 | u8 reset_ongoing; /* true if HW is in reset, false otherwise */ |
| 338 | struct ice_bus_info bus; | 338 | struct ice_bus_info bus; |
| 339 | struct ice_nvm_info nvm; | 339 | struct ice_nvm_info nvm; |
| 340 | struct ice_hw_dev_caps dev_caps; /* device capabilities */ | 340 | struct ice_hw_dev_caps dev_caps; /* device capabilities */ |
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c index 8321e4f28957..e562ea15b79b 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | |||
| @@ -375,9 +375,9 @@ static void ice_trigger_vf_reset(struct ice_vf *vf, bool is_vflr) | |||
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | /** | 377 | /** |
| 378 | * ice_vsi_set_pvid_fill_ctxt - Set VSI ctxt for add pvid | 378 | * ice_vsi_set_pvid_fill_ctxt - Set VSI ctxt for add PVID |
| 379 | * @ctxt: the vsi ctxt to fill | 379 | * @ctxt: the VSI ctxt to fill |
| 380 | * @vid: the VLAN id to set as a PVID | 380 | * @vid: the VLAN ID to set as a PVID |
| 381 | */ | 381 | */ |
| 382 | static void ice_vsi_set_pvid_fill_ctxt(struct ice_vsi_ctx *ctxt, u16 vid) | 382 | static void ice_vsi_set_pvid_fill_ctxt(struct ice_vsi_ctx *ctxt, u16 vid) |
| 383 | { | 383 | { |
| @@ -391,7 +391,7 @@ static void ice_vsi_set_pvid_fill_ctxt(struct ice_vsi_ctx *ctxt, u16 vid) | |||
| 391 | } | 391 | } |
| 392 | 392 | ||
| 393 | /** | 393 | /** |
| 394 | * ice_vsi_kill_pvid_fill_ctxt - Set VSI ctx for remove pvid | 394 | * ice_vsi_kill_pvid_fill_ctxt - Set VSI ctx for remove PVID |
| 395 | * @ctxt: the VSI ctxt to fill | 395 | * @ctxt: the VSI ctxt to fill |
| 396 | */ | 396 | */ |
| 397 | static void ice_vsi_kill_pvid_fill_ctxt(struct ice_vsi_ctx *ctxt) | 397 | static void ice_vsi_kill_pvid_fill_ctxt(struct ice_vsi_ctx *ctxt) |
| @@ -406,8 +406,8 @@ static void ice_vsi_kill_pvid_fill_ctxt(struct ice_vsi_ctx *ctxt) | |||
| 406 | /** | 406 | /** |
| 407 | * ice_vsi_manage_pvid - Enable or disable port VLAN for VSI | 407 | * ice_vsi_manage_pvid - Enable or disable port VLAN for VSI |
| 408 | * @vsi: the VSI to update | 408 | * @vsi: the VSI to update |
| 409 | * @vid: the VLAN id to set as a PVID | 409 | * @vid: the VLAN ID to set as a PVID |
| 410 | * @enable: true for enable pvid false for disable | 410 | * @enable: true for enable PVID false for disable |
| 411 | */ | 411 | */ |
| 412 | static int ice_vsi_manage_pvid(struct ice_vsi *vsi, u16 vid, bool enable) | 412 | static int ice_vsi_manage_pvid(struct ice_vsi *vsi, u16 vid, bool enable) |
| 413 | { | 413 | { |
| @@ -445,7 +445,7 @@ out: | |||
| 445 | * ice_vf_vsi_setup - Set up a VF VSI | 445 | * ice_vf_vsi_setup - Set up a VF VSI |
| 446 | * @pf: board private structure | 446 | * @pf: board private structure |
| 447 | * @pi: pointer to the port_info instance | 447 | * @pi: pointer to the port_info instance |
| 448 | * @vf_id: defines VF id to which this VSI connects. | 448 | * @vf_id: defines VF ID to which this VSI connects. |
| 449 | * | 449 | * |
| 450 | * Returns pointer to the successfully allocated VSI struct on success, | 450 | * Returns pointer to the successfully allocated VSI struct on success, |
| 451 | * otherwise returns NULL on failure. | 451 | * otherwise returns NULL on failure. |
| @@ -1508,9 +1508,9 @@ static void ice_vc_reset_vf_msg(struct ice_vf *vf) | |||
| 1508 | /** | 1508 | /** |
| 1509 | * ice_find_vsi_from_id | 1509 | * ice_find_vsi_from_id |
| 1510 | * @pf: the pf structure to search for the VSI | 1510 | * @pf: the pf structure to search for the VSI |
| 1511 | * @id: id of the VSI it is searching for | 1511 | * @id: ID of the VSI it is searching for |
| 1512 | * | 1512 | * |
| 1513 | * searches for the VSI with the given id | 1513 | * searches for the VSI with the given ID |
| 1514 | */ | 1514 | */ |
| 1515 | static struct ice_vsi *ice_find_vsi_from_id(struct ice_pf *pf, u16 id) | 1515 | static struct ice_vsi *ice_find_vsi_from_id(struct ice_pf *pf, u16 id) |
| 1516 | { | 1516 | { |
| @@ -1526,9 +1526,9 @@ static struct ice_vsi *ice_find_vsi_from_id(struct ice_pf *pf, u16 id) | |||
| 1526 | /** | 1526 | /** |
| 1527 | * ice_vc_isvalid_vsi_id | 1527 | * ice_vc_isvalid_vsi_id |
| 1528 | * @vf: pointer to the VF info | 1528 | * @vf: pointer to the VF info |
| 1529 | * @vsi_id: VF relative VSI id | 1529 | * @vsi_id: VF relative VSI ID |
| 1530 | * | 1530 | * |
| 1531 | * check for the valid VSI id | 1531 | * check for the valid VSI ID |
| 1532 | */ | 1532 | */ |
| 1533 | static bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id) | 1533 | static bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id) |
| 1534 | { | 1534 | { |
| @@ -1543,10 +1543,10 @@ static bool ice_vc_isvalid_vsi_id(struct ice_vf *vf, u16 vsi_id) | |||
| 1543 | /** | 1543 | /** |
| 1544 | * ice_vc_isvalid_q_id | 1544 | * ice_vc_isvalid_q_id |
| 1545 | * @vf: pointer to the VF info | 1545 | * @vf: pointer to the VF info |
| 1546 | * @vsi_id: VSI id | 1546 | * @vsi_id: VSI ID |
| 1547 | * @qid: VSI relative queue id | 1547 | * @qid: VSI relative queue ID |
| 1548 | * | 1548 | * |
| 1549 | * check for the valid queue id | 1549 | * check for the valid queue ID |
| 1550 | */ | 1550 | */ |
| 1551 | static bool ice_vc_isvalid_q_id(struct ice_vf *vf, u16 vsi_id, u8 qid) | 1551 | static bool ice_vc_isvalid_q_id(struct ice_vf *vf, u16 vsi_id, u8 qid) |
| 1552 | { | 1552 | { |
| @@ -2005,7 +2005,7 @@ static bool ice_can_vf_change_mac(struct ice_vf *vf) | |||
| 2005 | * ice_vc_handle_mac_addr_msg | 2005 | * ice_vc_handle_mac_addr_msg |
| 2006 | * @vf: pointer to the VF info | 2006 | * @vf: pointer to the VF info |
| 2007 | * @msg: pointer to the msg buffer | 2007 | * @msg: pointer to the msg buffer |
| 2008 | * @set: true if mac filters are being set, false otherwise | 2008 | * @set: true if MAC filters are being set, false otherwise |
| 2009 | * | 2009 | * |
| 2010 | * add guest MAC address filter | 2010 | * add guest MAC address filter |
| 2011 | */ | 2011 | */ |
| @@ -2065,7 +2065,7 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set) | |||
| 2065 | maddr, vf->vf_id); | 2065 | maddr, vf->vf_id); |
| 2066 | continue; | 2066 | continue; |
| 2067 | } else { | 2067 | } else { |
| 2068 | /* VF can't remove dflt_lan_addr/bcast mac */ | 2068 | /* VF can't remove dflt_lan_addr/bcast MAC */ |
| 2069 | dev_err(&pf->pdev->dev, | 2069 | dev_err(&pf->pdev->dev, |
| 2070 | "VF can't remove default MAC address or MAC %pM programmed by PF for VF %d\n", | 2070 | "VF can't remove default MAC address or MAC %pM programmed by PF for VF %d\n", |
| 2071 | maddr, vf->vf_id); | 2071 | maddr, vf->vf_id); |
| @@ -2091,7 +2091,7 @@ ice_vc_handle_mac_addr_msg(struct ice_vf *vf, u8 *msg, bool set) | |||
| 2091 | goto handle_mac_exit; | 2091 | goto handle_mac_exit; |
| 2092 | } | 2092 | } |
| 2093 | 2093 | ||
| 2094 | /* get here if maddr is multicast or if VF can change mac */ | 2094 | /* get here if maddr is multicast or if VF can change MAC */ |
| 2095 | if (ice_add_mac_to_list(vsi, &mac_list, al->list[i].addr)) { | 2095 | if (ice_add_mac_to_list(vsi, &mac_list, al->list[i].addr)) { |
| 2096 | v_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY; | 2096 | v_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY; |
| 2097 | goto handle_mac_exit; | 2097 | goto handle_mac_exit; |
| @@ -2154,7 +2154,7 @@ static int ice_vc_del_mac_addr_msg(struct ice_vf *vf, u8 *msg) | |||
| 2154 | * VFs get a default number of queues but can use this message to request a | 2154 | * VFs get a default number of queues but can use this message to request a |
| 2155 | * different number. If the request is successful, PF will reset the VF and | 2155 | * different number. If the request is successful, PF will reset the VF and |
| 2156 | * return 0. If unsuccessful, PF will send message informing VF of number of | 2156 | * return 0. If unsuccessful, PF will send message informing VF of number of |
| 2157 | * available queue pairs via virtchnl message response to vf. | 2157 | * available queue pairs via virtchnl message response to VF. |
| 2158 | */ | 2158 | */ |
| 2159 | static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg) | 2159 | static int ice_vc_request_qs_msg(struct ice_vf *vf, u8 *msg) |
| 2160 | { | 2160 | { |
| @@ -2210,11 +2210,11 @@ error_param: | |||
| 2210 | * ice_set_vf_port_vlan | 2210 | * ice_set_vf_port_vlan |
| 2211 | * @netdev: network interface device structure | 2211 | * @netdev: network interface device structure |
| 2212 | * @vf_id: VF identifier | 2212 | * @vf_id: VF identifier |
| 2213 | * @vlan_id: VLAN id being set | 2213 | * @vlan_id: VLAN ID being set |
| 2214 | * @qos: priority setting | 2214 | * @qos: priority setting |
| 2215 | * @vlan_proto: VLAN protocol | 2215 | * @vlan_proto: VLAN protocol |
| 2216 | * | 2216 | * |
| 2217 | * program VF Port VLAN id and/or qos | 2217 | * program VF Port VLAN ID and/or QoS |
| 2218 | */ | 2218 | */ |
| 2219 | int | 2219 | int |
| 2220 | ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos, | 2220 | ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos, |
| @@ -2257,7 +2257,7 @@ ice_set_vf_port_vlan(struct net_device *netdev, int vf_id, u16 vlan_id, u8 qos, | |||
| 2257 | return ret; | 2257 | return ret; |
| 2258 | } | 2258 | } |
| 2259 | 2259 | ||
| 2260 | /* If pvid, then remove all filters on the old VLAN */ | 2260 | /* If PVID, then remove all filters on the old VLAN */ |
| 2261 | if (vsi->info.pvid) | 2261 | if (vsi->info.pvid) |
| 2262 | ice_vsi_kill_vlan(vsi, (le16_to_cpu(vsi->info.pvid) & | 2262 | ice_vsi_kill_vlan(vsi, (le16_to_cpu(vsi->info.pvid) & |
| 2263 | VLAN_VID_MASK)); | 2263 | VLAN_VID_MASK)); |
| @@ -2296,7 +2296,7 @@ error_set_pvid: | |||
| 2296 | * @msg: pointer to the msg buffer | 2296 | * @msg: pointer to the msg buffer |
| 2297 | * @add_v: Add VLAN if true, otherwise delete VLAN | 2297 | * @add_v: Add VLAN if true, otherwise delete VLAN |
| 2298 | * | 2298 | * |
| 2299 | * Process virtchnl op to add or remove programmed guest VLAN id | 2299 | * Process virtchnl op to add or remove programmed guest VLAN ID |
| 2300 | */ | 2300 | */ |
| 2301 | static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v) | 2301 | static int ice_vc_process_vlan_msg(struct ice_vf *vf, u8 *msg, bool add_v) |
| 2302 | { | 2302 | { |
| @@ -2443,7 +2443,7 @@ error_param: | |||
| 2443 | * @vf: pointer to the VF info | 2443 | * @vf: pointer to the VF info |
| 2444 | * @msg: pointer to the msg buffer | 2444 | * @msg: pointer to the msg buffer |
| 2445 | * | 2445 | * |
| 2446 | * Add and program guest VLAN id | 2446 | * Add and program guest VLAN ID |
| 2447 | */ | 2447 | */ |
| 2448 | static int ice_vc_add_vlan_msg(struct ice_vf *vf, u8 *msg) | 2448 | static int ice_vc_add_vlan_msg(struct ice_vf *vf, u8 *msg) |
| 2449 | { | 2449 | { |
| @@ -2455,7 +2455,7 @@ static int ice_vc_add_vlan_msg(struct ice_vf *vf, u8 *msg) | |||
| 2455 | * @vf: pointer to the VF info | 2455 | * @vf: pointer to the VF info |
| 2456 | * @msg: pointer to the msg buffer | 2456 | * @msg: pointer to the msg buffer |
| 2457 | * | 2457 | * |
| 2458 | * remove programmed guest VLAN id | 2458 | * remove programmed guest VLAN ID |
| 2459 | */ | 2459 | */ |
| 2460 | static int ice_vc_remove_vlan_msg(struct ice_vf *vf, u8 *msg) | 2460 | static int ice_vc_remove_vlan_msg(struct ice_vf *vf, u8 *msg) |
| 2461 | { | 2461 | { |
| @@ -2771,9 +2771,9 @@ out: | |||
| 2771 | * ice_set_vf_mac | 2771 | * ice_set_vf_mac |
| 2772 | * @netdev: network interface device structure | 2772 | * @netdev: network interface device structure |
| 2773 | * @vf_id: VF identifier | 2773 | * @vf_id: VF identifier |
| 2774 | * @mac: mac address | 2774 | * @mac: MAC address |
| 2775 | * | 2775 | * |
| 2776 | * program VF mac address | 2776 | * program VF MAC address |
| 2777 | */ | 2777 | */ |
| 2778 | int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) | 2778 | int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) |
| 2779 | { | 2779 | { |
| @@ -2800,7 +2800,7 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac) | |||
| 2800 | return -EINVAL; | 2800 | return -EINVAL; |
| 2801 | } | 2801 | } |
| 2802 | 2802 | ||
| 2803 | /* copy mac into dflt_lan_addr and trigger a VF reset. The reset | 2803 | /* copy MAC into dflt_lan_addr and trigger a VF reset. The reset |
| 2804 | * flow will use the updated dflt_lan_addr and add a MAC filter | 2804 | * flow will use the updated dflt_lan_addr and add a MAC filter |
| 2805 | * using ice_add_mac. Also set pf_set_mac to indicate that the PF has | 2805 | * using ice_add_mac. Also set pf_set_mac to indicate that the PF has |
| 2806 | * set the MAC address for this VF. | 2806 | * set the MAC address for this VF. |
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h index 932e2ab3380b..3725aea16840 100644 --- a/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h +++ b/drivers/net/ethernet/intel/ice/ice_virtchnl_pf.h | |||
| @@ -48,10 +48,10 @@ enum ice_virtchnl_cap { | |||
| 48 | struct ice_vf { | 48 | struct ice_vf { |
| 49 | struct ice_pf *pf; | 49 | struct ice_pf *pf; |
| 50 | 50 | ||
| 51 | s16 vf_id; /* VF id in the PF space */ | 51 | s16 vf_id; /* VF ID in the PF space */ |
| 52 | u32 driver_caps; /* reported by VF driver */ | 52 | u32 driver_caps; /* reported by VF driver */ |
| 53 | int first_vector_idx; /* first vector index of this VF */ | 53 | int first_vector_idx; /* first vector index of this VF */ |
| 54 | struct ice_sw *vf_sw_id; /* switch id the VF VSIs connect to */ | 54 | struct ice_sw *vf_sw_id; /* switch ID the VF VSIs connect to */ |
| 55 | struct virtchnl_version_info vf_ver; | 55 | struct virtchnl_version_info vf_ver; |
| 56 | struct virtchnl_ether_addr dflt_lan_addr; | 56 | struct virtchnl_ether_addr dflt_lan_addr; |
| 57 | u16 port_vlan_id; | 57 | u16 port_vlan_id; |
| @@ -59,10 +59,10 @@ struct ice_vf { | |||
| 59 | u8 trusted; | 59 | u8 trusted; |
| 60 | u16 lan_vsi_idx; /* index into PF struct */ | 60 | u16 lan_vsi_idx; /* index into PF struct */ |
| 61 | u16 lan_vsi_num; /* ID as used by firmware */ | 61 | u16 lan_vsi_num; /* ID as used by firmware */ |
| 62 | u64 num_mdd_events; /* number of mdd events detected */ | 62 | u64 num_mdd_events; /* number of MDD events detected */ |
| 63 | u64 num_inval_msgs; /* number of continuous invalid msgs */ | 63 | u64 num_inval_msgs; /* number of continuous invalid msgs */ |
| 64 | u64 num_valid_msgs; /* number of valid msgs detected */ | 64 | u64 num_valid_msgs; /* number of valid msgs detected */ |
| 65 | unsigned long vf_caps; /* vf's adv. capabilities */ | 65 | unsigned long vf_caps; /* VF's adv. capabilities */ |
| 66 | DECLARE_BITMAP(vf_states, ICE_VF_STATES_NBITS); /* VF runtime states */ | 66 | DECLARE_BITMAP(vf_states, ICE_VF_STATES_NBITS); /* VF runtime states */ |
| 67 | unsigned int tx_rate; /* Tx bandwidth limit in Mbps */ | 67 | unsigned int tx_rate; /* Tx bandwidth limit in Mbps */ |
| 68 | u8 link_forced; | 68 | u8 link_forced; |
