From: Nikhil Rao Date: Sun, 3 Jun 2018 14:10:46 +0000 (+0530) Subject: eventdev: fix internal port logic in Rx adapter X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d411c4074fe6d90b695f9d9c4982b8c45f2a675d;p=dpdk.git eventdev: fix internal port logic in Rx adapter 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") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao Acked-by: Jerin Jacob --- diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c index e353424ce8..ad174ac07f 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 @@ eth_poll_wrr_calc(struct rte_event_eth_rx_adapter *rx_adapter) 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 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, &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 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id, } } 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,