From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 23C5D5A54 for ; Fri, 12 Jun 2015 09:06:42 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 12 Jun 2015 00:06:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,600,1427785200"; d="scan'208";a="586524356" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga003.jf.intel.com with ESMTP; 12 Jun 2015 00:06:41 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id t5C76dRk023101; Fri, 12 Jun 2015 15:06:39 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t5C76aSP011234; Fri, 12 Jun 2015 15:06:38 +0800 Received: (from jingche2@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id t5C76aCZ011230; Fri, 12 Jun 2015 15:06:36 +0800 From: "Chen Jing D(Mark)" To: dev@dpdk.org Date: Fri, 12 Jun 2015 15:06:28 +0800 Message-Id: <1434092789-11186-3-git-send-email-jing.d.chen@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1434092789-11186-1-git-send-email-jing.d.chen@intel.com> References: <1433494978-6708-2-git-send-email-jing.d.chen@intel.com> <1434092789-11186-1-git-send-email-jing.d.chen@intel.com> Cc: shaopeng.he@intel.com Subject: [dpdk-dev] [PATCH v2 2/3] fm10k: remove mbuf size sanity check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 07:06:43 -0000 From: "Chen Jing D(Mark)" Original implementation required mbuf size should be greater than ETHER_MAX_VLAN_FRAME_LEN, which is not necessary. If it's less than that value, scatter function will be selected and incoming packets greater than mbuf size will be filled into several mbufs. Signed-off-by: Chen Jing D(Mark) --- drivers/net/fm10k/fm10k_ethdev.c | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index 393bcc3..714648b 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -1011,9 +1011,7 @@ handle_rxconf(struct fm10k_rx_queue *q, const struct rte_eth_rxconf *conf) * 2. Address is 8B aligned and buffer does not cross 4K boundary. * * As such, the driver may need to adjust the DMA address within the - * buffer by up to 512B. The mempool element size is checked here - * to make sure a maximally sized Ethernet frame can still be wholly - * contained within the buffer after 512B alignment. + * buffer by up to 512B. * * return 1 if the element size is valid, otherwise return 0. */ @@ -1033,9 +1031,6 @@ mempool_element_size_valid(struct rte_mempool *mp) if (min_size > mp->elt_size) return 0; - if (min_size < ETHER_MAX_VLAN_FRAME_LEN) - return 0; - /* size is valid */ return 1; } -- 1.7.7.6