From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=BJqND20X14ee2+TFI1nZ6gm2zxNNLhAHMinWojtEw4kmfegbJIFKyGXm9CHiNebDSK ZIEbBFT0s1nhDRBjSkdDgWIdK0OZ/++RoiRaM5PF/6vRwVB5UJ0V4gFbkJjwV2nD4tqF Stjvh6Q1n9SULAvVdv3ZJd4RDKjebmAjTSaeUfoKa9WUBUW1ZHxT7pU1bpxyhuGU/QzS pHiIqPwI1GBBZSst9EXcxPofhzVOQyCo6NBuJ0bi0HviYR3V/9n1MQDKBlnFaxE+eJuA LmSA5i37Eh8YwL0XkRWDM9lBfI7tAtb5UyILNxwCXPwLWbPDuJEslv+4ZdKmchtoY3kj /KSw== X-Gm-Message-State: AGRZ1gIi+XvK9WTLp5Q4/zyvgL8S9rATx/Uoyp/NelJb3qgjs5rDh8BM 7y//ocEztg+nBOZsaGuubmrPvA== 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-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: 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?