Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/ixgbe_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,6 @@ static void ixgbe_free_q_vector(struct ixgbe_adapter *adapter, int v_idx)
adapter->tx_ring[ring->queue_index] = NULL;
}

if (static_key_enabled((struct static_key *)&ixgbe_xdp_locking_key))
static_branch_dec(&ixgbe_xdp_locking_key);

ixgbe_for_each_ring(ring, q_vector->rx)
adapter->rx_ring[ring->queue_index] = NULL;

Expand Down
7 changes: 5 additions & 2 deletions src/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -8618,6 +8618,11 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter)
adapter->tx_work_limit = IXGBE_DEFAULT_TX_WORK;

set_bit(__IXGBE_DOWN, &adapter->state);

/* enable locking for XDP_TX if we have more CPUs than queues */
if (nr_cpu_ids > IXGBE_MAX_XDP_QS)
static_branch_enable(&ixgbe_xdp_locking_key);

out:
return err;
}
Expand Down Expand Up @@ -13234,8 +13239,6 @@ static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
*/
if (nr_cpu_ids > IXGBE_MAX_XDP_QS * 2)
return -ENOMEM;
else if (nr_cpu_ids > IXGBE_MAX_XDP_QS)
static_branch_inc(&ixgbe_xdp_locking_key);

old_prog = xchg(&adapter->xdp_prog, prog);
need_reset = (!!prog != !!old_prog);
Expand Down