> -----Original Message-----
> From: Stephen Hemminger [mailto:step...@networkplumber.org]
> Sent: Friday, November 2, 2018 1:46 AM
> To: Zhao1, Wei <wei.zh...@intel.com>
> Cc: dev@dpdk.org; sta...@dpdk.org; Zhang, Qi Z <qi.z.zh...@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable
> parameter
>
> 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?
I am not familiar with NIC except ixgbe and i40e, I am not sure property of
other NIC and rationality of these check....