]> 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)
commit108d3a1100a0beedbd7a59aaef3bf12b97e04d79
tree54f995a10d34faad970ee21498b8e7a8994c15e3
parentaecc976f729936ea651df4c6972964af60e78465
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