From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] net/ixgbe: check jumbo frame enable parameter Date: Thu, 1 Nov 2018 10:46:08 -0700 Message-ID: <20181101104608.31a9d102@xeon-e3> References: <1541058926-3576-1-git-send-email-wei.zhao1@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, stable@dpdk.org, qi.z.zhang@intel.com To: wei zhao Return-path: Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id C45715F21 for ; Thu, 1 Nov 2018 18:46:12 +0100 (CET) Received: by mail-pl1-f194.google.com with SMTP id o19-v6so9263228pll.12 for ; Thu, 01 Nov 2018 10:46:12 -0700 (PDT) In-Reply-To: <1541058926-3576-1-git-send-email-wei.zhao1@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 1 Nov 2018 15:55:26 +0800 wei zhao 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?