diff options
author | Shenwei Wang <shenwei.wang@nxp.com> | 2023-05-18 10:02:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-05-19 09:17:53 +0100 |
commit | 9025944fddfed5966c8f102f1fe921ab3aee2c12 (patch) | |
tree | a741f9b27c4e2a600be5e5a2af2a88604abe7d41 /include | |
parent | 3be5f6cd4a52b72ae31b77171da0912829c02096 (diff) |
net: fec: add dma_wmb to ensure correct descriptor values
Two dma_wmb() are added in the XDP TX path to ensure proper ordering of
descriptor and buffer updates:
1. A dma_wmb() is added after updating the last BD to make sure
the updates to rest of the descriptor are visible before
transferring ownership to FEC.
2. A dma_wmb() is also added after updating the bdp to ensure these
updates are visible before updating txq->bd.cur.
3. Start the xmit of the frame immediately right after configuring the
tx descriptor.
Fixes: 6d6b39f180b8 ("net: fec: add initial XDP support")
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions