From: Pascal Mazon <pascal.mazon@6wind.com>
To: keith.wiles@intel.com
Cc: dev@dpdk.org, Pascal Mazon <pascal.mazon@6wind.com>
Subject: [dpdk-dev] [PATCH 2/2] net/tap: remove minimum packet size in Rx
Date: Thu, 30 Mar 2017 10:52:48 +0200 [thread overview]
Message-ID: <dd1f63d011a4639fd1478e69f3d58d9b620bb605.1490863952.git.pascal.mazon@6wind.com> (raw)
In-Reply-To: <11b7aa6796bd3e4147fbd4ec14b0125b6419aa80.1490863952.git.pascal.mazon@6wind.com>
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 <pascal.mazon@6wind.com>
---
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
next prev parent reply other threads:[~2017-03-30 8:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-30 8:52 [dpdk-dev] [PATCH 1/2] net/tap: UDP/TCP port mask not supported in flow Pascal Mazon
2017-03-30 8:52 ` Pascal Mazon [this message]
2017-03-30 13:06 ` [dpdk-dev] [PATCH 2/2] net/tap: remove minimum packet size in Rx Wiles, Keith
2017-03-30 13:08 ` [dpdk-dev] [PATCH 1/2] net/tap: UDP/TCP port mask not supported in flow Wiles, Keith
2017-04-03 11:25 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dd1f63d011a4639fd1478e69f3d58d9b620bb605.1490863952.git.pascal.mazon@6wind.com \
--to=pascal.mazon@6wind.com \
--cc=dev@dpdk.org \
--cc=keith.wiles@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).