* [dpdk-stable] [PATCH] eventdev: fix internal event port logic in Rx event adapter
@ 2018-06-03 14:10 Nikhil Rao
2018-06-11 12:18 ` Jerin Jacob
0 siblings, 1 reply; 2+ messages in thread
From: Nikhil Rao @ 2018-06-03 14:10 UTC (permalink / raw)
To: jerin.jacob; +Cc: dev, Nikhil Rao, stable
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH] eventdev: fix internal event port logic in Rx event adapter
2018-06-03 14:10 [dpdk-stable] [PATCH] eventdev: fix internal event port logic in Rx event adapter Nikhil Rao
@ 2018-06-11 12:18 ` Jerin Jacob
0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2018-06-11 12:18 UTC (permalink / raw)
To: Nikhil Rao; +Cc: dev, stable
-----Original Message-----
> Date: Sun, 3 Jun 2018 19:40:46 +0530
> 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: [PATCH] eventdev: fix internal event port logic in Rx event adapter
> X-Mailer: git-send-email 1.8.3.1
>
> 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
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Applied to dpdk-next-eventdev/master. Thanks.
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-11 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-03 14:10 [dpdk-stable] [PATCH] eventdev: fix internal event port logic in Rx event adapter Nikhil Rao
2018-06-11 12:18 ` Jerin Jacob
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).