diff options
author | Eric Dumazet <edumazet@google.com> | 2021-11-16 19:29:22 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-11-17 14:56:16 +0000 |
commit | 5337824f4dc4bb26f38fbbba4ffb425a92803f15 (patch) | |
tree | 5d00439ad091c73d88cddf5801c0850f02f32e8c /drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |
parent | 8160fb43d55d26d64607fd32fe69185a5f5fe41f (diff) | |
download | lwn-5337824f4dc4bb26f38fbbba4ffb425a92803f15.tar.gz lwn-5337824f4dc4bb26f38fbbba4ffb425a92803f15.zip |
net: annotate accesses to queue->trans_start
In following patches, dev_watchdog() will no longer stop all queues.
It will read queue->trans_start locklessly.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_main.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 033c35c09a54..389d125310c1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2356,7 +2356,7 @@ static bool stmmac_xdp_xmit_zc(struct stmmac_priv *priv, u32 queue, u32 budget) bool work_done = true; /* Avoids TX time-out as we are sharing with slow path */ - nq->trans_start = jiffies; + txq_trans_cond_update(nq->trans_start); budget = min(budget, stmmac_tx_avail(priv, queue)); @@ -4657,7 +4657,7 @@ static int stmmac_xdp_xmit_back(struct stmmac_priv *priv, __netif_tx_lock(nq, cpu); /* Avoids TX time-out as we are sharing with slow path */ - nq->trans_start = jiffies; + txq_trans_cond_update(nq->trans_start); res = stmmac_xdp_xmit_xdpf(priv, queue, xdpf, false); if (res == STMMAC_XDP_TX) @@ -6293,7 +6293,7 @@ static int stmmac_xdp_xmit(struct net_device *dev, int num_frames, __netif_tx_lock(nq, cpu); /* Avoids TX time-out as we are sharing with slow path */ - nq->trans_start = jiffies; + txq_trans_cond_update(nq); for (i = 0; i < num_frames; i++) { int res; |