CRC is being removed by HW before packet get
write to the buffer, so CRC len should not be
included in MRU validation
Fixes:
79ec62028b9a ("net/mvpp2: update MTU and MRU related calculations")
Cc: stable@dpdk.org
Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
* when this feature has not been enabled/supported so far
* (TODO check scattered_rx flag here once scattered RX is supported).
*/
- if (mru + MRVL_PKT_OFFS > mbuf_data_size) {
- mru = mbuf_data_size - MRVL_PKT_OFFS;
+ if (mru - RTE_ETHER_CRC_LEN + MRVL_PKT_OFFS > mbuf_data_size) {
+ mru = mbuf_data_size + RTE_ETHER_CRC_LEN - MRVL_PKT_OFFS;
mtu = MRVL_PP2_MRU_TO_MTU(mru);
MRVL_LOG(WARNING, "MTU too big, max MTU possible limitted "
"by current mbuf size: %u. Set MTU to %u, MRU to %u",