Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2021-04-08 This series contains updates to i40e and ice drivers. Grzegorz fixes the ordering of parameters to i40e_aq_get_phy_register() which is causing incorrect information to be reported. Arkadiusz fixes various sparse issues reported on the i40e driver. Yongxin Liu fixes a memory leak with aRFS following resume from suspend for ice driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
6494d15fd6
@ -578,6 +578,9 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
|
|||||||
case RING_TYPE_XDP:
|
case RING_TYPE_XDP:
|
||||||
ring = kmemdup(vsi->xdp_rings[ring_id], sizeof(*ring), GFP_KERNEL);
|
ring = kmemdup(vsi->xdp_rings[ring_id], sizeof(*ring), GFP_KERNEL);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
ring = NULL;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (!ring)
|
if (!ring)
|
||||||
return;
|
return;
|
||||||
|
@ -5480,7 +5480,7 @@ static int i40e_get_module_eeprom(struct net_device *netdev,
|
|||||||
|
|
||||||
status = i40e_aq_get_phy_register(hw,
|
status = i40e_aq_get_phy_register(hw,
|
||||||
I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE,
|
I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE,
|
||||||
true, addr, offset, &value, NULL);
|
addr, true, offset, &value, NULL);
|
||||||
if (status)
|
if (status)
|
||||||
return -EIO;
|
return -EIO;
|
||||||
data[i] = value;
|
data[i] = value;
|
||||||
|
@ -2560,8 +2560,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
|
|||||||
i40e_stat_str(hw, aq_ret),
|
i40e_stat_str(hw, aq_ret),
|
||||||
i40e_aq_str(hw, hw->aq.asq_last_status));
|
i40e_aq_str(hw, hw->aq.asq_last_status));
|
||||||
} else {
|
} else {
|
||||||
dev_info(&pf->pdev->dev, "%s is %s allmulti mode.\n",
|
dev_info(&pf->pdev->dev, "%s allmulti mode.\n",
|
||||||
vsi->netdev->name,
|
|
||||||
cur_multipromisc ? "entering" : "leaving");
|
cur_multipromisc ? "entering" : "leaving");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -15139,12 +15138,16 @@ static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw)
|
|||||||
* in order to register the netdev
|
* in order to register the netdev
|
||||||
*/
|
*/
|
||||||
v_idx = i40e_vsi_mem_alloc(pf, I40E_VSI_MAIN);
|
v_idx = i40e_vsi_mem_alloc(pf, I40E_VSI_MAIN);
|
||||||
if (v_idx < 0)
|
if (v_idx < 0) {
|
||||||
|
err = v_idx;
|
||||||
goto err_switch_setup;
|
goto err_switch_setup;
|
||||||
|
}
|
||||||
pf->lan_vsi = v_idx;
|
pf->lan_vsi = v_idx;
|
||||||
vsi = pf->vsi[v_idx];
|
vsi = pf->vsi[v_idx];
|
||||||
if (!vsi)
|
if (!vsi) {
|
||||||
|
err = -EFAULT;
|
||||||
goto err_switch_setup;
|
goto err_switch_setup;
|
||||||
|
}
|
||||||
vsi->alloc_queue_pairs = 1;
|
vsi->alloc_queue_pairs = 1;
|
||||||
err = i40e_config_netdev(vsi);
|
err = i40e_config_netdev(vsi);
|
||||||
if (err)
|
if (err)
|
||||||
|
@ -2295,8 +2295,7 @@ int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring)
|
|||||||
* @rx_ring: Rx ring being processed
|
* @rx_ring: Rx ring being processed
|
||||||
* @xdp: XDP buffer containing the frame
|
* @xdp: XDP buffer containing the frame
|
||||||
**/
|
**/
|
||||||
static struct sk_buff *i40e_run_xdp(struct i40e_ring *rx_ring,
|
static int i40e_run_xdp(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
|
||||||
struct xdp_buff *xdp)
|
|
||||||
{
|
{
|
||||||
int err, result = I40E_XDP_PASS;
|
int err, result = I40E_XDP_PASS;
|
||||||
struct i40e_ring *xdp_ring;
|
struct i40e_ring *xdp_ring;
|
||||||
@ -2335,7 +2334,7 @@ static struct sk_buff *i40e_run_xdp(struct i40e_ring *rx_ring,
|
|||||||
}
|
}
|
||||||
xdp_out:
|
xdp_out:
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
return ERR_PTR(-result);
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2448,6 +2447,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
|
|||||||
unsigned int xdp_xmit = 0;
|
unsigned int xdp_xmit = 0;
|
||||||
bool failure = false;
|
bool failure = false;
|
||||||
struct xdp_buff xdp;
|
struct xdp_buff xdp;
|
||||||
|
int xdp_res = 0;
|
||||||
|
|
||||||
#if (PAGE_SIZE < 8192)
|
#if (PAGE_SIZE < 8192)
|
||||||
frame_sz = i40e_rx_frame_truesize(rx_ring, 0);
|
frame_sz = i40e_rx_frame_truesize(rx_ring, 0);
|
||||||
@ -2513,12 +2513,10 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
|
|||||||
/* At larger PAGE_SIZE, frame_sz depend on len size */
|
/* At larger PAGE_SIZE, frame_sz depend on len size */
|
||||||
xdp.frame_sz = i40e_rx_frame_truesize(rx_ring, size);
|
xdp.frame_sz = i40e_rx_frame_truesize(rx_ring, size);
|
||||||
#endif
|
#endif
|
||||||
skb = i40e_run_xdp(rx_ring, &xdp);
|
xdp_res = i40e_run_xdp(rx_ring, &xdp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_ERR(skb)) {
|
if (xdp_res) {
|
||||||
unsigned int xdp_res = -PTR_ERR(skb);
|
|
||||||
|
|
||||||
if (xdp_res & (I40E_XDP_TX | I40E_XDP_REDIR)) {
|
if (xdp_res & (I40E_XDP_TX | I40E_XDP_REDIR)) {
|
||||||
xdp_xmit |= xdp_res;
|
xdp_xmit |= xdp_res;
|
||||||
i40e_rx_buffer_flip(rx_ring, rx_buffer, size);
|
i40e_rx_buffer_flip(rx_ring, rx_buffer, size);
|
||||||
|
@ -4564,6 +4564,7 @@ static int __maybe_unused ice_suspend(struct device *dev)
|
|||||||
continue;
|
continue;
|
||||||
ice_vsi_free_q_vectors(pf->vsi[v]);
|
ice_vsi_free_q_vectors(pf->vsi[v]);
|
||||||
}
|
}
|
||||||
|
ice_free_cpu_rx_rmap(ice_get_main_vsi(pf));
|
||||||
ice_clear_interrupt_scheme(pf);
|
ice_clear_interrupt_scheme(pf);
|
||||||
|
|
||||||
pci_save_state(pdev);
|
pci_save_state(pdev);
|
||||||
|
Loading…
Reference in New Issue
Block a user