Reviewed-by: Michael Shamis <[email protected]> -----Original Message----- From: dev <[email protected]> On Behalf Of [email protected] Sent: Wednesday, December 2, 2020 12:12 PM To: Jerin Jacob Kollanukkaran <[email protected]> Cc: [email protected]; Liron Himi <[email protected]>; [email protected]; Yuri Chipchev <[email protected]> Subject: [dpdk-dev] [PATCH v1 06/38] net/mvpp2: fix frame size checking
From: Liron Himi <[email protected]> need to add CRC len to the frame-size to compare against max_rx_pkt_len which includes it. Fixes: 79ec62028 ("net/mvpp2: update MTU and MRU related calculations") Cc: [email protected] Signed-off-by: Liron Himi <[email protected]> Reviewed-by: Yuri Chipchev <[email protected]> --- drivers/net/mvpp2/mrvl_ethdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mvpp2/mrvl_ethdev.c b/drivers/net/mvpp2/mrvl_ethdev.c index dbb193496..3f05ebe00 100644 --- a/drivers/net/mvpp2/mrvl_ethdev.c +++ b/drivers/net/mvpp2/mrvl_ethdev.c @@ -1711,7 +1711,8 @@ mrvl_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, return -EFAULT; } - frame_size = buf_size - RTE_PKTMBUF_HEADROOM - MRVL_PKT_EFFEC_OFFS; + frame_size = buf_size - RTE_PKTMBUF_HEADROOM - + MRVL_PKT_EFFEC_OFFS + RTE_ETHER_CRC_LEN; if (frame_size < max_rx_pkt_len) { MRVL_LOG(WARNING, "Mbuf size must be increased to %u bytes to hold up " -- 2.28.0

