From 7910fd21211f402aac7b7e7d4b6d70f224f0f9be Mon Sep 17 00:00:00 2001 From: Steve Yang Date: Mon, 18 Jan 2021 07:04:20 +0000 Subject: [PATCH] net/sfc: fix jumbo frame flag condition for MTU set The jumbo frame uses the 'RTE_ETHER_MAX_LEN' as boundary condition, but the Ether overhead is larger than 18 when it supports VLAN tag. That will cause the jumbo flag rx offload is wrong when MTU size is 'RTE_ETHER_MTU'. This fix will change the boundary condition with 'RTE_ETHER_MTU', that perhaps impacts the cases of the jumbo frame related. Fixes: ff6a1197c3b1 ("net/sfc: convert to new Rx offload API") Cc: stable@dpdk.org Signed-off-by: Steve Yang Reviewed-by: Ferruh Yigit --- drivers/net/sfc/sfc_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index 93fc7baa0d..f2f5336435 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -1017,7 +1017,7 @@ sfc_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu) * The driver does not use it, but other PMDs update jumbo frame * flag and max_rx_pkt_len when MTU is set. */ - if (mtu > RTE_ETHER_MAX_LEN) { + if (mtu > RTE_ETHER_MTU) { struct rte_eth_rxmode *rxmode = &dev->data->dev_conf.rxmode; rxmode->offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME; } -- 2.20.1