On Thu, 1 Nov 2018 15:55:26 +0800 wei zhao <wei.zh...@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?