100GbE Intel Wired LAN Driver Updates 2019-05-30
Subsystems (3)
This series contains updates to ice driver only.
Brett continues his work with interrupt handling by fixing an issue where were writing to the incorrect register to disable all VF interrupts.
Tony consolidates the unicast and multicast MAC filters into a single new function.
Anirudh adds support for virtual channel vector mapping to receive and transmit queues. This uses a bitmap to associate indicated queues with the specified vector. Makes several cosmetic code cleanups, as well as update the driver to align with the current specification for managing MAC operation codes (opcodes).
Paul adds support for Forward Error Correction (FEC) and also adds the ethtool get and set handlers to modify FEC parameters.
Bruce cleans up the driver code to fix a number of issues, such as, reducing the scope of some local variables, reduce the number of de-references by changing a local variable and reorder the code to remove unnecessary "goto's".
Dave adds switch rules to be able to handle LLDP packets and in the process, fix a couple of issues found, like stop treating DCBx state of "not started" as an error and stop hard coding the filter information flag to transmit.
Jacob updates the driver to allow for more granular debugging by developers by using a distinct separate bit for dumping firmware logs.
The following are changes since commit 517f4c49aafce3d2c3ac54ae0bb36f2c76e57fe8:
net: phy: tja11xx: Switch to HWMON_CHANNEL_INFO()
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue 100GbE
Akeem G Abodunrin (1):
ice: Use right type for ice_cfg_vsi_lan return
Anirudh Venkataramanan (7):
ice: Add support for virtchnl_vector_map.[rxq|txq]_map
ice: Use continue instead of an else block
ice: Align to updated AQ command formats
ice: Move define for ICE_AQC_DRIVER_UNLOADING
ice: Update function header
ice: Recognize higher speeds
ice: Trivial cosmetic changes
Brett Creeley (1):
ice: Use GLINT_DYN_CTL to disable VF's interrupts
Bruce Allan (1):
ice: Cleanup ice_update_link_info
Dave Ertman (1):
ice: Add switch rules to handle LLDP packets
Jacob Keller (1):
ice: Use a different ICE_DBG bit for firmware log messages
Paul Greenwalt (1):
ice: Add support for Forward Error Correction (FEC)
Preethi Banala (1):
ice: Change minimum descriptor count value for Tx/Rx rings
Tony Nguyen (1):
ice: Introduce ice_init_mac_fltr and move ice_napi_del
drivers/net/ethernet/intel/ice/ice.h | 2 +- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 25 +- drivers/net/ethernet/intel/ice/ice_common.c | 121 +++++++-- drivers/net/ethernet/intel/ice/ice_common.h | 6 +- drivers/net/ethernet/intel/ice/ice_controlq.c | 2 +- drivers/net/ethernet/intel/ice/ice_controlq.h | 2 +- drivers/net/ethernet/intel/ice/ice_dcb.c | 14 +- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 24 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 229 +++++++++++++++++- drivers/net/ethernet/intel/ice/ice_lib.c | 216 +++++++++++++---- drivers/net/ethernet/intel/ice/ice_lib.h | 12 + drivers/net/ethernet/intel/ice/ice_main.c | 199 ++++++++++----- drivers/net/ethernet/intel/ice/ice_switch.c | 5 +- drivers/net/ethernet/intel/ice/ice_txrx.c | 8 +- drivers/net/ethernet/intel/ice/ice_type.h | 12 +- .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 95 ++++---- 16 files changed, 754 insertions(+), 218 deletions(-)
Signature · 1 line
2.21.0
PATCH 1/15 ice: Use GLINT_DYN_CTL to disable VF's interrupts
From: Brett Creeley <[email protected]>
Currently in ice_free_vf_res() we are writing to the VFINT_DYN_CTLN register in the PF's function space to disable all VF's interrupts. This is incorrect because this register is only for use in the VF's function space. This becomes obvious when seeing that the valid indices used for the VFINT_DYN_CTLN register is from 0-63, which is the maximum number of interrupts for a VF (not including the OICR interrupt). Fix this by writing to the GLINT_DYN_CTL register for each VF. We can do this because we keep track of each VF's first_vector_idx inside of the PF's function space and the number of interrupts given to each VF.
Also in ice_free_vfs() we were disabling Rx/Tx queues after calling pci_disable_sriov(). One part of disabling the Tx queues causes the PF driver to trigger a software interrupt, which causes the VF's napi routine to run. This doesn't currently work because pci_disable_sriov() causes iavf_remove() to be called which disables interrupts. Fix this by disabling Rx/Tx queues prior to pci_disable_sriov().
--- .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 41 ++++++------------- 1 file changed, 13 insertions(+), 28 deletions(-)
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +13 -28
@@ -140,18 +140,6 @@ static void ice_vc_notify_vf_link_state(struct ice_vf *vf) sizeof(pfe), NULL); } -/** -* ice_get_vf_vector - get VF interrupt vector register offset -* @vf_msix: number of MSIx vector per VF on a PF -* @vf_id: VF identifier -* @i: index of MSIx vector -*/ -static u32 ice_get_vf_vector (int vf_msix,int vf_id,int i) -{ -return ((i ==0 ) ?VFINT_DYN_CTLN (vf_id) : -VFINT_DYN_CTLN (((vf_msix -1 ) * (vf_id)) + (i -1 ))); -} -/** * ice_free_vf_res - Free a VF's resources * @vf: pointer to the VF info
@@ -159,7 +147,7 @@ static u32 ice_get_vf_vector(int vf_msix, int vf_id, int i)static void ice_free_vf_res (struct ice_vf *vf) {struct ice_pf *pf = vf->pf; -int i, pf_vf_msix; +int i, last_vector_idx;/* First, disable VF's configuration API to prevent OS from * accessing the VF's VSI after it's freed or invalidated.
@@ -174,13 +162,10 @@ static void ice_free_vf_res(struct ice_vf *vf) vf->num_mac =0 ; } - pf_vf_msix = pf->num_vf_msix; + last_vector_idx = vf->first_vector_idx + pf->num_vf_msix -1 ;/* Disable interrupts so that VF starts in a known state */ -for (i =0 ; i < pf_vf_msix; i++) { -u32 reg_idx; - - reg_idx =ice_get_vf_vector (pf_vf_msix, vf->vf_id, i); -wr32 (&pf->hw, reg_idx,VFINT_DYN_CTLN_CLEARPBA_M ); +for (i = vf->first_vector_idx; i <= last_vector_idx; i++) { +wr32 (&pf->hw,GLINT_DYN_CTL (i),GLINT_DYN_CTL_CLEARPBA_M );ice_flush (&pf->hw); }/* reset some of the state variables keeping track of the resources */
@@ -281,15 +266,6 @@ void ice_free_vfs(struct ice_pf *pf)while (test_and_set_bit (__ICE_VF_DIS, pf->state))usleep_range (1000 ,2000 ); -/* Disable IOV before freeing resources. This lets any VF drivers -* running in the host get themselves cleaned up before we yank -* the carpet out from underneath their feet. -*/ -if (!pci_vfs_assigned (pf->pdev)) -pci_disable_sriov (pf->pdev); -else -dev_warn (&pf->pdev->dev,"VFs are assigned - not disabling SR-IOV\n" ); -/* Avoid wait time by stopping all VFs at the same time */ for (i =0 ; i < pf->num_alloc_vfs; i++) {struct ice_vsi *vsi;
@@ -305,6 +281,15 @@ void ice_free_vfs(struct ice_pf *pf)clear_bit (ICE_VF_STATE_ENA , pf->vf[i].vf_states); } +/* Disable IOV before freeing resources. This lets any VF drivers +* running in the host get themselves cleaned up before we yank +* the carpet out from underneath their feet. +*/ +if (!pci_vfs_assigned (pf->pdev)) +pci_disable_sriov (pf->pdev); +else +dev_warn (&pf->pdev->dev,"VFs are assigned - not disabling SR-IOV\n" ); + tmp = pf->num_alloc_vfs; pf->num_vf_qps =0 ; pf->num_alloc_vfs =0 ;
Signature · 1 line
2.21.0
PATCH 2/15 ice: Introduce ice_init_mac_fltr and move ice_napi_del
In reply to Jeff KirsherFrom: Tony Nguyen <[email protected]>
Consolidate adding unicast and broadcast MAC filters in a single new function ice_init_mac_fltr.
Move ice_napi_del to ice_lib.c
--- drivers/net/ethernet/intel/ice/ice_lib.c | 15 +++ drivers/net/ethernet/intel/ice/ice_lib.h | 2 + drivers/net/ethernet/intel/ice/ice_main.c | 106 +++++++++++++--------- 3 files changed, 79 insertions(+), 44 deletions(-)
drivers/net/ethernet/intel/ice/ice_lib.c +15 -0
@@ -2733,6 +2733,21 @@ void ice_vsi_dis_irq(struct ice_vsi *vsi) } } +/** +* ice_napi_del - Remove NAPI handler for the VSI +* @vsi: VSI for which NAPI handler is to be removed +*/ +void ice_napi_del (struct ice_vsi *vsi) +{ +int v_idx; + +if (!vsi->netdev) +return ; + +ice_for_each_q_vector (vsi, v_idx) +netif_napi_del (&vsi->q_vectors[v_idx]->napi); +} +/** * ice_vsi_release - Delete a VSI and free its resources * @vsi: the VSI being removed
drivers/net/ethernet/intel/ice/ice_lib.h +2 -0
@@ -49,6 +49,8 @@ struct ice_vsi * ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi, enum ice_vsi_type type, u16 vf_id); +void ice_napi_del (struct ice_vsi *vsi); +int ice_vsi_release (struct ice_vsi *vsi);void ice_vsi_close (struct ice_vsi *vsi);
drivers/net/ethernet/intel/ice/ice_main.c +62 -44
135 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH 3/15 ice: Add support for virtchnl_vector_map.[rxq|txq]_map
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
Add support for virtchnl_vector_map.[rxq|txq]_map to use bitmap to associate indicated queues with the specified vector. This support is needed since the Windows AVF driver calls VIRTCHNL_OP_CONFIG_IRQ_MAP for each vector and used the bitmap to indicate the associated queues.
Updated ice_vc_dis_qs_msg to not subtract one from virtchnl_irq_map_info.num_vectors, and changed the VSI vector index to the vector id. This change supports the Windows AVF driver which maps one vector at a time and sets num_vectors to one. Using vectors_id to index the vector array .
Add check for vector_id zero, and return VIRTCHNL_STATUS_ERR_PARAM if vector_id is zero and there are rings associated with that vector. Vector_id zero is for the OICR.
--- drivers/net/ethernet/intel/ice/ice_lib.c | 108 ++++++++++++------ drivers/net/ethernet/intel/ice/ice_lib.h | 8 ++ .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 43 +++++-- 3 files changed, 115 insertions(+), 44 deletions(-)
drivers/net/ethernet/intel/ice/ice_lib.c +73 -35
@@ -321,10 +321,10 @@ static void ice_vsi_set_num_qs(struct ice_vsi *vsi, u16 vf_id) vsi->alloc_rxq = vf->num_vf_qs;/* pf->num_vf_msix includes (VF miscellaneous vector + * data queue interrupts). Since vsi->num_q_vectors is number -* of queues vectors, subtract 1 from the original vector -* count +* of queues vectors, subtract 1 (ICE_NONQ_VECS_VF) from the +* original vector count */ - vsi->num_q_vectors = pf->num_vf_msix -1 ; + vsi->num_q_vectors = pf->num_vf_msix -ICE_NONQ_VECS_VF ;break ;case ICE_VSI_LB : vsi->alloc_txq =1 ;
@@ -1835,9 +1835,74 @@ ice_cfg_itr(struct ice_hw *hw, struct ice_q_vector *q_vector) } } +/** +* ice_cfg_txq_interrupt - configure interrupt on Tx queue +* @vsi: the VSI being configured +* @txq: Tx queue being mapped to MSI-X vector +* @msix_idx: MSI-X vector index within the function +* @itr_idx: ITR index of the interrupt cause +* +* Configure interrupt on Tx queue by associating Tx queue to MSI-X vector +* within the function space. +*/ +#ifdef CONFIG_PCI_IOV +void +ice_cfg_txq_interrupt(struct ice_vsi *vsi, u16 txq, u16 msix_idx, u16 itr_idx) +#else +static void +ice_cfg_txq_interrupt(struct ice_vsi *vsi, u16 txq, u16 msix_idx, u16 itr_idx) +#endif /* CONFIG_PCI_IOV */ +{ + struct ice_pf *pf = vsi->back; + struct ice_hw *hw = &pf->hw; + u32 val; + + itr_idx = (itr_idx << QINT_TQCTL_ITR_INDX_S) & QINT_TQCTL_ITR_INDX_M; + + val = QINT_TQCTL_CAUSE_ENA_M | itr_idx | + ((msix_idx << QINT_TQCTL_MSIX_INDX_S) & QINT_TQCTL_MSIX_INDX_M); + + wr32(hw, QINT_TQCTL(vsi->txq_map[txq]), val); +} + +/** + * ice_cfg_rxq_interrupt - configure interrupt on Rx queue + * @vsi: the VSI being configured + * @rxq: Rx queue being mapped to MSI-X vector + * @msix_idx: MSI-X vector index within the function + * @itr_idx: ITR index of the interrupt cause + * + * Configure interrupt on Rx queue by associating Rx queue to MSI-X vector + * within the function space. + */ +#ifdef CONFIG_PCI_IOV +void +ice_cfg_rxq_interrupt(struct ice_vsi *vsi, u16 rxq, u16 msix_idx, u16 itr_idx) +#else +static void +ice_cfg_rxq_interrupt(struct ice_vsi *vsi, u16 rxq, u16 msix_idx, u16 itr_idx) +#endif /* CONFIG_PCI_IOV */ +{ + struct ice_pf *pf = vsi->back; + struct ice_hw *hw = &pf->hw; + u32 val; + + itr_idx = (itr_idx << QINT_RQCTL_ITR_INDX_S) & QINT_RQCTL_ITR_INDX_M; + + val = QINT_RQCTL_CAUSE_ENA_M | itr_idx | + ((msix_idx << QINT_RQCTL_MSIX_INDX_S) & QINT_RQCTL_MSIX_INDX_M); + + wr32(hw, QINT_RQCTL(vsi->rxq_map[rxq]), val); + + ice_flush(hw); +} + /** * ice_vsi_cfg_msix - MSIX mode Interrupt Config in the HW * @vsi: the VSI being configured + * + * This configures MSIX mode interrupts for the PF VSI, and should not be used + * for the VF VSI. */ void ice_vsi_cfg_msix(struct ice_vsi *vsi) {
@@ -1850,8 +1915,7 @@ void ice_vsi_cfg_msix(struct ice_vsi *vsi)struct ice_q_vector *q_vector = vsi->q_vectors[i];u16 reg_idx = q_vector->reg_idx; -if (vsi->type !=ICE_VSI_VF ) -ice_cfg_itr (hw, q_vector); +ice_cfg_itr (hw, q_vector);wr32 (hw,GLINT_RATE (reg_idx),ice_intrl_usec_to_reg (q_vector->intrl, hw->intrl_gran));
@@ -1868,43 +1932,17 @@ void ice_vsi_cfg_msix(struct ice_vsi *vsi)* tracked for this PF. */ for (q =0 ; q < q_vector->num_ring_tx; q++) { -int itr_idx = (q_vector->tx.itr_idx << -QINT_TQCTL_ITR_INDX_S ) & -QINT_TQCTL_ITR_INDX_M ; -u32 val; - -if (vsi->type ==ICE_VSI_VF ) - val =QINT_TQCTL_CAUSE_ENA_M | itr_idx | - (((i +1 ) <<QINT_TQCTL_MSIX_INDX_S ) & -QINT_TQCTL_MSIX_INDX_M ); -else - val =QINT_TQCTL_CAUSE_ENA_M | itr_idx | - ((reg_idx <<QINT_TQCTL_MSIX_INDX_S ) & -QINT_TQCTL_MSIX_INDX_M ); -wr32 (hw,QINT_TQCTL (vsi->txq_map[txq]), val); +ice_cfg_txq_interrupt (vsi, txq, reg_idx, + q_vector->tx.itr_idx); txq++; }for (q =0 ; q < q_vector->num_ring_rx; q++) { -int itr_idx = (q_vector->rx.itr_idx << -QINT_RQCTL_ITR_INDX_S ) & -QINT_RQCTL_ITR_INDX_M ; -u32 val; - -if (vsi->type ==ICE_VSI_VF ) - val =QINT_RQCTL_CAUSE_ENA_M | itr_idx | - (((i +1 ) <<QINT_RQCTL_MSIX_INDX_S ) & -QINT_RQCTL_MSIX_INDX_M ); -else - val =QINT_RQCTL_CAUSE_ENA_M | itr_idx | - ((reg_idx <<QINT_RQCTL_MSIX_INDX_S ) & -QINT_RQCTL_MSIX_INDX_M ); -wr32 (hw,QINT_RQCTL (vsi->rxq_map[rxq]), val); +ice_cfg_rxq_interrupt (vsi, rxq, reg_idx, + q_vector->rx.itr_idx); rxq++; } } - -ice_flush (hw); }/**
drivers/net/ethernet/intel/ice/ice_lib.h +8 -0
@@ -19,6 +19,14 @@ int ice_vsi_cfg_lan_txqs(struct ice_vsi *vsi);void ice_vsi_cfg_msix (struct ice_vsi *vsi); +#ifdef CONFIG_PCI_IOV +void +ice_cfg_txq_interrupt (struct ice_vsi *vsi,u16 txq,u16 msix_idx,u16 itr_idx); + +void +ice_cfg_rxq_interrupt (struct ice_vsi *vsi,u16 rxq,u16 msix_idx,u16 itr_idx); +#endif /* CONFIG_PCI_IOV */ +int ice_vsi_add_vlan (struct ice_vsi *vsi,u16 vid);int ice_vsi_kill_vlan (struct ice_vsi *vsi,u16 vid);
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +34 -9
82 lines not on this page · raw message
Signature · 1 line
2.21.0
PATCH 4/15 ice: Add support for Forward Error Correction (FEC)
In reply to Jeff KirsherFrom: Paul Greenwalt <[email protected]>
This patch adds driver support for Forward Error Correction (FEC) and ethtool handlers to set/get FEC params.
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 4 + drivers/net/ethernet/intel/ice/ice_common.c | 70 ++++++ drivers/net/ethernet/intel/ice/ice_common.h | 6 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 216 ++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_main.c | 47 +++- drivers/net/ethernet/intel/ice/ice_type.h | 9 + 6 files changed, 349 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +4 -0
@@ -920,6 +920,8 @@ struct ice_aqc_get_phy_caps_data {#define ICE_AQC_PHY_EN_LINK BIT(3)#define ICE_AQC_PHY_AN_MODE BIT(4)#define ICE_AQC_GET_PHY_EN_MOD_QUAL BIT(5) +#define ICE_AQC_PHY_EN_AUTO_FEC BIT(7) +#define ICE_AQC_PHY_CAPS_MASK ICE_M(0xff, 0)u8 low_power_ctrl;#define ICE_AQC_PHY_EN_D3COLD_LOW_POWER_AUTONEG BIT(0)__le16 eee_cap;
@@ -940,6 +942,7 @@ struct ice_aqc_get_phy_caps_data {#define ICE_AQC_PHY_FEC_25G_RS_544_REQ BIT(4)#define ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN BIT(6)#define ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN BIT(7) +#define ICE_AQC_PHY_FEC_MASK ICE_M(0xdf, 0)u8 extended_compliance_code;#define ICE_MODULE_TYPE_TOTAL_BYTE 3u8 module_type[ICE_MODULE_TYPE_TOTAL_BYTE ];
@@ -1062,6 +1065,7 @@ struct ice_aqc_get_link_status_data {#define ICE_AQ_LINK_25G_KR_FEC_EN BIT(0)#define ICE_AQ_LINK_25G_RS_528_FEC_EN BIT(1)#define ICE_AQ_LINK_25G_RS_544_FEC_EN BIT(2) +#define ICE_AQ_FEC_MASK ICE_M(0x7, 0)/* Pacing Config */ #define ICE_AQ_CFG_PACING_S 3#define ICE_AQ_CFG_PACING_M (0xF << ICE_AQ_CFG_PACING_S)
drivers/net/ethernet/intel/ice/ice_common.c +70 -0
82 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_common.h +5 -1
@@ -86,7 +86,11 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,enum ice_status ice_set_fc (struct ice_port_info *pi,u8 *aq_failures,bool ena_auto_link_update); - +void +ice_cfg_phy_fec (struct ice_aqc_set_phy_cfg_data *cfg,enum ice_fec_mode fec); +void +ice_copy_phy_caps_to_cfg (struct ice_aqc_get_phy_caps_data *caps, +struct ice_aqc_set_phy_cfg_data *cfg);enum ice_status ice_aq_set_link_restart_an (struct ice_port_info *pi,bool ena_link,struct ice_sq_cd *cd);
drivers/net/ethernet/intel/ice/ice_ethtool.c +216 -0
240 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_main.c +45 -2
60 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_type.h +9 -0
@@ -61,6 +61,13 @@ enum ice_fc_mode {ICE_FC_DFLT }; +enum ice_fec_mode { +ICE_FEC_NONE =0 , +ICE_FEC_RS , +ICE_FEC_BASER , +ICE_FEC_AUTO +}; +enum ice_set_fc_aq_failures {ICE_SET_FC_AQ_FAIL_NONE =0 ,ICE_SET_FC_AQ_FAIL_GET ,
@@ -93,6 +100,7 @@ struct ice_link_status {/* Refer to ice_aq_phy_type for bits definition */ u64 phy_type_low;u64 phy_type_high; +u8 topo_media_conflict;u16 max_frame_size;u16 link_speed;u16 req_speeds;
@@ -100,6 +108,7 @@ struct ice_link_status {u8 link_info;u8 an_info;u8 ext_info; +u8 fec_info;u8 pacing;/* Refer to #define from module_type[ICE_MODULE_TYPE_TOTAL_BYTE] of * ice_aqc_get_phy_caps structure
Signature · 1 line
2.21.0
PATCH 5/15 ice: Use right type for ice_cfg_vsi_lan return
In reply to Jeff KirsherFrom: Akeem G Abodunrin <[email protected]>
ice_cfg_vsi_lan returns a value of type enum ice_status. So use a local of the same type to capture the return value.
--- drivers/net/ethernet/intel/ice/ice_lib.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/net/ethernet/intel/ice/ice_lib.c +10 -8
@@ -2365,6 +2365,7 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi, {u16 max_txqs[ICE_MAX_TRAFFIC_CLASS ] = {0 };struct device *dev = &pf->pdev->dev; +enum ice_status status;struct ice_vsi *vsi;int ret, i;
@@ -2472,12 +2473,12 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi,for (i =0 ; i < vsi->tc_cfg.numtc; i++) max_txqs[i] = pf->num_lan_tx; - ret =ice_cfg_vsi_lan (vsi->port_info, vsi->idx, vsi->tc_cfg.ena_tc, - max_txqs); -if (ret) { + status =ice_cfg_vsi_lan (vsi->port_info, vsi->idx, vsi->tc_cfg.ena_tc, + max_txqs); +if (status) {dev_err (&pf->pdev->dev,"VSI %d failed lan queue config, error %d\n" , - vsi->vsi_num, ret); + vsi->vsi_num, status); goto unroll_vector_base; }
@@ -2868,6 +2869,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi) {u16 max_txqs[ICE_MAX_TRAFFIC_CLASS ] = {0 };struct ice_vf *vf =NULL ; +enum ice_status status;struct ice_pf *pf;int ret, i;
@@ -2961,12 +2963,12 @@ int ice_vsi_rebuild(struct ice_vsi *vsi)for (i =0 ; i < vsi->tc_cfg.numtc; i++) max_txqs[i] = pf->num_lan_tx; - ret =ice_cfg_vsi_lan (vsi->port_info, vsi->idx, vsi->tc_cfg.ena_tc, - max_txqs); -if (ret) { + status =ice_cfg_vsi_lan (vsi->port_info, vsi->idx, vsi->tc_cfg.ena_tc, + max_txqs); +if (status) {dev_err (&pf->pdev->dev,"VSI %d failed lan queue config, error %d\n" , - vsi->vsi_num, ret); + vsi->vsi_num, status); goto err_vectors; }return 0 ;
Signature · 1 line
2.21.0
PATCH 6/15 ice: Cleanup ice_update_link_info
In reply to Jeff KirsherFrom: Bruce Allan <[email protected]>
Do not allocate memory for the Get PHY Abilities command data buffer when it is not necessary, change one local variable to another to reduce the number of de-references, reduce the scope of some local variables, and reorder the code and change exit points to get rid of an unnecessary goto label.
--- drivers/net/ethernet/intel/ice/ice_common.c | 35 +++++++++++---------- 1 file changed, 18 insertions(+), 17 deletions(-)
drivers/net/ethernet/intel/ice/ice_common.c +18 -17
@@ -1998,36 +1998,37 @@ ice_aq_set_phy_cfg(struct ice_hw *hw, u8 lport,*/ enum ice_status ice_update_link_info (struct ice_port_info *pi) { -struct ice_aqc_get_phy_caps_data *pcaps; -struct ice_phy_info *phy_info; +struct ice_link_status *li;enum ice_status status; -struct ice_hw *hw;if (!pi)return ICE_ERR_PARAM ; - hw = pi->hw; - - pcaps =devm_kzalloc (ice_hw_to_dev (hw),sizeof (*pcaps),GFP_KERNEL ); -if (!pcaps) -return ICE_ERR_NO_MEMORY ; + li = &pi->phy.link_info; - phy_info = &pi->phy; status =ice_aq_get_link_info (pi, true,NULL ,NULL );if (status) - goto out; +return status; + +if (li->link_info &ICE_AQ_MEDIA_AVAILABLE ) { +struct ice_aqc_get_phy_caps_data *pcaps; +struct ice_hw *hw; + + hw = pi->hw; + pcaps =devm_kzalloc (ice_hw_to_dev (hw),sizeof (*pcaps), +GFP_KERNEL ); +if (!pcaps) +return ICE_ERR_NO_MEMORY ; -if (phy_info->link_info.link_info &ICE_AQ_MEDIA_AVAILABLE ) { status =ice_aq_get_phy_caps (pi, false,ICE_AQC_REPORT_SW_CFG , pcaps,NULL ); -if (status) - goto out; +if (!status) +memcpy (li->module_type, &pcaps->module_type, +sizeof (li->module_type)); -memcpy (phy_info->link_info.module_type, &pcaps->module_type, -sizeof (phy_info->link_info.module_type)); +devm_kfree (ice_hw_to_dev (hw), pcaps); } -out: -devm_kfree (ice_hw_to_dev (hw), pcaps); +return status; }
Signature · 1 line
2.21.0
PATCH 7/15 ice: Add switch rules to handle LLDP packets
In reply to Jeff KirsherFrom: Dave Ertman <[email protected]>
Add call to configure dropping egress LLDP packets in ice_vsi_setup and remove the rule in ice_vsi_release.
Add calls to add/remove rule to route LLDP packets to default VSI when FW LLDP engine is disabled/enabled and remove rule if applied during ice_vsi_release.
In the function ice_add_eth_mac(), there is a line that hard codes the filter info flag to TX. This is incorrect as this flag will be set by the calling function that built the list of filters to add. So remove the hard coded value.
This patch also contains a fix to stop treating the DCBx state of "Not Started" as an error state that kicks DCB in SW mode. This will address having non-cabled interfaces automatically go into SW mode with the FW engine running.
--- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 4 +- drivers/net/ethernet/intel/ice/ice_ethtool.c | 11 +++ drivers/net/ethernet/intel/ice/ice_lib.c | 73 +++++++++++++++++++- drivers/net/ethernet/intel/ice/ice_lib.h | 2 + drivers/net/ethernet/intel/ice/ice_switch.c | 5 +- 5 files changed, 89 insertions(+), 6 deletions(-)
drivers/net/ethernet/intel/ice/ice_dcb_lib.c +1 -3
@@ -387,10 +387,8 @@ int ice_init_pf_dcb(struct ice_pf *pf, bool locked)set_bit (ICE_FLAG_ENABLE_FW_LLDP , pf->flags); } -if (port_info->dcbx_status ==ICE_DCBX_STATUS_NOT_STARTED ) { - sw_default =1 ; +if (port_info->dcbx_status ==ICE_DCBX_STATUS_NOT_STARTED )dev_info (&pf->pdev->dev,"DCBX not started\n" ); - }if (sw_default) { err =ice_dcb_sw_dflt_cfg (pf, locked);
drivers/net/ethernet/intel/ice/ice_ethtool.c +11 -0
@@ -1205,6 +1205,7 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)if (!test_bit (ICE_FLAG_ENABLE_FW_LLDP , pf->flags)) {enum ice_status status; +/* Disable FW LLDP engine */ status =ice_aq_cfg_lldp_mib_change (&pf->hw, false,NULL );/* If unregistering for LLDP events fails, this is
@@ -1229,6 +1230,11 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags) status =ice_init_pf_dcb (pf, true);if (status)dev_warn (&pf->pdev->dev,"Fail to init DCB\n" ); + +/* Forward LLDP packets to default VSI so that they +* are passed up the stack +*/ +ice_cfg_sw_lldp (vsi, false, true); }else {enum ice_status status;bool dcbx_agent_status;
@@ -1262,6 +1268,11 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags) status =ice_init_pf_dcb (pf, true);if (status)dev_dbg (&pf->pdev->dev,"Fail to init DCB\n" ); + +/* Remove rule to direct LLDP packets to default VSI. +* The FW LLDP engine will now be consuming them. +*/ +ice_cfg_sw_lldp (vsi, false, false); } }clear_bit (ICE_FLAG_ETHTOOL_CTXT , pf->flags);
drivers/net/ethernet/intel/ice/ice_lib.c +71 -2
95 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_lib.h +2 -0
@@ -45,6 +45,8 @@ ice_vsi_stop_lan_tx_rings(struct ice_vsi *vsi, enum ice_disq_rst_src rst_src,int ice_cfg_vlan_pruning (struct ice_vsi *vsi,bool ena,bool vlan_promisc); +void ice_cfg_sw_lldp (struct ice_vsi *vsi,bool tx,bool create); +void ice_vsi_delete (struct ice_vsi *vsi);int ice_vsi_clear (struct ice_vsi *vsi);
drivers/net/ethernet/intel/ice/ice_switch.c +4 -1
@@ -1973,6 +1973,10 @@ ice_add_vlan(struct ice_hw *hw, struct list_head *v_list)* ice_add_eth_mac - Add ethertype and MAC based filter rule * @hw: pointer to the hardware structure * @em_list: list of ether type MAC filter, MAC is optional +* +* This function requires the caller to populate the entries in +* the filter list with the necessary fields (including flags to +* indicate Tx or Rx rules). */ enum ice_status ice_add_eth_mac (struct ice_hw *hw,struct list_head *em_list)
@@ -1990,7 +1994,6 @@ ice_add_eth_mac(struct ice_hw *hw, struct list_head *em_list) l_type != ICE_SW_LKUP_ETHERTYPE)return ICE_ERR_PARAM ; - em_list_itr->fltr_info.flag =ICE_FLTR_TX ; em_list_itr->status =ice_add_rule_internal (hw, l_type, em_list_itr);if (em_list_itr->status)
Signature · 1 line
2.21.0
PATCH 8/15 ice: Change minimum descriptor count value for Tx/Rx rings
In reply to Jeff KirsherFrom: Preethi Banala <[email protected]>
Change minimum number of descriptor count from 32 to 64. This is to have a feature parity with previous Intel NIC drivers.
--- drivers/net/ethernet/intel/ice/ice.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice.h +1 -1
@@ -44,7 +44,7 @@extern const char ice_drv_ver[];#define ICE_BAR0 0#define ICE_REQ_DESC_MULTIPLE 32 -#define ICE_MIN_NUM_DESC ICE_REQ_DESC_MULTIPLE +#define ICE_MIN_NUM_DESC 64#define ICE_MAX_NUM_DESC 8160#define ICE_DFLT_MIN_RX_DESC 512/* if the default number of Rx descriptors between ICE_MAX_NUM_DESC and the
Signature · 1 line
2.21.0
PATCH 9/15 ice: Use continue instead of an else block
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
For style consistency, use continue instead of an else block in ice_pf_dcb_recfg.
--- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_dcb_lib.c +5 -3
@@ -120,12 +120,14 @@ static void ice_pf_dcb_recfg(struct ice_pf *pf) tc_map =ICE_DFLT_TRAFFIC_CLASS ; ret =ice_vsi_cfg_tc (pf->vsi[v], tc_map); -if (ret) +if (ret) {dev_err (&pf->pdev->dev,"Failed to config TC for VSI index: %d\n" , pf->vsi[v]->idx); -else -ice_vsi_map_rings_to_vectors (pf->vsi[v]); +continue ; + } + +ice_vsi_map_rings_to_vectors (pf->vsi[v]); } }
Signature · 1 line
2.21.0
PATCH 10/15 ice: Align to updated AQ command formats
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
The current specification has updates to the command formats for manage MAC opcodes (opcodes 0x0107 and 0x0108) and get PHY caps (opcode 0x0600). Update the code to reflect this.
--- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +8 -7
@@ -120,11 +120,9 @@ struct ice_aqc_manage_mac_read {#define ICE_AQC_MAN_MAC_WOL_ADDR_VALID BIT(7)#define ICE_AQC_MAN_MAC_READ_S 4#define ICE_AQC_MAN_MAC_READ_M (0xF << ICE_AQC_MAN_MAC_READ_S) -u8 lport_num; -u8 lport_num_valid; -#define ICE_AQC_MAN_MAC_PORT_NUM_IS_VALID BIT(0) +u8 rsvd[2 ];u8 num_addr;/* Used in response */ -u8 reserved[3 ]; +u8 rsvd1[3 ];__le32 addr_high;__le32 addr_low; };
@@ -140,7 +138,7 @@ struct ice_aqc_manage_mac_read_resp {/* Manage MAC address, write command - direct (0x0108) */ struct ice_aqc_manage_mac_write { -u8 port_num; +u8 rsvd;u8 flags;#define ICE_AQC_MAN_MAC_WR_MC_MAG_EN BIT(0)#define ICE_AQC_MAN_MAC_WR_WOL_LAA_PFR_KEEP BIT(1)
@@ -934,6 +932,7 @@ struct ice_aqc_get_phy_caps_data {#define ICE_AQC_PHY_EEE_EN_40GBASE_KR4 BIT(6)__le16 eeer_value;u8 phy_id_oui[4 ];/* PHY/Module ID connected on the port */ +u8 phy_fw_ver[8 ];u8 link_fec_options;#define ICE_AQC_PHY_FEC_10G_KR_40G_KR4_EN BIT(0)#define ICE_AQC_PHY_FEC_10G_KR_40G_KR4_REQ BIT(1)
@@ -943,6 +942,7 @@ struct ice_aqc_get_phy_caps_data {#define ICE_AQC_PHY_FEC_25G_RS_CLAUSE91_EN BIT(6)#define ICE_AQC_PHY_FEC_25G_KR_CLAUSE74_EN BIT(7)#define ICE_AQC_PHY_FEC_MASK ICE_M(0xdf, 0) +u8 rsvd1;/* Byte 35 reserved */ u8 extended_compliance_code;#define ICE_MODULE_TYPE_TOTAL_BYTE 3u8 module_type[ICE_MODULE_TYPE_TOTAL_BYTE ];
@@ -957,13 +957,14 @@ struct ice_aqc_get_phy_caps_data {#define ICE_AQC_MOD_TYPE_BYTE2_SFP_PLUS 0xA0#define ICE_AQC_MOD_TYPE_BYTE2_QSFP_PLUS 0x86u8 qualified_module_count; +u8 rsvd2[7 ];/* Bytes 47:41 reserved */ #define ICE_AQC_QUAL_MOD_COUNT_MAX 16struct {u8 v_oui[3 ]; -u8 rsvd1; +u8 rsvd3;u8 v_part[16 ];__le32 v_rev; -__le64 rsvd8; +__le64 rsvd4; } qual_modules[ICE_AQC_QUAL_MOD_COUNT_MAX ]; };
Signature · 1 line
2.21.0
PATCH 11/15 ice: Move define for ICE_AQC_DRIVER_UNLOADING
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
The define describing the bits for the struct field should be below the field itself.
--- drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +1 -1
@@ -35,8 +35,8 @@ struct ice_aqc_get_ver {/* Queue Shutdown (direct 0x0003) */ struct ice_aqc_q_shutdown { -#define ICE_AQC_DRIVER_UNLOADING BIT(0)__le32 driver_unloading; +#define ICE_AQC_DRIVER_UNLOADING BIT(0)u8 reserved[12 ]; };
Signature · 1 line
2.21.0
PATCH 12/15 ice: Update function header
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
Add some details to the function header for ice_deinit_hw.
--- drivers/net/ethernet/intel/ice/ice_common.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/intel/ice/ice_common.c +4 -0
@@ -862,6 +862,10 @@ enum ice_status ice_init_hw(struct ice_hw *hw)/** * ice_deinit_hw - unroll initialization operations done by ice_init_hw * @hw: pointer to the hardware structure +* +* This should be called only during nominal operation, not as a result of +* ice_init_hw() failing since ice_init_hw() will take care of unrolling +* applicable initializations if it fails for any reason. */ void ice_deinit_hw (struct ice_hw *hw) {
Signature · 1 line
2.21.0
PATCH 13/15 ice: Use a different ICE_DBG bit for firmware log messages
In reply to Jeff KirsherFrom: Jacob Keller <[email protected]>
Replace the use of the ICE_DBG_AQ_MSG bit when dumping firmware logging messages with a separate distinct type ICE_DBG_FW_LOG. This is useful so that developers may enable ICE_DBG_FW_LOG and get firmware logging messages, without also dumping AdminQ messages at the same time.
--- drivers/net/ethernet/intel/ice/ice_common.c | 6 +++--- drivers/net/ethernet/intel/ice/ice_type.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/net/ethernet/intel/ice/ice_common.c +3 -3
@@ -681,10 +681,10 @@ static enum ice_status ice_cfg_fw_log(struct ice_hw *hw, bool enable)*/ void ice_output_fw_log (struct ice_hw *hw,struct ice_aq_desc *desc,void *buf) { -ice_debug (hw,ICE_DBG_AQ_MSG ,"[ FW Log Msg Start ]\n" ); -ice_debug_array (hw,ICE_DBG_AQ_MSG ,16 ,1 , (u8 *)buf, +ice_debug (hw,ICE_DBG_FW_LOG ,"[ FW Log Msg Start ]\n" ); +ice_debug_array (hw,ICE_DBG_FW_LOG ,16 ,1 , (u8 *)buf,le16_to_cpu (desc->datalen)); -ice_debug (hw,ICE_DBG_AQ_MSG ,"[ FW Log Msg End ]\n" ); +ice_debug (hw,ICE_DBG_FW_LOG ,"[ FW Log Msg End ]\n" ); }/**
drivers/net/ethernet/intel/ice/ice_type.h +1 -0
@@ -23,6 +23,7 @@ static inline bool ice_is_tc_ena(u8 bitmap, u8 tc)/* debug masks - set these bits in hw->debug_mask to control output */ #define ICE_DBG_INIT BIT_ULL(1) +#define ICE_DBG_FW_LOG BIT_ULL(3)#define ICE_DBG_LINK BIT_ULL(4)#define ICE_DBG_PHY BIT_ULL(5)#define ICE_DBG_QCTX BIT_ULL(6)
Signature · 1 line
2.21.0
PATCH 14/15 ice: Recognize higher speeds
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
In ice_print_link_msg, add cases for 50GB and 100GB speeds. This results in the right speed being reported on load, instead of "Unknownbps".
When VF link if forced (in ice_set_pfe_link_forced), report max speed 100GB.
--- drivers/net/ethernet/intel/ice/ice_main.c | 6 ++++++ drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_main.c +6 -0
@@ -645,6 +645,12 @@ void ice_print_link_msg(struct ice_vsi *vsi, bool isup) }switch (vsi->port_info->phy.link_info.link_speed) { +case ICE_AQ_LINK_SPEED_100GB : + speed ="100 G" ; +break ; +case ICE_AQ_LINK_SPEED_50GB : + speed ="50 G" ; +break ;case ICE_AQ_LINK_SPEED_40GB : speed ="40 G" ;break ;
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +1 -1
@@ -103,7 +103,7 @@ ice_set_pfe_link_forced(struct ice_vf *vf, struct virtchnl_pf_event *pfe,u16 link_speed;if (link_up) - link_speed =ICE_AQ_LINK_SPEED_40GB ; + link_speed =ICE_AQ_LINK_SPEED_100GB ;else link_speed =ICE_AQ_LINK_SPEED_UNKNOWN ;
Signature · 1 line
2.21.0
PATCH 15/15 ice: Trivial cosmetic changes
In reply to Jeff KirsherFrom: Anirudh Venkataramanan <[email protected]>
This patch mostly capitalizes abbreviations in code comments. Fixed some typos and removed some unnecessary newlines as well.
--- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 4 +- drivers/net/ethernet/intel/ice/ice_common.c | 6 +-- drivers/net/ethernet/intel/ice/ice_controlq.c | 2 +- drivers/net/ethernet/intel/ice/ice_controlq.h | 2 +- drivers/net/ethernet/intel/ice/ice_dcb.c | 14 +++---- drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 12 +++--- drivers/net/ethernet/intel/ice/ice_ethtool.c | 2 +- drivers/net/ethernet/intel/ice/ice_lib.c | 4 +- drivers/net/ethernet/intel/ice/ice_main.c | 42 +++++++++---------- drivers/net/ethernet/intel/ice/ice_txrx.c | 8 ++-- drivers/net/ethernet/intel/ice/ice_type.h | 2 +- .../net/ethernet/intel/ice/ice_virtchnl_pf.c | 9 ++-- 12 files changed, 53 insertions(+), 54 deletions(-)
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h +2 -2
@@ -1273,7 +1273,7 @@ struct ice_aqc_get_cee_dcb_cfg_resp { };/* Set Local LLDP MIB (indirect 0x0A08) -* Used to replace the local MIB of a given LLDP agent. e.g. DCBx +* Used to replace the local MIB of a given LLDP agent. e.g. DCBX */ struct ice_aqc_lldp_set_local_mib {u8 type;
@@ -1290,7 +1290,7 @@ struct ice_aqc_lldp_set_local_mib { };/* Stop/Start LLDP Agent (direct 0x0A09) -* Used for stopping/starting specific LLDP agent. e.g. DCBx. +* Used for stopping/starting specific LLDP agent. e.g. DCBX. * The same structure is used for the response, with the command field * being used as the status field. */
drivers/net/ethernet/intel/ice/ice_common.c +3 -3
@@ -499,7 +499,7 @@ static enum ice_status ice_get_fw_log_cfg(struct ice_hw *hw)if (!status) {u16 i; -/* Save fw logging information into the hw structure */ +/* Save FW logging information into the HW structure */ for (i =0 ; i <ICE_AQC_FW_LOG_ID_MAX ; i++) {u16 v, m, flgs;
@@ -691,7 +691,7 @@ void ice_output_fw_log(struct ice_hw *hw, struct ice_aq_desc *desc, void *buf)* ice_get_itr_intrl_gran - determine int/intrl granularity * @hw: pointer to the HW struct * -* Determines the itr/intrl granularities based on the maximum aggregate +* Determines the ITR/intrl granularities based on the maximum aggregate * bandwidth according to the device's configuration during power-on. */ static void ice_get_itr_intrl_gran (struct ice_hw *hw)
@@ -2699,7 +2699,7 @@ ice_aq_dis_lan_txq(struct ice_hw *hw, u8 num_qgrps,ice_debug (hw,ICE_DBG_SCHED ,"VM%d disable failed %d\n" , vmvf_num, hw->adminq.sq_last_status); else - ice_debug(hw, ICE_DBG_SCHED, "disable Q %d failed %d\n", + ice_debug(hw, ICE_DBG_SCHED, "disable queue %d failed %d\n",le16_to_cpu (qg_list[0 ].q_id[0 ]), hw->adminq.sq_last_status); }
drivers/net/ethernet/intel/ice/ice_controlq.c +1 -1
@@ -439,7 +439,7 @@ do { \/* free the buffer info list */ \if ((qi)->ring.cmd_buf) \devm_kfree (ice_hw_to_dev (hw), (qi)->ring.cmd_buf); \ -/* free dma head */ \ +/* free DMA head */ \devm_kfree (ice_hw_to_dev (hw), (qi)->ring.dma_head); \ }while (0 )
drivers/net/ethernet/intel/ice/ice_controlq.h +1 -1
@@ -35,7 +35,7 @@ enum ice_ctl_q {#define ICE_CTL_Q_SQ_CMD_TIMEOUT 250/* msecs */ struct ice_ctl_q_ring { -void *dma_head;/* Virtual address to dma head */ +void *dma_head;/* Virtual address to DMA head */ struct ice_dma_mem desc_buf;/* descriptor ring memory */ void *cmd_buf;/* command buffer memory */
drivers/net/ethernet/intel/ice/ice_dcb.c +7 -7
@@ -669,7 +669,7 @@ ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg)/** * ice_aq_get_dcb_cfg * @hw: pointer to the HW struct -* @mib_type: mib type for the query +* @mib_type: MIB type for the query * @bridgetype: bridge type for the query (remote) * @dcbcfg: store for LLDPDU data *
@@ -700,13 +700,13 @@ ice_aq_get_dcb_cfg(struct ice_hw *hw, u8 mib_type, u8 bridgetype, }/** -* ice_aq_start_stop_dcbx - Start/Stop DCBx service in FW +* ice_aq_start_stop_dcbx - Start/Stop DCBX service in FW * @hw: pointer to the HW struct -* @start_dcbx_agent: True if DCBx Agent needs to be started -* False if DCBx Agent needs to be stopped -* @dcbx_agent_status: FW indicates back the DCBx agent status -* True if DCBx Agent is active -* False if DCBx Agent is stopped +* @start_dcbx_agent: True if DCBX Agent needs to be started +* False if DCBX Agent needs to be stopped +* @dcbx_agent_status: FW indicates back the DCBX agent status +* True if DCBX Agent is active +* False if DCBX Agent is stopped * @cd: pointer to command details structure or NULL * * Start/Stop the embedded dcbx Agent. In case that this wrapper function
drivers/net/ethernet/intel/ice/ice_dcb_lib.c +6 -6
@@ -283,7 +283,7 @@ void ice_dcb_rebuild(struct ice_pf *pf)/** * ice_dcb_init_cfg - set the initial DCB config in SW -* @pf: pf to apply config to +* @pf: PF to apply config to * @locked: Is the RTNL held */ static int ice_dcb_init_cfg (struct ice_pf *pf,bool locked)
@@ -311,7 +311,7 @@ static int ice_dcb_init_cfg(struct ice_pf *pf, bool locked)/** * ice_dcb_sw_default_config - Apply a default DCB config -* @pf: pf to apply config to +* @pf: PF to apply config to * @locked: was this function called with RTNL held */ static int ice_dcb_sw_dflt_cfg (struct ice_pf *pf,bool locked)
@@ -356,7 +356,7 @@ static int ice_dcb_sw_dflt_cfg(struct ice_pf *pf, bool locked)/** * ice_init_pf_dcb - initialize DCB for a PF -* @pf: pf to initiialize DCB for +* @pf: PF to initialize DCB for * @locked: Was function called with RTNL held */ int ice_init_pf_dcb (struct ice_pf *pf,bool locked)
@@ -371,7 +371,7 @@ int ice_init_pf_dcb(struct ice_pf *pf, bool locked) err =ice_init_dcb (hw);if (err) { -/* FW LLDP is not active, default to SW DCBx/LLDP */ +/* FW LLDP is not active, default to SW DCBX/LLDP */ dev_info (&pf->pdev->dev,"FW LLDP is not active\n" ); hw->port_info->dcbx_status =ICE_DCBX_STATUS_NOT_STARTED ; hw->port_info->is_sw_lldp = true;
@@ -604,10 +604,10 @@ ice_dcb_process_lldp_set_mib_change(struct ice_pf *pf,/* store the old configuration */ tmp_dcbx_cfg = pf->hw.port_info->local_dcbx_cfg; -/* Reset the old DCBx configuration data */ +/* Reset the old DCBX configuration data */ memset (&pi->local_dcbx_cfg,0 ,sizeof (pi->local_dcbx_cfg)); -/* Get updated DCBx data from firmware */ +/* Get updated DCBX data from firmware */ ret =ice_get_dcb_cfg (pf->hw.port_info);if (ret) {dev_err (&pf->pdev->dev,"Failed to get DCB config\n" );
drivers/net/ethernet/intel/ice/ice_ethtool.c +1 -1
@@ -1247,7 +1247,7 @@ static int ice_set_priv_flags(struct net_device *netdev, u32 flags)dev_warn (&pf->pdev->dev,"Fail to start LLDP Agent\n" ); -/* AQ command to start FW DCBx agent will fail if +/* AQ command to start FW DCBX agent will fail if * the agent is already started */ status = ice_aq_start_stop_dcbx(&pf->hw, true,
drivers/net/ethernet/intel/ice/ice_lib.c +2 -2
@@ -2539,7 +2539,7 @@ ice_vsi_setup(struct ice_pf *pf, struct ice_port_info *pi,* recipe, since VSI/VSI list is ignored with drop action... * Also add rules to handle LLDP Tx and Rx packets. Tx LLDP packets * need to be dropped so that VFs cannot send LLDP packets to reconfig -* DCB settings in the HW. Also, if the FW DCBx engine is not running +* DCB settings in the HW. Also, if the FW DCBX engine is not running * then Rx LLDP packets need to be redirected up the stack. */ if (vsi->type ==ICE_VSI_PF ) {
@@ -3059,7 +3059,7 @@ int ice_vsi_rebuild(struct ice_vsi *vsi)/** * ice_is_reset_in_progress - check for a reset in progress -* @state: pf state field +* @state: PF state field */ bool ice_is_reset_in_progress (unsigned long *state) {
drivers/net/ethernet/intel/ice/ice_main.c +21 -21
154 lines not on this page · raw message
drivers/net/ethernet/intel/ice/ice_txrx.c +4 -4
@@ -55,7 +55,7 @@ void ice_clean_tx_ring(struct ice_ring *tx_ring)if (!tx_ring->tx_buf)return ; -/* Free all the Tx ring sk_bufss */ +/* Free all the Tx ring sk_buffs */ for (i =0 ; i < tx_ring->count; i++)ice_unmap_and_free_tx_buf (tx_ring, &tx_ring->tx_buf[i]);
@@ -1101,7 +1101,7 @@ static int ice_clean_rx_irq(struct ice_ring *rx_ring, int budget)* ice_adjust_itr_by_size_and_speed - Adjust ITR based on current traffic * @port_info: port_info structure containing the current link speed * @avg_pkt_size: average size of Tx or Rx packets based on clean routine -* @itr: itr value to update +* @itr: ITR value to update * * Calculate how big of an increment should be applied to the ITR value passed * in based on wmem_default, SKB overhead, Ethernet overhead, and the current
@@ -1316,7 +1316,7 @@ ice_update_itr(struct ice_q_vector *q_vector, struct ice_ring_container *rc)*/ static u32 ice_buildreg_itr (u16 itr_idx,u16 itr) { -/* The itr value is reported in microseconds, and the register value is +/* The ITR value is reported in microseconds, and the register value is * recorded in 2 microsecond units. For this reason we only need to * shift by the GLINT_DYN_CTL_INTERVAL_S - ICE_ITR_GRAN_S to apply this * granularity as a shift instead of division. The mask makes sure the
@@ -1645,7 +1645,7 @@ ice_tx_map(struct ice_ring *tx_ring, struct ice_tx_buf *first,return ; dma_error: -/* clear dma mappings for failed tx_buf map */ +/* clear DMA mappings for failed tx_buf map */ for (;;) { tx_buf = &tx_ring->tx_buf[i];ice_unmap_and_free_tx_buf (tx_ring, tx_buf);
drivers/net/ethernet/intel/ice/ice_type.h +1 -1
@@ -434,7 +434,7 @@ struct ice_hw {struct ice_fw_log_cfg fw_log;/* Device max aggregate bandwidths corresponding to the GL_PWR_MODE_CTL -* register. Used for determining the itr/intrl granularity during +* register. Used for determining the ITR/intrl granularity during * initialization. */ #define ICE_MAX_AGG_BW_200G 0x0
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +4 -5
@@ -154,7 +154,7 @@ static void ice_free_vf_res(struct ice_vf *vf)*/ clear_bit (ICE_VF_STATE_INIT , vf->vf_states); -/* free vsi & disconnect it from the parent uplink */ +/* free VSI and disconnect it from the parent uplink */ if (vf->lan_vsi_idx) {ice_vsi_release (pf->vsi[vf->lan_vsi_idx]); vf->lan_vsi_idx =0 ;
@@ -514,7 +514,6 @@ static int ice_alloc_vsi_res(struct ice_vf *vf) vf->first_vector_idx =ice_calc_vf_first_vector_idx (pf, vf); vsi =ice_vf_vsi_setup (pf, pf->hw.port_info, vf->vf_id); -if (!vsi) {dev_err (&pf->pdev->dev,"Failed to create VF VSI\n" );return -ENOMEM ;
@@ -1312,8 +1311,8 @@ static int ice_alloc_vfs(struct ice_pf *pf, u16 num_alloc_vfs) }/** -* ice_pf_state_is_nominal - checks the pf for nominal state -* @pf: pointer to pf to check +* ice_pf_state_is_nominal - checks the PF for nominal state +* @pf: pointer to PF to check * * Check the PF's state for a collection of bits that would indicate * the PF is in a state that would inhibit normal operation for
@@ -1640,7 +1639,7 @@ static void ice_vc_reset_vf_msg(struct ice_vf *vf)/** * ice_find_vsi_from_id -* @pf: the pf structure to search for the VSI +* @pf: the PF structure to search for the VSI * @id: ID of the VSI it is searching for * * searches for the VSI with the given ID
Signature · 1 line
2.21.0
David Miller
maintainerFrom: Jeff Kirsher <[email protected]>
Date: Thu, 30 May 2019 11:50:30 -0700
Quoted 1 line
This series contains updates to ice driver only.
Pulled, thanks Jeff.