[dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable parameter
Stephen Hemminger
stephen at networkplumber.org
Thu Nov 1 18:46:08 CET 2018
On Thu, 1 Nov 2018 15:55:26 +0800
wei zhao <wei.zhao1 at intel.com> wrote:
> + /* check that max packet size is within the allowed range */
> + if (max_rx_pkt_len < ETHER_MIN_MTU) {
> + PMD_INIT_LOG(ERR, "max packet size is too small.");
> + return -EINVAL;
> + }
> +
> + if (max_rx_pkt_len > dev_info.max_rx_pktlen) {
> + PMD_INIT_LOG(ERR, "max packet size is too big.");
> + return -EINVAL;
> + }
> +
> + /* check jumbo mode if needed */
> + if (max_rx_pkt_len < ETHER_MAX_LEN) {
> + PMD_INIT_LOG(ERR, "No need to enable jumbo.");
> + return -EINVAL;
> + }
> +
Yes, these checks are needed and for other devices as well.
Why not add them into rte_ethdev instead?
More information about the dev
mailing list