]> git.droids-corp.org - dpdk.git/commit
net/memif: fix driver init with default MTU
authorFerruh Yigit <ferruh.yigit@intel.com>
Wed, 27 Oct 2021 09:14:29 +0000 (10:14 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 27 Oct 2021 15:48:51 +0000 (17:48 +0200)
commit411878ba25f691557df08d4abc0a8ae3b918d253
tree5a3c6e0495cd9809cfcc5ea626c6c3b3b6c3c429
parent4e8a910719df270770fe35199146847bd55a7b85
net/memif: fix driver init with default MTU

Driver is using 'ETH_FRAME_LEN' Linux defined value as max frame length,
which doesn't include FCS (4 bytes CRC). But ethdev by default uses
frame size with FCS when application doesn't define any explicit value.

As a result device configuration fails because device is tried to be
configured with a frame size length that is bigger than what device
reported as supported. Device reports as max supported frame size is
1514 but configured value is 1518.

Instead use DPDK macro, 'RTE_ETHER_MAX_LEN', that includes FCS in the
driver to report the max supported frame size, this matches to the
initial intention.

Fixes: 1bb4a528c41f ("ethdev: fix max Rx packet length")
Reported-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Tested-by: David Christensen <drc@linux.vnet.ibm.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
drivers/net/memif/rte_eth_memif.c