DPDK patches and discussions
 help / color / mirror / Atom feed
From: Nikhil Rao <nikhil.rao@intel.com>
To: jerin.jacob@caviumnetworks.com
Cc: dev@dpdk.org, Nikhil Rao <nikhil.rao@intel.com>, stable@dpdk.org
Subject: [dpdk-dev] [PATCH] eventdev: fix internal event port logic in Rx event adapter
Date: Sun,  3 Jun 2018 19:40:46 +0530	[thread overview]
Message-ID: <1528035046-14292-1-git-send-email-nikhil.rao@intel.com> (raw)

Set the internal_event_port flag when the ethdev-eventdev
packet transfer is implemented in hardware and add a check
for the flag to ignore the connection when setting up the
WRR polling sequence.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
CC: stable@dpdk.org
---
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 3a70058..d03f870 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -224,6 +224,8 @@ static uint16_t gcd_u16(uint16_t a, uint16_t b)
 			nb_rx_queues = dev_info->dev->data->nb_rx_queues;
 			if (dev_info->rx_queue == NULL)
 				continue;
+			if (dev_info->internal_event_port)
+				continue;
 			for (q = 0; q < nb_rx_queues; q++) {
 				struct eth_rx_queue_info *queue_info =
 					&dev_info->rx_queue[q];
@@ -1050,6 +1052,7 @@ static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter,
 				&rte_eth_devices[eth_dev_id],
 				rx_queue_id, queue_conf);
 		if (ret == 0) {
+			dev_info->internal_event_port = 1;
 			update_queue_info(rx_adapter,
 					&rx_adapter->eth_devices[eth_dev_id],
 					rx_queue_id,
@@ -1057,6 +1060,7 @@ static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter,
 		}
 	} else {
 		rte_spinlock_lock(&rx_adapter->rx_lock);
+		dev_info->internal_event_port = 0;
 		ret = init_service(rx_adapter, id);
 		if (ret == 0)
 			ret = add_rx_queue(rx_adapter, eth_dev_id, rx_queue_id,
-- 
1.8.3.1

             reply	other threads:[~2018-06-03 14:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03 14:10 Nikhil Rao [this message]
2018-06-11 12:18 ` Jerin Jacob

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=1528035046-14292-1-git-send-email-nikhil.rao@intel.com \
    --to=nikhil.rao@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=stable@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).