aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40e/i40e_main.c
diff options
context:
space:
mode:
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-02-27 04:18:34 -0500
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2015-03-09 08:20:47 -0400
commitb40c82e6ae85f110d1b53ba24b2ac657cb7bec8c (patch)
tree948a2fa82b482cf4245d4f29203d07d2b945860b /drivers/net/ethernet/intel/i40e/i40e_main.c
parent29a0645c7dfcd664f1e92ab8d7539bba600b7102 (diff)
i40e: Fix inconsistent use of PF/VF vs pf/vf
Joe Perches pointed out that we were inconsistent in the use of PF vs pf or VF vs vf in our driver code. Since acronyms are usually capitalized to denote that it is an acronym, changed all references to be consistent throughout the code. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 4bed881e3cb6..54a2d7bceb4f 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -450,7 +450,7 @@ void i40e_vsi_reset_stats(struct i40e_vsi *vsi)
450} 450}
451 451
452/** 452/**
453 * i40e_pf_reset_stats - Reset all of the stats for the given pf 453 * i40e_pf_reset_stats - Reset all of the stats for the given PF
454 * @pf: the PF to be reset 454 * @pf: the PF to be reset
455 **/ 455 **/
456void i40e_pf_reset_stats(struct i40e_pf *pf) 456void i40e_pf_reset_stats(struct i40e_pf *pf)
@@ -896,7 +896,7 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
896} 896}
897 897
898/** 898/**
899 * i40e_update_pf_stats - Update the pf statistics counters. 899 * i40e_update_pf_stats - Update the PF statistics counters.
900 * @pf: the PF to be updated 900 * @pf: the PF to be updated
901 **/ 901 **/
902static void i40e_update_pf_stats(struct i40e_pf *pf) 902static void i40e_update_pf_stats(struct i40e_pf *pf)
@@ -1128,7 +1128,7 @@ void i40e_update_stats(struct i40e_vsi *vsi)
1128 * @vsi: the VSI to be searched 1128 * @vsi: the VSI to be searched
1129 * @macaddr: the MAC address 1129 * @macaddr: the MAC address
1130 * @vlan: the vlan 1130 * @vlan: the vlan
1131 * @is_vf: make sure its a vf filter, else doesn't matter 1131 * @is_vf: make sure its a VF filter, else doesn't matter
1132 * @is_netdev: make sure its a netdev filter, else doesn't matter 1132 * @is_netdev: make sure its a netdev filter, else doesn't matter
1133 * 1133 *
1134 * Returns ptr to the filter object or NULL 1134 * Returns ptr to the filter object or NULL
@@ -1156,7 +1156,7 @@ static struct i40e_mac_filter *i40e_find_filter(struct i40e_vsi *vsi,
1156 * i40e_find_mac - Find a mac addr in the macvlan filters list 1156 * i40e_find_mac - Find a mac addr in the macvlan filters list
1157 * @vsi: the VSI to be searched 1157 * @vsi: the VSI to be searched
1158 * @macaddr: the MAC address we are searching for 1158 * @macaddr: the MAC address we are searching for
1159 * @is_vf: make sure its a vf filter, else doesn't matter 1159 * @is_vf: make sure its a VF filter, else doesn't matter
1160 * @is_netdev: make sure its a netdev filter, else doesn't matter 1160 * @is_netdev: make sure its a netdev filter, else doesn't matter
1161 * 1161 *
1162 * Returns the first filter with the provided MAC address or NULL if 1162 * Returns the first filter with the provided MAC address or NULL if
@@ -1204,7 +1204,7 @@ bool i40e_is_vsi_in_vlan(struct i40e_vsi *vsi)
1204 * i40e_put_mac_in_vlan - Make macvlan filters from macaddrs and vlans 1204 * i40e_put_mac_in_vlan - Make macvlan filters from macaddrs and vlans
1205 * @vsi: the VSI to be searched 1205 * @vsi: the VSI to be searched
1206 * @macaddr: the mac address to be filtered 1206 * @macaddr: the mac address to be filtered
1207 * @is_vf: true if it is a vf 1207 * @is_vf: true if it is a VF
1208 * @is_netdev: true if it is a netdev 1208 * @is_netdev: true if it is a netdev
1209 * 1209 *
1210 * Goes through all the macvlan filters and adds a 1210 * Goes through all the macvlan filters and adds a
@@ -1265,7 +1265,7 @@ static int i40e_rm_default_mac_filter(struct i40e_vsi *vsi, u8 *macaddr)
1265 * @vsi: the VSI to be searched 1265 * @vsi: the VSI to be searched
1266 * @macaddr: the MAC address 1266 * @macaddr: the MAC address
1267 * @vlan: the vlan 1267 * @vlan: the vlan
1268 * @is_vf: make sure its a vf filter, else doesn't matter 1268 * @is_vf: make sure its a VF filter, else doesn't matter
1269 * @is_netdev: make sure its a netdev filter, else doesn't matter 1269 * @is_netdev: make sure its a netdev filter, else doesn't matter
1270 * 1270 *
1271 * Returns ptr to the filter object or NULL when no memory available. 1271 * Returns ptr to the filter object or NULL when no memory available.
@@ -1325,7 +1325,7 @@ add_filter_out:
1325 * @vsi: the VSI to be searched 1325 * @vsi: the VSI to be searched
1326 * @macaddr: the MAC address 1326 * @macaddr: the MAC address
1327 * @vlan: the vlan 1327 * @vlan: the vlan
1328 * @is_vf: make sure it's a vf filter, else doesn't matter 1328 * @is_vf: make sure it's a VF filter, else doesn't matter
1329 * @is_netdev: make sure it's a netdev filter, else doesn't matter 1329 * @is_netdev: make sure it's a netdev filter, else doesn't matter
1330 **/ 1330 **/
1331void i40e_del_filter(struct i40e_vsi *vsi, 1331void i40e_del_filter(struct i40e_vsi *vsi,
@@ -1352,7 +1352,7 @@ void i40e_del_filter(struct i40e_vsi *vsi,
1352 f->counter--; 1352 f->counter--;
1353 } 1353 }
1354 } else { 1354 } else {
1355 /* make sure we don't remove a filter in use by vf or netdev */ 1355 /* make sure we don't remove a filter in use by VF or netdev */
1356 int min_f = 0; 1356 int min_f = 0;
1357 min_f += (f->is_vf ? 1 : 0); 1357 min_f += (f->is_vf ? 1 : 0);
1358 min_f += (f->is_netdev ? 1 : 0); 1358 min_f += (f->is_netdev ? 1 : 0);
@@ -4029,7 +4029,7 @@ static int i40e_pf_wait_txq_disabled(struct i40e_pf *pf)
4029#endif 4029#endif
4030/** 4030/**
4031 * i40e_get_iscsi_tc_map - Return TC map for iSCSI APP 4031 * i40e_get_iscsi_tc_map - Return TC map for iSCSI APP
4032 * @pf: pointer to pf 4032 * @pf: pointer to PF
4033 * 4033 *
4034 * Get TC map for ISCSI PF type that will include iSCSI TC 4034 * Get TC map for ISCSI PF type that will include iSCSI TC
4035 * and LAN TC. 4035 * and LAN TC.
@@ -4204,7 +4204,7 @@ static int i40e_vsi_get_bw_info(struct i40e_vsi *vsi)
4204 aq_ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid, &bw_config, NULL); 4204 aq_ret = i40e_aq_query_vsi_bw_config(hw, vsi->seid, &bw_config, NULL);
4205 if (aq_ret) { 4205 if (aq_ret) {
4206 dev_info(&pf->pdev->dev, 4206 dev_info(&pf->pdev->dev,
4207 "couldn't get pf vsi bw config, err %d, aq_err %d\n", 4207 "couldn't get PF vsi bw config, err %d, aq_err %d\n",
4208 aq_ret, pf->hw.aq.asq_last_status); 4208 aq_ret, pf->hw.aq.asq_last_status);
4209 return -EINVAL; 4209 return -EINVAL;
4210 } 4210 }
@@ -4214,7 +4214,7 @@ static int i40e_vsi_get_bw_info(struct i40e_vsi *vsi)
4214 NULL); 4214 NULL);
4215 if (aq_ret) { 4215 if (aq_ret) {
4216 dev_info(&pf->pdev->dev, 4216 dev_info(&pf->pdev->dev,
4217 "couldn't get pf vsi ets bw config, err %d, aq_err %d\n", 4217 "couldn't get PF vsi ets bw config, err %d, aq_err %d\n",
4218 aq_ret, pf->hw.aq.asq_last_status); 4218 aq_ret, pf->hw.aq.asq_last_status);
4219 return -EINVAL; 4219 return -EINVAL;
4220 } 4220 }
@@ -4976,7 +4976,7 @@ err_setup_tx:
4976 4976
4977/** 4977/**
4978 * i40e_fdir_filter_exit - Cleans up the Flow Director accounting 4978 * i40e_fdir_filter_exit - Cleans up the Flow Director accounting
4979 * @pf: Pointer to pf 4979 * @pf: Pointer to PF
4980 * 4980 *
4981 * This function destroys the hlist where all the Flow Director 4981 * This function destroys the hlist where all the Flow Director
4982 * filters were saved. 4982 * filters were saved.
@@ -5941,7 +5941,7 @@ static void i40e_verify_eeprom(struct i40e_pf *pf)
5941 5941
5942/** 5942/**
5943 * i40e_enable_pf_switch_lb 5943 * i40e_enable_pf_switch_lb
5944 * @pf: pointer to the pf structure 5944 * @pf: pointer to the PF structure
5945 * 5945 *
5946 * enable switch loop back or die - no point in a return value 5946 * enable switch loop back or die - no point in a return value
5947 **/ 5947 **/
@@ -5957,7 +5957,7 @@ static void i40e_enable_pf_switch_lb(struct i40e_pf *pf)
5957 aq_ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); 5957 aq_ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
5958 if (aq_ret) { 5958 if (aq_ret) {
5959 dev_info(&pf->pdev->dev, 5959 dev_info(&pf->pdev->dev,
5960 "%s couldn't get pf vsi config, err %d, aq_err %d\n", 5960 "%s couldn't get PF vsi config, err %d, aq_err %d\n",
5961 __func__, aq_ret, pf->hw.aq.asq_last_status); 5961 __func__, aq_ret, pf->hw.aq.asq_last_status);
5962 return; 5962 return;
5963 } 5963 }
@@ -5975,7 +5975,7 @@ static void i40e_enable_pf_switch_lb(struct i40e_pf *pf)
5975 5975
5976/** 5976/**
5977 * i40e_disable_pf_switch_lb 5977 * i40e_disable_pf_switch_lb
5978 * @pf: pointer to the pf structure 5978 * @pf: pointer to the PF structure
5979 * 5979 *
5980 * disable switch loop back or die - no point in a return value 5980 * disable switch loop back or die - no point in a return value
5981 **/ 5981 **/
@@ -5991,7 +5991,7 @@ static void i40e_disable_pf_switch_lb(struct i40e_pf *pf)
5991 aq_ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL); 5991 aq_ret = i40e_aq_get_vsi_params(&pf->hw, &ctxt, NULL);
5992 if (aq_ret) { 5992 if (aq_ret) {
5993 dev_info(&pf->pdev->dev, 5993 dev_info(&pf->pdev->dev,
5994 "%s couldn't get pf vsi config, err %d, aq_err %d\n", 5994 "%s couldn't get PF vsi config, err %d, aq_err %d\n",
5995 __func__, aq_ret, pf->hw.aq.asq_last_status); 5995 __func__, aq_ret, pf->hw.aq.asq_last_status);
5996 return; 5996 return;
5997 } 5997 }
@@ -6245,7 +6245,7 @@ static void i40e_fdir_teardown(struct i40e_pf *pf)
6245 * i40e_prep_for_reset - prep for the core to reset 6245 * i40e_prep_for_reset - prep for the core to reset
6246 * @pf: board private structure 6246 * @pf: board private structure
6247 * 6247 *
6248 * Close up the VFs and other things in prep for pf Reset. 6248 * Close up the VFs and other things in prep for PF Reset.
6249 **/ 6249 **/
6250static void i40e_prep_for_reset(struct i40e_pf *pf) 6250static void i40e_prep_for_reset(struct i40e_pf *pf)
6251{ 6251{
@@ -6471,7 +6471,7 @@ clear_recovery:
6471} 6471}
6472 6472
6473/** 6473/**
6474 * i40e_handle_reset_warning - prep for the pf to reset, reset and rebuild 6474 * i40e_handle_reset_warning - prep for the PF to reset, reset and rebuild
6475 * @pf: board private structure 6475 * @pf: board private structure
6476 * 6476 *
6477 * Close up the VFs and other things in prep for a Core Reset, 6477 * Close up the VFs and other things in prep for a Core Reset,
@@ -6485,7 +6485,7 @@ static void i40e_handle_reset_warning(struct i40e_pf *pf)
6485 6485
6486/** 6486/**
6487 * i40e_handle_mdd_event 6487 * i40e_handle_mdd_event
6488 * @pf: pointer to the pf structure 6488 * @pf: pointer to the PF structure
6489 * 6489 *
6490 * Called from the MDD irq handler to identify possibly malicious vfs 6490 * Called from the MDD irq handler to identify possibly malicious vfs
6491 **/ 6491 **/
@@ -6514,7 +6514,7 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
6514 I40E_GL_MDET_TX_QUEUE_SHIFT) - 6514 I40E_GL_MDET_TX_QUEUE_SHIFT) -
6515 pf->hw.func_caps.base_queue; 6515 pf->hw.func_caps.base_queue;
6516 if (netif_msg_tx_err(pf)) 6516 if (netif_msg_tx_err(pf))
6517 dev_info(&pf->pdev->dev, "Malicious Driver Detection event 0x%02x on TX queue %d pf number 0x%02x vf number 0x%02x\n", 6517 dev_info(&pf->pdev->dev, "Malicious Driver Detection event 0x%02x on TX queue %d PF number 0x%02x VF number 0x%02x\n",
6518 event, queue, pf_num, vf_num); 6518 event, queue, pf_num, vf_num);
6519 wr32(hw, I40E_GL_MDET_TX, 0xffffffff); 6519 wr32(hw, I40E_GL_MDET_TX, 0xffffffff);
6520 mdd_detected = true; 6520 mdd_detected = true;
@@ -6917,7 +6917,7 @@ static int i40e_vsi_clear(struct i40e_vsi *vsi)
6917 goto unlock_vsi; 6917 goto unlock_vsi;
6918 } 6918 }
6919 6919
6920 /* updates the pf for this cleared vsi */ 6920 /* updates the PF for this cleared vsi */
6921 i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx); 6921 i40e_put_lump(pf->qp_pile, vsi->base_queue, vsi->idx);
6922 i40e_put_lump(pf->irq_pile, vsi->base_vector, vsi->idx); 6922 i40e_put_lump(pf->irq_pile, vsi->base_vector, vsi->idx);
6923 6923
@@ -7491,7 +7491,7 @@ i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf)
7491 struct i40e_aqc_configure_partition_bw_data bw_data; 7491 struct i40e_aqc_configure_partition_bw_data bw_data;
7492 i40e_status status; 7492 i40e_status status;
7493 7493
7494 /* Set the valid bit for this pf */ 7494 /* Set the valid bit for this PF */
7495 bw_data.pf_valid_bits = cpu_to_le16(1 << pf->hw.pf_id); 7495 bw_data.pf_valid_bits = cpu_to_le16(1 << pf->hw.pf_id);
7496 bw_data.max_bw[pf->hw.pf_id] = pf->npar_max_bw & I40E_ALT_BW_VALUE_MASK; 7496 bw_data.max_bw[pf->hw.pf_id] = pf->npar_max_bw & I40E_ALT_BW_VALUE_MASK;
7497 bw_data.min_bw[pf->hw.pf_id] = pf->npar_min_bw & I40E_ALT_BW_VALUE_MASK; 7497 bw_data.min_bw[pf->hw.pf_id] = pf->npar_min_bw & I40E_ALT_BW_VALUE_MASK;
@@ -7649,11 +7649,11 @@ static int i40e_sw_init(struct i40e_pf *pf)
7649 (pf->hw.func_caps.fd_filters_best_effort > 0)) { 7649 (pf->hw.func_caps.fd_filters_best_effort > 0)) {
7650 pf->flags |= I40E_FLAG_FD_ATR_ENABLED; 7650 pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
7651 pf->atr_sample_rate = I40E_DEFAULT_ATR_SAMPLE_RATE; 7651 pf->atr_sample_rate = I40E_DEFAULT_ATR_SAMPLE_RATE;
7652 /* Setup a counter for fd_atr per pf */ 7652 /* Setup a counter for fd_atr per PF */
7653 pf->fd_atr_cnt_idx = I40E_FD_ATR_STAT_IDX(pf->hw.pf_id); 7653 pf->fd_atr_cnt_idx = I40E_FD_ATR_STAT_IDX(pf->hw.pf_id);
7654 if (!(pf->flags & I40E_FLAG_MFP_ENABLED)) { 7654 if (!(pf->flags & I40E_FLAG_MFP_ENABLED)) {
7655 pf->flags |= I40E_FLAG_FD_SB_ENABLED; 7655 pf->flags |= I40E_FLAG_FD_SB_ENABLED;
7656 /* Setup a counter for fd_sb per pf */ 7656 /* Setup a counter for fd_sb per PF */
7657 pf->fd_sb_cnt_idx = I40E_FD_SB_STAT_IDX(pf->hw.pf_id); 7657 pf->fd_sb_cnt_idx = I40E_FD_SB_STAT_IDX(pf->hw.pf_id);
7658 } else { 7658 } else {
7659 dev_info(&pf->pdev->dev, 7659 dev_info(&pf->pdev->dev,
@@ -8257,7 +8257,7 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
8257 ctxt.flags = I40E_AQ_VSI_TYPE_PF; 8257 ctxt.flags = I40E_AQ_VSI_TYPE_PF;
8258 if (ret) { 8258 if (ret) {
8259 dev_info(&pf->pdev->dev, 8259 dev_info(&pf->pdev->dev,
8260 "couldn't get pf vsi config, err %d, aq_err %d\n", 8260 "couldn't get PF vsi config, err %d, aq_err %d\n",
8261 ret, pf->hw.aq.asq_last_status); 8261 ret, pf->hw.aq.asq_last_status);
8262 return -ENOENT; 8262 return -ENOENT;
8263 } 8263 }
@@ -9158,7 +9158,7 @@ err_alloc:
9158} 9158}
9159 9159
9160/** 9160/**
9161 * i40e_setup_pf_switch_element - set pf vars based on switch type 9161 * i40e_setup_pf_switch_element - set PF vars based on switch type
9162 * @pf: board private structure 9162 * @pf: board private structure
9163 * @ele: element we are building info from 9163 * @ele: element we are building info from
9164 * @num_reported: total number of elements 9164 * @num_reported: total number of elements
@@ -9491,7 +9491,7 @@ static void i40e_determine_queue_usage(struct i40e_pf *pf)
9491 * i40e_setup_pf_filter_control - Setup PF static filter control 9491 * i40e_setup_pf_filter_control - Setup PF static filter control
9492 * @pf: PF to be setup 9492 * @pf: PF to be setup
9493 * 9493 *
9494 * i40e_setup_pf_filter_control sets up a pf's initial filter control 9494 * i40e_setup_pf_filter_control sets up a PF's initial filter control
9495 * settings. If PE/FCoE are enabled then it will also set the per PF 9495 * settings. If PE/FCoE are enabled then it will also set the per PF
9496 * based filter sizes required for them. It also enables Flow director, 9496 * based filter sizes required for them. It also enables Flow director,
9497 * ethertype and macvlan type filter settings for the pf. 9497 * ethertype and macvlan type filter settings for the pf.
@@ -9568,8 +9568,8 @@ static void i40e_print_features(struct i40e_pf *pf)
9568 * @pdev: PCI device information struct 9568 * @pdev: PCI device information struct
9569 * @ent: entry in i40e_pci_tbl 9569 * @ent: entry in i40e_pci_tbl
9570 * 9570 *
9571 * i40e_probe initializes a pf identified by a pci_dev structure. 9571 * i40e_probe initializes a PF identified by a pci_dev structure.
9572 * The OS initialization, configuring of the pf private structure, 9572 * The OS initialization, configuring of the PF private structure,
9573 * and a hardware reset occur. 9573 * and a hardware reset occur.
9574 * 9574 *
9575 * Returns 0 on success, negative on failure 9575 * Returns 0 on success, negative on failure