]> git.baikalelectronics.ru Git - kernel.git/commit
octeontx2-pf: Cleanup all receive buffers in SG descriptor
authorGeetha sowjanya <gakula@marvell.com>
Fri, 20 Mar 2020 18:57:24 +0000 (00:27 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 24 Mar 2020 04:11:44 +0000 (21:11 -0700)
commit609938c0d5c4c480bb1d035774eacd022f0d00f0
tree54f995a10d34faad970ee21498b8e7a8994c15e3
parentc8f20bf98d710ade5c6b718025a973109b4e2c6b
octeontx2-pf: Cleanup all receive buffers in SG descriptor

With MTU sized receive buffers it is not expected to have CQE_RX
with multiple receive buffer pointers. But since same physcial link
is shared by PF and it's VFs, the max receive packet configured
at link could be morethan MTU. Hence there is a chance of receiving
plts morethan MTU which then gets DMA'ed into multiple buffers
and notified in a single CQE_RX. This patch treats such pkts as errors
and frees up receive buffers pointers back to hardware.

Also on the transmit side this patch sets SMQ MAXLEN to max value to avoid
HW length errors for the packets whose size > MTU, eg due to path MTU.

Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c