11/*******************************************************************************
22 *
33 * Intel Ethernet Controller XL710 Family Linux Driver
4- * Copyright(c) 2013 - 2016 Intel Corporation.
4+ * Copyright(c) 2013 - 2017 Intel Corporation.
55 *
66 * This program is free software; you can redistribute it and/or modify it
77 * under the terms and conditions of the GNU General Public License,
@@ -8740,10 +8740,10 @@ int i40e_reconfig_rss_queues(struct i40e_pf *pf, int queue_count)
87408740}
87418741
87428742/**
8743- * i40e_get_npar_bw_setting - Retrieve BW settings for this PF partition
8743+ * i40e_get_partition_bw_setting - Retrieve BW settings for this PF partition
87448744 * @pf: board private structure
87458745 **/
8746- i40e_status i40e_get_npar_bw_setting (struct i40e_pf * pf )
8746+ i40e_status i40e_get_partition_bw_setting (struct i40e_pf * pf )
87478747{
87488748 i40e_status status ;
87498749 bool min_valid , max_valid ;
@@ -8754,27 +8754,27 @@ i40e_status i40e_get_npar_bw_setting(struct i40e_pf *pf)
87548754
87558755 if (!status ) {
87568756 if (min_valid )
8757- pf -> npar_min_bw = min_bw ;
8757+ pf -> min_bw = min_bw ;
87588758 if (max_valid )
8759- pf -> npar_max_bw = max_bw ;
8759+ pf -> max_bw = max_bw ;
87608760 }
87618761
87628762 return status ;
87638763}
87648764
87658765/**
8766- * i40e_set_npar_bw_setting - Set BW settings for this PF partition
8766+ * i40e_set_partition_bw_setting - Set BW settings for this PF partition
87678767 * @pf: board private structure
87688768 **/
8769- i40e_status i40e_set_npar_bw_setting (struct i40e_pf * pf )
8769+ i40e_status i40e_set_partition_bw_setting (struct i40e_pf * pf )
87708770{
87718771 struct i40e_aqc_configure_partition_bw_data bw_data ;
87728772 i40e_status status ;
87738773
87748774 /* Set the valid bit for this PF */
87758775 bw_data .pf_valid_bits = cpu_to_le16 (BIT (pf -> hw .pf_id ));
8776- bw_data .max_bw [pf -> hw .pf_id ] = pf -> npar_max_bw & I40E_ALT_BW_VALUE_MASK ;
8777- bw_data .min_bw [pf -> hw .pf_id ] = pf -> npar_min_bw & I40E_ALT_BW_VALUE_MASK ;
8776+ bw_data .max_bw [pf -> hw .pf_id ] = pf -> max_bw & I40E_ALT_BW_VALUE_MASK ;
8777+ bw_data .min_bw [pf -> hw .pf_id ] = pf -> min_bw & I40E_ALT_BW_VALUE_MASK ;
87788778
87798779 /* Set the new bandwidths */
87808780 status = i40e_aq_configure_partition_bw (& pf -> hw , & bw_data , NULL );
@@ -8783,10 +8783,10 @@ i40e_status i40e_set_npar_bw_setting(struct i40e_pf *pf)
87838783}
87848784
87858785/**
8786- * i40e_commit_npar_bw_setting - Commit BW settings for this PF partition
8786+ * i40e_commit_partition_bw_setting - Commit BW settings for this PF partition
87878787 * @pf: board private structure
87888788 **/
8789- i40e_status i40e_commit_npar_bw_setting (struct i40e_pf * pf )
8789+ i40e_status i40e_commit_partition_bw_setting (struct i40e_pf * pf )
87908790{
87918791 /* Commit temporary BW setting to permanent NVM image */
87928792 enum i40e_admin_queue_err last_aq_status ;
@@ -8905,16 +8905,19 @@ static int i40e_sw_init(struct i40e_pf *pf)
89058905 if (pf -> hw .func_caps .npar_enable || pf -> hw .func_caps .flex10_enable ) {
89068906 pf -> flags |= I40E_FLAG_MFP_ENABLED ;
89078907 dev_info (& pf -> pdev -> dev , "MFP mode Enabled\n" );
8908- if (i40e_get_npar_bw_setting (pf ))
8908+ if (i40e_get_partition_bw_setting (pf )) {
89098909 dev_warn (& pf -> pdev -> dev ,
8910- "Could not get NPAR bw settings\n" );
8911- else
8910+ "Could not get partition bw settings\n" );
8911+ } else {
89128912 dev_info (& pf -> pdev -> dev ,
8913- "Min BW = %8.8x, Max BW = %8.8x\n" ,
8914- pf -> npar_min_bw , pf -> npar_max_bw );
8913+ "Partition BW Min = %8.8x, Max = %8.8x\n" ,
8914+ pf -> min_bw , pf -> max_bw );
8915+
8916+ /* nudge the Tx scheduler */
8917+ i40e_set_partition_bw_setting (pf );
8918+ }
89158919 }
89168920
8917- /* FW/NVM is not yet fixed in this regard */
89188921 if ((pf -> hw .func_caps .fd_filters_guaranteed > 0 ) ||
89198922 (pf -> hw .func_caps .fd_filters_best_effort > 0 )) {
89208923 pf -> flags |= I40E_FLAG_FD_ATR_ENABLED ;
@@ -9017,10 +9020,6 @@ static int i40e_sw_init(struct i40e_pf *pf)
90179020
90189021 mutex_init (& pf -> switch_mutex );
90199022
9020- /* If NPAR is enabled nudge the Tx scheduler */
9021- if (pf -> hw .func_caps .npar_enable && (!i40e_get_npar_bw_setting (pf )))
9022- i40e_set_npar_bw_setting (pf );
9023-
90249023sw_init_done :
90259024 return err ;
90269025}
0 commit comments