]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: fix race condition with bql frame accounting
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 25 Mar 2019 13:06:22 +0000 (13:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2019 18:43:49 +0000 (11:43 -0700)
commitbfb045286ea8b7610011975e53e97d9b9c9f1589
treea9d0da277442fb698f59afdc7f0b40901bb1c19e
parent21ea523cc96bca01d7fa27d78471a95b528e5d31
dpaa2-eth: fix race condition with bql frame accounting

It might happen that Tx conf acknowledges a frame before it was
subscribed in bql, as subscribing was previously done after the enqueue
operation.

This patch moves the netdev_tx_sent_queue call before the actual frame
enqueue, so that this can never happen.

Fixes: 27a0f80eca3c ("dpaa2-eth: bql support")
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c