Commit 2151135a authored by Jakub Kicinski's avatar Jakub Kicinski

Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue

Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2021-10-14

Brett ensures RDMA nodes are removed during release and rebuild. He also
corrects fw.mgmt.api to include the patch number for proper
identification.

Dave stops ida_free() being called when an IDA has not been allocated.

Michal corrects the order of parameters being provided and the number of
entries skipped for UDP tunnels.
====================

Link: https://lore.kernel.org/r/20211014181953.3538330-1-anthony.l.nguyen@intel.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 0857d6f8 b726ddf9
...@@ -30,10 +30,11 @@ The ``ice`` driver reports the following versions ...@@ -30,10 +30,11 @@ The ``ice`` driver reports the following versions
PHY, link, etc. PHY, link, etc.
* - ``fw.mgmt.api`` * - ``fw.mgmt.api``
- running - running
- 1.5 - 1.5.1
- 2-digit version number of the API exported over the AdminQ by the - 3-digit version number (major.minor.patch) of the API exported over
management firmware. Used by the driver to identify what commands the AdminQ by the management firmware. Used by the driver to
are supported. identify what commands are supported. Historical versions of the
kernel only displayed a 2-digit version number (major.minor).
* - ``fw.mgmt.build`` * - ``fw.mgmt.build``
- running - running
- 0x305d955f - 0x305d955f
......
...@@ -63,7 +63,8 @@ static int ice_info_fw_api(struct ice_pf *pf, struct ice_info_ctx *ctx) ...@@ -63,7 +63,8 @@ static int ice_info_fw_api(struct ice_pf *pf, struct ice_info_ctx *ctx)
{ {
struct ice_hw *hw = &pf->hw; struct ice_hw *hw = &pf->hw;
snprintf(ctx->buf, sizeof(ctx->buf), "%u.%u", hw->api_maj_ver, hw->api_min_ver); snprintf(ctx->buf, sizeof(ctx->buf), "%u.%u.%u", hw->api_maj_ver,
hw->api_min_ver, hw->api_patch);
return 0; return 0;
} }
......
...@@ -1668,7 +1668,7 @@ static u16 ice_tunnel_idx_to_entry(struct ice_hw *hw, enum ice_tunnel_type type, ...@@ -1668,7 +1668,7 @@ static u16 ice_tunnel_idx_to_entry(struct ice_hw *hw, enum ice_tunnel_type type,
for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++) for (i = 0; i < hw->tnl.count && i < ICE_TUNNEL_MAX_ENTRIES; i++)
if (hw->tnl.tbl[i].valid && if (hw->tnl.tbl[i].valid &&
hw->tnl.tbl[i].type == type && hw->tnl.tbl[i].type == type &&
idx--) idx-- == 0)
return i; return i;
WARN_ON_ONCE(1); WARN_ON_ONCE(1);
...@@ -1828,7 +1828,7 @@ int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table, ...@@ -1828,7 +1828,7 @@ int ice_udp_tunnel_set_port(struct net_device *netdev, unsigned int table,
u16 index; u16 index;
tnl_type = ti->type == UDP_TUNNEL_TYPE_VXLAN ? TNL_VXLAN : TNL_GENEVE; tnl_type = ti->type == UDP_TUNNEL_TYPE_VXLAN ? TNL_VXLAN : TNL_GENEVE;
index = ice_tunnel_idx_to_entry(&pf->hw, idx, tnl_type); index = ice_tunnel_idx_to_entry(&pf->hw, tnl_type, idx);
status = ice_create_tunnel(&pf->hw, index, tnl_type, ntohs(ti->port)); status = ice_create_tunnel(&pf->hw, index, tnl_type, ntohs(ti->port));
if (status) { if (status) {
......
...@@ -2841,6 +2841,7 @@ void ice_napi_del(struct ice_vsi *vsi) ...@@ -2841,6 +2841,7 @@ void ice_napi_del(struct ice_vsi *vsi)
*/ */
int ice_vsi_release(struct ice_vsi *vsi) int ice_vsi_release(struct ice_vsi *vsi)
{ {
enum ice_status err;
struct ice_pf *pf; struct ice_pf *pf;
if (!vsi->back) if (!vsi->back)
...@@ -2912,6 +2913,10 @@ int ice_vsi_release(struct ice_vsi *vsi) ...@@ -2912,6 +2913,10 @@ int ice_vsi_release(struct ice_vsi *vsi)
ice_fltr_remove_all(vsi); ice_fltr_remove_all(vsi);
ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx); ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx);
err = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx);
if (err)
dev_err(ice_pf_to_dev(vsi->back), "Failed to remove RDMA scheduler config for VSI %u, err %d\n",
vsi->vsi_num, err);
ice_vsi_delete(vsi); ice_vsi_delete(vsi);
ice_vsi_free_q_vectors(vsi); ice_vsi_free_q_vectors(vsi);
...@@ -3092,6 +3097,10 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi) ...@@ -3092,6 +3097,10 @@ int ice_vsi_rebuild(struct ice_vsi *vsi, bool init_vsi)
prev_num_q_vectors = ice_vsi_rebuild_get_coalesce(vsi, coalesce); prev_num_q_vectors = ice_vsi_rebuild_get_coalesce(vsi, coalesce);
ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx); ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx);
ret = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx);
if (ret)
dev_err(ice_pf_to_dev(vsi->back), "Failed to remove RDMA scheduler config for VSI %u, err %d\n",
vsi->vsi_num, ret);
ice_vsi_free_q_vectors(vsi); ice_vsi_free_q_vectors(vsi);
/* SR-IOV determines needed MSIX resources all at once instead of per /* SR-IOV determines needed MSIX resources all at once instead of per
......
...@@ -4224,6 +4224,9 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent) ...@@ -4224,6 +4224,9 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
if (!pf) if (!pf)
return -ENOMEM; return -ENOMEM;
/* initialize Auxiliary index to invalid value */
pf->aux_idx = -1;
/* set up for high or low DMA */ /* set up for high or low DMA */
err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)); err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
if (err) if (err)
...@@ -4615,6 +4618,7 @@ static void ice_remove(struct pci_dev *pdev) ...@@ -4615,6 +4618,7 @@ static void ice_remove(struct pci_dev *pdev)
ice_aq_cancel_waiting_tasks(pf); ice_aq_cancel_waiting_tasks(pf);
ice_unplug_aux_dev(pf); ice_unplug_aux_dev(pf);
if (pf->aux_idx >= 0)
ida_free(&ice_aux_ida, pf->aux_idx); ida_free(&ice_aux_ida, pf->aux_idx);
set_bit(ICE_DOWN, pf->state); set_bit(ICE_DOWN, pf->state);
......
...@@ -2070,6 +2070,19 @@ enum ice_status ice_rm_vsi_lan_cfg(struct ice_port_info *pi, u16 vsi_handle) ...@@ -2070,6 +2070,19 @@ enum ice_status ice_rm_vsi_lan_cfg(struct ice_port_info *pi, u16 vsi_handle)
return ice_sched_rm_vsi_cfg(pi, vsi_handle, ICE_SCHED_NODE_OWNER_LAN); return ice_sched_rm_vsi_cfg(pi, vsi_handle, ICE_SCHED_NODE_OWNER_LAN);
} }
/**
* ice_rm_vsi_rdma_cfg - remove VSI and its RDMA children nodes
* @pi: port information structure
* @vsi_handle: software VSI handle
*
* This function clears the VSI and its RDMA children nodes from scheduler tree
* for all TCs.
*/
enum ice_status ice_rm_vsi_rdma_cfg(struct ice_port_info *pi, u16 vsi_handle)
{
return ice_sched_rm_vsi_cfg(pi, vsi_handle, ICE_SCHED_NODE_OWNER_RDMA);
}
/** /**
* ice_get_agg_info - get the aggregator ID * ice_get_agg_info - get the aggregator ID
* @hw: pointer to the hardware structure * @hw: pointer to the hardware structure
......
...@@ -89,6 +89,7 @@ enum ice_status ...@@ -89,6 +89,7 @@ enum ice_status
ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs, ice_sched_cfg_vsi(struct ice_port_info *pi, u16 vsi_handle, u8 tc, u16 maxqs,
u8 owner, bool enable); u8 owner, bool enable);
enum ice_status ice_rm_vsi_lan_cfg(struct ice_port_info *pi, u16 vsi_handle); enum ice_status ice_rm_vsi_lan_cfg(struct ice_port_info *pi, u16 vsi_handle);
enum ice_status ice_rm_vsi_rdma_cfg(struct ice_port_info *pi, u16 vsi_handle);
/* Tx scheduler rate limiter functions */ /* Tx scheduler rate limiter functions */
enum ice_status enum ice_status
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment