DPDK patches and discussions
 help / color / mirror / Atom feed
From: Raslan Darawsheh <rasland@mellanox.com>
To: keith.wiles@intel.com
Cc: thomas@monjalon.net, dev@dpdk.org, shahafs@mellanox.com,
	rasland@mellanox.com, orika@mellanox.com, ferruh.yigit@intel.com
Subject: [dpdk-dev] [PATCH v7 1/3] net/tap: add queue and port ids in Rx/Tx queues structures
Date: Wed, 17 Oct 2018 11:56:02 +0300	[thread overview]
Message-ID: <1539766564-9433-1-git-send-email-rasland@mellanox.com> (raw)
In-Reply-To: <1539182356-15496-2-git-send-email-rasland@mellanox.com>

Port and queue ids are added to easily map the file
descriptors stored in each process private.

Signed-off-by: Raslan Darawsheh <rasland@mellanox.com>
---
 drivers/net/tap/rte_eth_tap.c | 3 +++
 drivers/net/tap/rte_eth_tap.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index ad5ae98..edfb7da 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -1293,6 +1293,7 @@ tap_rx_queue_setup(struct rte_eth_dev *dev,
 	rxq->mp = mp;
 	rxq->trigger_seen = 1; /* force initial burst */
 	rxq->in_port = dev->data->port_id;
+	rxq->queue_id = rx_queue_id;
 	rxq->nb_rx_desc = nb_desc;
 	iovecs = rte_zmalloc_socket(dev->device->name, sizeof(*iovecs), 0,
 				    socket_id);
@@ -1359,6 +1360,8 @@ tap_tx_queue_setup(struct rte_eth_dev *dev,
 		return -1;
 	dev->data->tx_queues[tx_queue_id] = &internals->txq[tx_queue_id];
 	txq = dev->data->tx_queues[tx_queue_id];
+	txq->out_port = dev->data->port_id;
+	txq->queue_id = tx_queue_id;
 
 	offloads = tx_conf->offloads | dev->data->dev_conf.txmode.offloads;
 	txq->csum = !!(offloads &
diff --git a/drivers/net/tap/rte_eth_tap.h b/drivers/net/tap/rte_eth_tap.h
index 44e2773..4502e24 100644
--- a/drivers/net/tap/rte_eth_tap.h
+++ b/drivers/net/tap/rte_eth_tap.h
@@ -46,6 +46,7 @@ struct rx_queue {
 	struct rte_mempool *mp;         /* Mempool for RX packets */
 	uint32_t trigger_seen;          /* Last seen Rx trigger value */
 	uint16_t in_port;               /* Port ID */
+	uint16_t queue_id;		/* queue ID*/
 	int fd;
 	struct pkt_stats stats;         /* Stats for this RX queue */
 	uint16_t nb_rx_desc;            /* max number of mbufs available */
@@ -62,6 +63,8 @@ struct tx_queue {
 	uint16_t csum:1;                /* Enable checksum offloading */
 	struct pkt_stats stats;         /* Stats for this TX queue */
 	struct rte_gso_ctx gso_ctx;     /* GSO context */
+	uint16_t out_port;              /* Port ID */
+	uint16_t queue_id;		/* queue ID*/
 };
 
 struct pmd_internals {
-- 
2.7.4

  parent reply	other threads:[~2018-10-17  8:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 14:39 [dpdk-dev] [PATCH v6 " Raslan Darawsheh
2018-10-10 14:39 ` [dpdk-dev] [PATCH v6 2/3] net/tap: move fds of Rx/Tx queues to be in process private Raslan Darawsheh
2018-10-11 16:19   ` Ferruh Yigit
2018-10-16 10:07     ` Raslan Darawsheh
2018-10-16 11:24       ` Ferruh Yigit
2018-10-17  8:56   ` Raslan Darawsheh [this message]
2018-10-17  8:56     ` [dpdk-dev] [PATCH v7 " Raslan Darawsheh
2018-10-17  8:56     ` [dpdk-dev] [PATCH v7 3/3] net/tap: allow secondary process to access primary device queues Raslan Darawsheh
2018-10-17 12:06       ` Ferruh Yigit
2018-10-17 14:46         ` Raslan Darawsheh
2018-10-17 14:45   ` [dpdk-dev] [PATCH v8 1/3] net/tap: add queue and port ids in Rx/Tx queues structures Raslan Darawsheh
2018-10-17 14:45     ` [dpdk-dev] [PATCH v8 2/3] net/tap: move fds of Rx/Tx queues to be in process private Raslan Darawsheh
2018-10-17 14:45     ` [dpdk-dev] [PATCH v8 3/3] net/tap: allow secondary process to access primary device queues Raslan Darawsheh
2018-10-17 16:02       ` Ferruh Yigit
2018-10-18  8:11         ` Raslan Darawsheh
2018-10-18  8:15   ` [dpdk-dev] [PATCH v9 1/3] net/tap: add queue and port ids in Rx/Tx queues structures Raslan Darawsheh
2018-10-18  8:15     ` [dpdk-dev] [PATCH v9 2/3] net/tap: move fds of Rx/Tx queues to be in process private Raslan Darawsheh
2018-10-18  8:15     ` [dpdk-dev] [PATCH v9 3/3] net/tap: allow secondary process to access primary device queues Raslan Darawsheh
2018-10-18 10:09       ` Ferruh Yigit
2018-10-18 10:17   ` [dpdk-dev] [PATCH v10 1/3] net/tap: add queue and port ids in Rx/Tx queues structures Raslan Darawsheh
2018-10-18 10:17     ` [dpdk-dev] [PATCH v10 2/3] net/tap: move fds of Rx/Tx queues to be in process private Raslan Darawsheh
2018-10-18 10:17     ` [dpdk-dev] [PATCH v10 3/3] net/tap: allow secondary process to access primary device queues Raslan Darawsheh
2018-10-18 11:22     ` [dpdk-dev] [PATCH v10 1/3] net/tap: add queue and port ids in Rx/Tx queues structures Ferruh Yigit
2018-10-18 12:56     ` Ferruh Yigit
2018-10-10 14:39 ` [dpdk-dev] [PATCH v6 3/3] net/tap: allow secondary process to access primary device queues Raslan Darawsheh
2018-10-11 16:32   ` Ferruh Yigit
2018-10-16 10:06     ` Raslan Darawsheh
2018-10-16 11:27       ` Ferruh Yigit
2018-10-17  6:54         ` Raslan Darawsheh
2018-10-17  7:59           ` 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=1539766564-9433-1-git-send-email-rasland@mellanox.com \
    --to=rasland@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=keith.wiles@intel.com \
    --cc=orika@mellanox.com \
    --cc=shahafs@mellanox.com \
    --cc=thomas@monjalon.net \
    /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).