> -----Original Message-----
> From: Stephen Hemminger [mailto:[email protected]]
> Sent: Friday, November 2, 2018 1:46 AM
> To: Zhao1, Wei <[email protected]>
> Cc: [email protected]; [email protected]; Zhang, Qi Z <[email protected]>
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable
> parameter
>
> On Thu, 1 Nov 2018 15:55:26 +0800
> wei zhao <[email protected]> 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....