Skip to content

Commit d1aaaa2

Browse files
committed
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2024-09-09 (ice, igb) This series contains updates to ice and igb drivers. Martyna moves LLDP rule removal to the proper uninitialization function for ice. Jake corrects accounting logic for FWD_TO_VSI_LIST switch filters on ice. Przemek removes incorrect, explicit calls to pci_disable_device() for ice. Michal Schmidt stops incorrect use of VSI list for VLAN use on ice. Sriram Yagnaraman adjusts igb_xdp_ring_update_tail() to be called under Tx lock on igb. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: igb: Always call igb_xdp_ring_update_tail() under Tx lock ice: fix VSI lists confusion when adding VLANs ice: stop calling pci_disable_device() as we use pcim ice: fix accounting for filters shared by multiple VSIs ice: Fix lldp packets dropping after changing the number of channels ==================== Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 3d731dc + 27717f8 commit d1aaaa2

File tree

4 files changed

+23
-15
lines changed

4 files changed

+23
-15
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,13 +2413,6 @@ void ice_vsi_decfg(struct ice_vsi *vsi)
24132413
struct ice_pf *pf = vsi->back;
24142414
int err;
24152415

2416-
/* The Rx rule will only exist to remove if the LLDP FW
2417-
* engine is currently stopped
2418-
*/
2419-
if (!ice_is_safe_mode(pf) && vsi->type == ICE_VSI_PF &&
2420-
!test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags))
2421-
ice_cfg_sw_lldp(vsi, false, false);
2422-
24232416
ice_rm_vsi_lan_cfg(vsi->port_info, vsi->idx);
24242417
err = ice_rm_vsi_rdma_cfg(vsi->port_info, vsi->idx);
24252418
if (err)
@@ -2764,6 +2757,14 @@ int ice_vsi_release(struct ice_vsi *vsi)
27642757
ice_rss_clean(vsi);
27652758

27662759
ice_vsi_close(vsi);
2760+
2761+
/* The Rx rule will only exist to remove if the LLDP FW
2762+
* engine is currently stopped
2763+
*/
2764+
if (!ice_is_safe_mode(pf) && vsi->type == ICE_VSI_PF &&
2765+
!test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags))
2766+
ice_cfg_sw_lldp(vsi, false, false);
2767+
27672768
ice_vsi_decfg(vsi);
27682769

27692770
/* retain SW VSI data structure since it is needed to unregister and

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5363,7 +5363,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
53635363
ice_deinit(pf);
53645364
err_init:
53655365
ice_adapter_put(pdev);
5366-
pci_disable_device(pdev);
53675366
return err;
53685367
}
53695368

@@ -5470,7 +5469,6 @@ static void ice_remove(struct pci_dev *pdev)
54705469
ice_set_wake(pf);
54715470

54725471
ice_adapter_put(pdev);
5473-
pci_disable_device(pdev);
54745472
}
54755473

54765474
/**

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3194,7 +3194,7 @@ ice_add_update_vsi_list(struct ice_hw *hw,
31943194

31953195
/* A rule already exists with the new VSI being added */
31963196
if (test_bit(vsi_handle, m_entry->vsi_list_info->vsi_map))
3197-
return 0;
3197+
return -EEXIST;
31983198

31993199
/* Update the previously created VSI list set with
32003200
* the new VSI ID passed in
@@ -3264,7 +3264,7 @@ ice_find_vsi_list_entry(struct ice_hw *hw, u8 recp_id, u16 vsi_handle,
32643264

32653265
list_head = &sw->recp_list[recp_id].filt_rules;
32663266
list_for_each_entry(list_itr, list_head, list_entry) {
3267-
if (list_itr->vsi_list_info) {
3267+
if (list_itr->vsi_count == 1 && list_itr->vsi_list_info) {
32683268
map_info = list_itr->vsi_list_info;
32693269
if (test_bit(vsi_handle, map_info->vsi_map)) {
32703270
*vsi_list_id = map_info->vsi_list_id;

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include <linux/bpf_trace.h>
3434
#include <linux/pm_runtime.h>
3535
#include <linux/etherdevice.h>
36+
#include <linux/lockdep.h>
3637
#ifdef CONFIG_IGB_DCA
3738
#include <linux/dca.h>
3839
#endif
@@ -2914,8 +2915,11 @@ static int igb_xdp(struct net_device *dev, struct netdev_bpf *xdp)
29142915
}
29152916
}
29162917

2918+
/* This function assumes __netif_tx_lock is held by the caller. */
29172919
static void igb_xdp_ring_update_tail(struct igb_ring *ring)
29182920
{
2921+
lockdep_assert_held(&txring_txq(ring)->_xmit_lock);
2922+
29192923
/* Force memory writes to complete before letting h/w know there
29202924
* are new descriptors to fetch.
29212925
*/
@@ -3000,11 +3004,11 @@ static int igb_xdp_xmit(struct net_device *dev, int n,
30003004
nxmit++;
30013005
}
30023006

3003-
__netif_tx_unlock(nq);
3004-
30053007
if (unlikely(flags & XDP_XMIT_FLUSH))
30063008
igb_xdp_ring_update_tail(tx_ring);
30073009

3010+
__netif_tx_unlock(nq);
3011+
30083012
return nxmit;
30093013
}
30103014

@@ -8864,12 +8868,14 @@ static void igb_put_rx_buffer(struct igb_ring *rx_ring,
88648868

88658869
static int igb_clean_rx_irq(struct igb_q_vector *q_vector, const int budget)
88668870
{
8871+
unsigned int total_bytes = 0, total_packets = 0;
88678872
struct igb_adapter *adapter = q_vector->adapter;
88688873
struct igb_ring *rx_ring = q_vector->rx.ring;
8869-
struct sk_buff *skb = rx_ring->skb;
8870-
unsigned int total_bytes = 0, total_packets = 0;
88718874
u16 cleaned_count = igb_desc_unused(rx_ring);
8875+
struct sk_buff *skb = rx_ring->skb;
8876+
int cpu = smp_processor_id();
88728877
unsigned int xdp_xmit = 0;
8878+
struct netdev_queue *nq;
88738879
struct xdp_buff xdp;
88748880
u32 frame_sz = 0;
88758881
int rx_buf_pgcnt;
@@ -8997,7 +9003,10 @@ static int igb_clean_rx_irq(struct igb_q_vector *q_vector, const int budget)
89979003
if (xdp_xmit & IGB_XDP_TX) {
89989004
struct igb_ring *tx_ring = igb_xdp_tx_queue_mapping(adapter);
89999005

9006+
nq = txring_txq(tx_ring);
9007+
__netif_tx_lock(nq, cpu);
90009008
igb_xdp_ring_update_tail(tx_ring);
9009+
__netif_tx_unlock(nq);
90019010
}
90029011

90039012
u64_stats_update_begin(&rx_ring->rx_syncp);

0 commit comments

Comments
 (0)