]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
soc: fsl: dpio: read the consumer index from the cache inhibited area
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 9 Feb 2022 09:23:35 +0000 (11:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Feb 2022 13:15:35 +0000 (13:15 +0000)
commit86ec882f59a070e07d1e74c5b03340180ad90a1e
tree5d6cfba7abcb62170083a9b87fc6ec8d6590f123
parent3dc709e0cd47c602a8d1a6747f1a91e9737eeed3
soc: fsl: dpio: read the consumer index from the cache inhibited area

Once we added support in the dpaa2-eth for driver level software TSO we
observed the following situation: if the EQCR CI (consumer index) is
read from the cache-enabled area we sometimes end up with a computed
value of available enqueue entries bigger than the size of the ring.

This eventually will lead to the multiple enqueue of the same FD which
will determine the same FD to end up on the Tx confirmation path and the
same skb being freed twice.

Just read the consumer index from the cache inhibited area so that we
avoid this situation.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/soc/fsl/dpio/qbman-portal.c