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)
commitb1bc8457e9d0ff32b799fa610f7f4bd9c0a56dfb
tree54f995a10d34faad970ee21498b8e7a8994c15e3
parentad513ed938c911271f388a471d438ca01c19313c
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