Skip to content

Commit 6494d15

Browse files
committed
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 <[email protected]>
2 parents 1ffbc7e + 1831da7 commit 6494d15

File tree

5 files changed

+17
-12
lines changed

5 files changed

+17
-12
lines changed

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,9 @@ static void i40e_dbg_dump_desc(int cnt, int vsi_seid, int ring_id, int desc_n,
578578
case RING_TYPE_XDP:
579579
ring = kmemdup(vsi->xdp_rings[ring_id], sizeof(*ring), GFP_KERNEL);
580580
break;
581+
default:
582+
ring = NULL;
583+
break;
581584
}
582585
if (!ring)
583586
return;

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5480,7 +5480,7 @@ static int i40e_get_module_eeprom(struct net_device *netdev,
54805480

54815481
status = i40e_aq_get_phy_register(hw,
54825482
I40E_AQ_PHY_REG_ACCESS_EXTERNAL_MODULE,
5483-
true, addr, offset, &value, NULL);
5483+
addr, true, offset, &value, NULL);
54845484
if (status)
54855485
return -EIO;
54865486
data[i] = value;

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2560,8 +2560,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
25602560
i40e_stat_str(hw, aq_ret),
25612561
i40e_aq_str(hw, hw->aq.asq_last_status));
25622562
} else {
2563-
dev_info(&pf->pdev->dev, "%s is %s allmulti mode.\n",
2564-
vsi->netdev->name,
2563+
dev_info(&pf->pdev->dev, "%s allmulti mode.\n",
25652564
cur_multipromisc ? "entering" : "leaving");
25662565
}
25672566
}
@@ -15139,12 +15138,16 @@ static int i40e_init_recovery_mode(struct i40e_pf *pf, struct i40e_hw *hw)
1513915138
* in order to register the netdev
1514015139
*/
1514115140
v_idx = i40e_vsi_mem_alloc(pf, I40E_VSI_MAIN);
15142-
if (v_idx < 0)
15141+
if (v_idx < 0) {
15142+
err = v_idx;
1514315143
goto err_switch_setup;
15144+
}
1514415145
pf->lan_vsi = v_idx;
1514515146
vsi = pf->vsi[v_idx];
15146-
if (!vsi)
15147+
if (!vsi) {
15148+
err = -EFAULT;
1514715149
goto err_switch_setup;
15150+
}
1514815151
vsi->alloc_queue_pairs = 1;
1514915152
err = i40e_config_netdev(vsi);
1515015153
if (err)

drivers/net/ethernet/intel/i40e/i40e_txrx.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2295,8 +2295,7 @@ int i40e_xmit_xdp_tx_ring(struct xdp_buff *xdp, struct i40e_ring *xdp_ring)
22952295
* @rx_ring: Rx ring being processed
22962296
* @xdp: XDP buffer containing the frame
22972297
**/
2298-
static struct sk_buff *i40e_run_xdp(struct i40e_ring *rx_ring,
2299-
struct xdp_buff *xdp)
2298+
static int i40e_run_xdp(struct i40e_ring *rx_ring, struct xdp_buff *xdp)
23002299
{
23012300
int err, result = I40E_XDP_PASS;
23022301
struct i40e_ring *xdp_ring;
@@ -2335,7 +2334,7 @@ static struct sk_buff *i40e_run_xdp(struct i40e_ring *rx_ring,
23352334
}
23362335
xdp_out:
23372336
rcu_read_unlock();
2338-
return ERR_PTR(-result);
2337+
return result;
23392338
}
23402339

23412340
/**
@@ -2448,6 +2447,7 @@ static int i40e_clean_rx_irq(struct i40e_ring *rx_ring, int budget)
24482447
unsigned int xdp_xmit = 0;
24492448
bool failure = false;
24502449
struct xdp_buff xdp;
2450+
int xdp_res = 0;
24512451

24522452
#if (PAGE_SIZE < 8192)
24532453
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)
25132513
/* At larger PAGE_SIZE, frame_sz depend on len size */
25142514
xdp.frame_sz = i40e_rx_frame_truesize(rx_ring, size);
25152515
#endif
2516-
skb = i40e_run_xdp(rx_ring, &xdp);
2516+
xdp_res = i40e_run_xdp(rx_ring, &xdp);
25172517
}
25182518

2519-
if (IS_ERR(skb)) {
2520-
unsigned int xdp_res = -PTR_ERR(skb);
2521-
2519+
if (xdp_res) {
25222520
if (xdp_res & (I40E_XDP_TX | I40E_XDP_REDIR)) {
25232521
xdp_xmit |= xdp_res;
25242522
i40e_rx_buffer_flip(rx_ring, rx_buffer, size);

drivers/net/ethernet/intel/ice/ice_main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4564,6 +4564,7 @@ static int __maybe_unused ice_suspend(struct device *dev)
45644564
continue;
45654565
ice_vsi_free_q_vectors(pf->vsi[v]);
45664566
}
4567+
ice_free_cpu_rx_rmap(ice_get_main_vsi(pf));
45674568
ice_clear_interrupt_scheme(pf);
45684569

45694570
pci_save_state(pdev);

0 commit comments

Comments
 (0)