From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 805985942; Mon, 5 Nov 2018 10:13:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Nov 2018 01:13:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,467,1534834800"; d="scan'208";a="86739541" Received: from pgsmsx108.gar.corp.intel.com ([10.221.44.103]) by orsmga007.jf.intel.com with ESMTP; 05 Nov 2018 01:13:30 -0800 Received: from pgsmsx103.gar.corp.intel.com ([169.254.2.114]) by PGSMSX108.gar.corp.intel.com ([169.254.8.100]) with mapi id 14.03.0415.000; Mon, 5 Nov 2018 17:13:29 +0800 From: "Zhao1, Wei" To: Stephen Hemminger CC: "dev@dpdk.org" , "stable@dpdk.org" , "Zhang, Qi Z" Thread-Topic: [dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable parameter Thread-Index: AQHUcblB9F5ZOUIVt0Kg5RHwjEP/eaU6q/sAgAY/dpA= Date: Mon, 5 Nov 2018 09:13:28 +0000 Message-ID: References: <1541058926-3576-1-git-send-email-wei.zhao1@intel.com> <20181101104608.31a9d102@xeon-e3> In-Reply-To: <20181101104608.31a9d102@xeon-e3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [172.30.20.205] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable parameter X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2018 09:13:34 -0000 > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, November 2, 2018 1:46 AM > To: Zhao1, Wei > Cc: dev@dpdk.org; stable@dpdk.org; Zhang, Qi Z > Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable > parameter >=20 > On Thu, 1 Nov 2018 15:55:26 +0800 > wei zhao wrote: >=20 > > + /* 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; > > + } > > + >=20 > 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....