Skip to content

Commit

Permalink
net/sfc: fix jumbo frame flag condition for MTU set
Browse files Browse the repository at this point in the history
[ upstream commit 7910fd2 ]

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: ff6a119 ("net/sfc: convert to new Rx offload API")

Signed-off-by: Steve Yang <stevex.yang@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
Steve Yang authored and cpaelzer committed Feb 3, 2021
1 parent e9539bf commit ffce2b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/sfc/sfc_ethdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,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;
}
Expand Down

0 comments on commit ffce2b8

Please sign in to comment.