]> git.droids-corp.org - dpdk.git/commit
net/nfp: make sure MTU is never larger than mbuf size
authorPeng Zhang <peng.zhang@corigine.com>
Wed, 11 May 2022 01:15:53 +0000 (03:15 +0200)
committerAndrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Thu, 19 May 2022 07:06:38 +0000 (09:06 +0200)
commit417be15e5f1117c3de129fa9c27acfc2c6026144
treeca7c92bd18db8c1b15a546f7661cd2654d91dbca
parentd04fb3b55cd5acec7088a48cf5ea114c48ce1de1
net/nfp: make sure MTU is never larger than mbuf size

Setting a MTU larger than mbuf size is not supported by the device but
not prohibited by the driver. This change adds a restriction to the
driver to prevent setting an MTU that is too large.

While at it define the minimum MTU in the device information to describe
the complete supported MTU range.

Fixes: d4a27a3 ("nfp: add basic features")
Cc: stable@dpdk.org
Signed-off-by: Peng Zhang <peng.zhang@corigine.com>
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Louis Peens <louis.peens@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Walter Heymans <walter.heymans@corigine.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
drivers/net/nfp/nfp_common.c