From patchwork Thu Jul 26 06:46:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yanglong Wu X-Patchwork-Id: 43397 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E08A2B95; Thu, 26 Jul 2018 08:55:39 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 41BF5F72 for ; Thu, 26 Jul 2018 08:55:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 23:55:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,404,1526367600"; d="scan'208";a="76054894" Received: from wuyanglong.sh.intel.com ([10.67.111.89]) by orsmga001.jf.intel.com with ESMTP; 25 Jul 2018 23:55:33 -0700 From: Yanglong Wu To: dev@dpdk.org Cc: qi.z.zhang@intel.com, tiwei.bie@intel.com, lei.a.yao@intel.com, Yanglong Wu Date: Thu, 26 Jul 2018 14:46:02 +0800 Message-Id: <20180726064602.157850-1-yanglong.wu@intel.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] net/i40e: fix max frame size checking 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" No need to check max frame size in TX, the checking should be done in up layer protocal. This checking will lead to fail for TSO or other application cases. Fixes: bfeed0262b0c ("net/i40e: check illegal packets") Signed-off-by: Yanglong Wu --- drivers/net/i40e/i40e_rxtx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 3be87fe6a..baad433a7 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -1459,8 +1459,7 @@ i40e_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts, } /* check the size of packet */ - if (m->pkt_len > I40E_FRAME_SIZE_MAX || - m->pkt_len < I40E_TX_MIN_PKT_LEN) { + if (m->pkt_len < I40E_TX_MIN_PKT_LEN) { rte_errno = -EINVAL; return i; }