From: Pascal Mazon <pascal.mazon@6wind.com>
To: dev@dpdk.org
Cc: pascal.mazon@6wind.com
Subject: [dpdk-dev] [PATCH v2 2/5] net/tap: remove unnecessary functions
Date: Tue, 18 Apr 2017 10:17:54 +0200 [thread overview]
Message-ID: <bfc7001c321ecd0a76d6cf6c12fc79134ebc2377.1492503445.git.pascal.mazon@6wind.com> (raw)
In-Reply-To: <cover.1492503445.git.pascal.mazon@6wind.com>
These functions are only two lines each and are used only once.
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
---
drivers/net/tap/rte_eth_tap.c | 26 ++++----------------------
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 0c89b63a2357..c9d107c25ac2 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -860,26 +860,6 @@ tap_setup_queue(struct rte_eth_dev *dev,
}
static int
-rx_setup_queue(struct rte_eth_dev *dev,
- struct pmd_internals *internals,
- uint16_t qid)
-{
- dev->data->rx_queues[qid] = &internals->rxq[qid];
-
- return tap_setup_queue(dev, internals, qid);
-}
-
-static int
-tx_setup_queue(struct rte_eth_dev *dev,
- struct pmd_internals *internals,
- uint16_t qid)
-{
- dev->data->tx_queues[qid] = &internals->txq[qid];
-
- return tap_setup_queue(dev, internals, qid);
-}
-
-static int
tap_rx_queue_setup(struct rte_eth_dev *dev,
uint16_t rx_queue_id,
uint16_t nb_rx_desc,
@@ -917,7 +897,8 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
}
rxq->iovecs = iovecs;
- fd = rx_setup_queue(dev, internals, rx_queue_id);
+ dev->data->rx_queues[rx_queue_id] = rxq;
+ fd = tap_setup_queue(dev, internals, rx_queue_id);
if (fd == -1) {
ret = fd;
goto error;
@@ -968,7 +949,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev,
if (tx_queue_id >= internals->nb_queues)
return -1;
- ret = tx_setup_queue(dev, internals, tx_queue_id);
+ dev->data->tx_queues[tx_queue_id] = &internals->txq[tx_queue_id];
+ ret = tap_setup_queue(dev, internals, tx_queue_id);
if (ret == -1)
return -1;
--
2.12.0.306.g4a9b9b3
next prev parent reply other threads:[~2017-04-18 8:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-14 9:32 [dpdk-dev] [PATCH 0/5] improve tap behavior Pascal Mazon
2017-04-14 9:32 ` [dpdk-dev] [PATCH 1/5] net/tap: add debug messages Pascal Mazon
2017-04-14 9:32 ` [dpdk-dev] [PATCH 2/5] net/tap: remove unnecessary functions Pascal Mazon
2017-04-14 9:32 ` [dpdk-dev] [PATCH 3/5] net/tap: drop unnecessary nested block Pascal Mazon
2017-04-14 9:32 ` [dpdk-dev] [PATCH 4/5] net/tap: create netdevice during probing Pascal Mazon
2017-04-14 9:32 ` [dpdk-dev] [PATCH 5/5] net/tap: do not set remote MAC if not necessary Pascal Mazon
2017-04-14 9:45 ` [dpdk-dev] [PATCH 0/5] improve tap behavior Ferruh Yigit
2017-04-18 8:17 ` Pascal Mazon
2017-04-18 8:17 ` [dpdk-dev] [PATCH v2 1/5] net/tap: add debug messages Pascal Mazon
2017-04-18 8:17 ` Pascal Mazon [this message]
2017-04-18 8:17 ` [dpdk-dev] [PATCH v2 3/5] net/tap: drop unnecessary nested block Pascal Mazon
2017-04-18 8:17 ` [dpdk-dev] [PATCH v2 4/5] net/tap: create netdevice during probing Pascal Mazon
2017-04-18 8:17 ` [dpdk-dev] [PATCH v2 5/5] net/tap: do not set remote MAC if not necessary Pascal Mazon
2017-05-12 12:29 ` [dpdk-dev] [PATCH 0/5] improve tap behavior Ferruh Yigit
2017-05-12 13:01 ` [dpdk-dev] [PATCH v3 " Pascal Mazon
2017-05-12 13:01 ` [dpdk-dev] [PATCH v3 1/5] net/tap: add debug messages Pascal Mazon
2017-05-12 13:01 ` [dpdk-dev] [PATCH v3 2/5] net/tap: remove unnecessary functions Pascal Mazon
2017-05-12 13:01 ` [dpdk-dev] [PATCH v3 3/5] net/tap: drop unnecessary nested block Pascal Mazon
2017-05-12 13:01 ` [dpdk-dev] [PATCH v3 4/5] net/tap: create netdevice during probing Pascal Mazon
2017-05-12 13:01 ` [dpdk-dev] [PATCH v3 5/5] net/tap: do not set remote MAC if not necessary Pascal Mazon
2017-05-12 14:04 ` [dpdk-dev] [PATCH v3 0/5] improve tap behavior 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=bfc7001c321ecd0a76d6cf6c12fc79134ebc2377.1492503445.git.pascal.mazon@6wind.com \
--to=pascal.mazon@6wind.com \
--cc=dev@dpdk.org \
/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).