From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 26FCC2B94 for ; Thu, 30 Mar 2017 10:54:01 +0200 (CEST) Received: from 6wind.com (unknown [10.16.0.184]) by proxy.6wind.com (Postfix) with SMTP id 128662685D; Thu, 30 Mar 2017 10:53:55 +0200 (CEST) Received: by 6wind.com (sSMTP sendmail emulation); Thu, 30 Mar 2017 10:52:56 +0200 From: Pascal Mazon To: keith.wiles@intel.com Cc: dev@dpdk.org, Pascal Mazon Date: Thu, 30 Mar 2017 10:52:48 +0200 Message-Id: X-Mailer: git-send-email 2.12.0.306.g4a9b9b3 In-Reply-To: <11b7aa6796bd3e4147fbd4ec14b0125b6419aa80.1490863952.git.pascal.mazon@6wind.com> References: <11b7aa6796bd3e4147fbd4ec14b0125b6419aa80.1490863952.git.pascal.mazon@6wind.com> Subject: [dpdk-dev] [PATCH 2/2] net/tap: remove minimum packet size in Rx 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, 30 Mar 2017 08:54:01 -0000 With support for segmented packets, it is now possible to easily receive packets of many sizes, given an adequate number of descriptors. Remove limitation on the minimum size of mbuf: on reception, if a packet won't fit in the queue's mbufs, it will be detected in the packet info and the packet will be discarded. Fixes: 4a6bb33dc67c ("net/tap: support segmented mbufs") Signed-off-by: Pascal Mazon --- drivers/net/tap/rte_eth_tap.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c index 069200199573..eef6e6cc2828 100644 --- a/drivers/net/tap/rte_eth_tap.c +++ b/drivers/net/tap/rte_eth_tap.c @@ -875,7 +875,6 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, struct rte_mbuf **tmp = &rxq->pool; struct iovec (*iovecs)[nb_rx_desc + 1]; int data_off = RTE_PKTMBUF_HEADROOM; - uint16_t buf_size; int ret = 0; int fd; int i; @@ -901,18 +900,6 @@ tap_rx_queue_setup(struct rte_eth_dev *dev, } rxq->iovecs = iovecs; - /* Now get the space available for data in the mbuf */ - buf_size = (uint16_t)(rte_pktmbuf_data_room_size(mp) - - RTE_PKTMBUF_HEADROOM); - - if (buf_size < ETH_FRAME_LEN) { - RTE_LOG(WARNING, PMD, - "%s: %d bytes will not fit in mbuf (%d bytes)\n", - dev->data->name, ETH_FRAME_LEN, buf_size); - ret = -ENOMEM; - goto error; - } - fd = rx_setup_queue(dev, internals, rx_queue_id); if (fd == -1) { ret = fd; -- 2.12.0.306.g4a9b9b3