]> git.droids-corp.org - dpdk.git/commit
net/nfp: update how max MTU is read
authorWalter Heymans <walter.heymans@corigine.com>
Wed, 20 Apr 2022 13:46:39 +0000 (15:46 +0200)
committerFerruh Yigit <ferruh.yigit@xilinx.com>
Tue, 10 May 2022 11:53:29 +0000 (13:53 +0200)
commit733afb244d304839569e9b99d7b9360298403c99
tree3b3ca50196ceb56a71d57bfe2de6bdc22c4bfdc5
parent476048d5460aae322a9bb8c54f3f7f060e54eb61
net/nfp: update how max MTU is read

The 'max_rx_pktlen' value was previously read from hardware, which was
set by the running firmware. This caused confusion due to different
meanings of 'MAX_MTU'. This patch updates the 'max_rx_pktlen' to the
maximum value that the NFP NIC can support. The 'max_mtu' value that is
read from hardware, is assigned to the 'dev_info->max_mtu' variable.

If more layer 2 metadata must be used, the firmware can be updated to
report a smaller 'max_mtu' value.

The constant defined for NFP_FRAME_SIZE_MAX is derived for the maximum
supported buffer size of 10240, minus 136 bytes that is reserved by the
hardware and another 56 bytes reserved for expansion in firmware. This
results in a usable maximum packet length of 10048 bytes.

Signed-off-by: Walter Heymans <walter.heymans@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Louis Peens <louis.peens@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Richard Donkin <richard.donkin@corigine.com>
drivers/net/nfp/nfp_common.c
drivers/net/nfp/nfp_common.h