From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 928502986; Sun, 3 Jun 2018 16:12:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Jun 2018 07:12:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,473,1520924400"; d="scan'208";a="46405240" Received: from unknown (HELO localhost.localdomain.localdomain) ([10.224.122.193]) by orsmga008.jf.intel.com with ESMTP; 03 Jun 2018 07:12:52 -0700 From: Nikhil Rao To: jerin.jacob@caviumnetworks.com Cc: dev@dpdk.org, Nikhil Rao , stable@dpdk.org Date: Sun, 3 Jun 2018 19:40:46 +0530 Message-Id: <1528035046-14292-1-git-send-email-nikhil.rao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-stable] [PATCH] eventdev: fix internal event port logic in Rx event adapter X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2018 14:12:58 -0000 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 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