From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by dpdk.org (Postfix) with ESMTP id CA36B1B0FC for ; Thu, 1 Nov 2018 18:46:12 +0100 (CET) Received: by mail-pl1-f193.google.com with SMTP id s5-v6so7601736plq.11 for ; Thu, 01 Nov 2018 10:46:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=r8K290hcFOWO3WrsXo2V9Sk8HeDN3/skzgNDre60keA=; b=zBzTcBDMZbAMBQn6PVzhqUVVe+mfhQfehFwZWI/XfPJ/eTuRK2x4idgSlsVWOpPwT1 MCqLuj2ykUpIOQ1ImcDNUHp+/NyEY46FOepAk9jJy5HXXOtkLaWjn4ETNjC7CxYMQWtl th9xTobqm5wGkwDsBo3SSq3qBzK0L3bAUhsHgV/yia7EXOo77oPfthszdnbhRKx3d+xk 4eRu6CF7AkqDnVXVLuR1Vt4ASJi4sNJ4hcYrXIbp5Kh2J+xRFFGoLPo3PfhJ3TXkBIlM DVkOXcOw8H90Q1Ez6zm/IfdKm8A58IDGKRSamiP+pqOyF+wKe05IC7h34jmRYUNx8id/ nLPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=r8K290hcFOWO3WrsXo2V9Sk8HeDN3/skzgNDre60keA=; b=Ug90OOM7KdRgNGnZqDePN0HRVx/76mA6OYYROGW3T7GYOSvPq+MJrxQUxbEfuYfbob uNMvkJki447yfopOwtSE8yAArKMRyhwXip+WyZjLYgNex0CyTv9cH6xolZJ/Z+VaRamW ChIhtjnjVYyIluyRqAOV3+f2gcrrrpergqhRqhHiPiFxbRPzniIHVyOdqytynT0URAUU 91fBF9+YZbsmFt23SN0+gYt6A+hndcxxyKwD9giPRbCyo7/wfqfr1k8V51YoxO1xrNF8 XZ78zo+ru6KhN5xF5lqZwoD/i9OPlLGH2TRNEWBr05h9A2Q1SUQWAzIGbgw2NqGLf+hN Ny4g== X-Gm-Message-State: AGRZ1gKlZKfUU3xA97l0VztdXKx7WObBHKr88nwmzbcbAzs5+znb3vPy vNwMWkAxUQzCsAb91HzjVMCx8w== X-Google-Smtp-Source: AJdET5e2Mxb51GA1lv3mDHOA8cwlvJC8wxNF3I+oXmL8qxtC6b3Tcoqe9m1IFumasO7/QxB2Lgf5aw== X-Received: by 2002:a17:902:a9cb:: with SMTP id b11-v6mr8433129plr.219.1541094371880; Thu, 01 Nov 2018 10:46:11 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id e20-v6sm12281388pgg.21.2018.11.01.10.46.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 10:46:11 -0700 (PDT) Date: Thu, 1 Nov 2018 10:46:08 -0700 From: Stephen Hemminger To: wei zhao Cc: dev@dpdk.org, stable@dpdk.org, qi.z.zhang@intel.com Message-ID: <20181101104608.31a9d102@xeon-e3> In-Reply-To: <1541058926-3576-1-git-send-email-wei.zhao1@intel.com> 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 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] net/ixgbe: check jumbo frame enable parameter X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Nov 2018 17:46:13 -0000 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?