From: "Rao, Nikhil" <nikhil.rao@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH v1 2/4] eventdev: improve err handling for Rx adapter queue add/del
Date: Mon, 18 Jun 2018 17:43:35 +0530 [thread overview]
Message-ID: <518488a6-5ae1-bf2b-9125-ca622cb4c476@intel.com> (raw)
In-Reply-To: <20180617133127.GC7498@jerin>
On 6/17/2018 7:01 PM, Jerin Jacob wrote:
> -----Original Message-----
>> Date: Fri, 8 Jun 2018 23:45:15 +0530
>> From: Nikhil Rao <nikhil.rao@intel.com>
>> To: jerin.jacob@caviumnetworks.com
>> CC: dev@dpdk.org, Nikhil Rao <nikhil.rao@intel.com>
>> Subject: [PATCH v1 2/4] eventdev: improve err handling for Rx adapter queue
>> add/del
>> X-Mailer: git-send-email 1.8.3.1
>>
>> The new WRR sequence applicable after queue add/del is set
>> up after setting the new queue state, so a memory allocation
>> failure will leave behind an incorrect state.
>>
>> This change separates the memory sizing + allocation for the
>> Rx poll and WRR array from calculation of the WRR sequence.
>> If there is a memory allocation failure, existing Rx queue
>> configuration remains unchanged.
>>
>> Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
>> ---
>> @@ -995,7 +1177,6 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter,
>> struct rte_event_eth_rx_adapter *rx_adapter;
>> struct rte_eventdev *dev;
>> struct eth_device_info *dev_info;
>> - int start_service;
>>
>> RTE_EVENT_ETH_RX_ADAPTER_ID_VALID_OR_ERR_RET(id, -EINVAL);
>> RTE_ETH_VALID_PORTID_OR_ERR_RET(eth_dev_id, -EINVAL);
>> @@ -1038,7 +1219,6 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter,
>> return -EINVAL;
>> }
>>
>> - start_service = 0;
>> dev_info = &rx_adapter->eth_devices[eth_dev_id];
>>
>> if (cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT) {
>> @@ -1072,16 +1252,13 @@ static int rxa_sw_add(struct rte_event_eth_rx_adapter *rx_adapter,
>> ret = rxa_sw_add(rx_adapter, eth_dev_id, rx_queue_id,
>> queue_conf);
>> rte_spinlock_unlock(&rx_adapter->rx_lock);
>> - if (ret == 0)
>> - start_service =
>> - !!rxa_sw_adapter_queue_count(rx_adapter);
>> }
>>
>> if (ret)
>> return ret;
>>
>> - if (start_service)
>> - rte_service_component_runstate_set(rx_adapter->service_id, 1);
>> + rte_service_component_runstate_set(rx_adapter->service_id,
>> + rxa_sw_adapter_queue_count(rx_adapter));
> Please move this logic under above !cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_INTERNAL_PORT
> condition as rte_service not valid for internal ports.
Ok.
next prev parent reply other threads:[~2018-06-18 12:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-08 18:15 [dpdk-dev] [PATCH v1 0/4] eventdev: add interrupt driven queues to Rx adapter Nikhil Rao
2018-06-08 18:15 ` [dpdk-dev] [PATCH v1 1/4] eventdev: standardize Rx adapter internal function names Nikhil Rao
2018-06-17 13:24 ` Jerin Jacob
2018-06-08 18:15 ` [dpdk-dev] [PATCH v1 2/4] eventdev: improve err handling for Rx adapter queue add/del Nikhil Rao
2018-06-17 13:31 ` Jerin Jacob
2018-06-18 12:13 ` Rao, Nikhil [this message]
2018-06-08 18:15 ` [dpdk-dev] [PATCH v1 3/4] eventdev: move Rx adapter eth receive code to separate function Nikhil Rao
2018-06-17 13:35 ` Jerin Jacob
2018-06-08 18:15 ` [dpdk-dev] [PATCH v1 3/4] eventdev: move Rx adapter eth Rx " Nikhil Rao
2018-06-17 13:36 ` Jerin Jacob
2018-06-08 18:15 ` [dpdk-dev] [PATCH v1 4/4] eventdev: add interrupt driven queues in Rx event adapter Nikhil Rao
2018-06-17 13:49 ` Jerin Jacob
2018-06-18 13:15 ` Rao, Nikhil
2018-06-27 10:55 ` [dpdk-dev] [PATCH v2 0/5] eventdev: add interrupt driven queues to Rx adapter Nikhil Rao
2018-06-27 10:55 ` [dpdk-dev] [PATCH v2 1/5] eventdev: standardize Rx adapter internal function names Nikhil Rao
2018-06-27 10:55 ` [dpdk-dev] [PATCH v2 2/5] eventdev: improve err handling for Rx adapter queue add/del Nikhil Rao
2018-06-27 10:55 ` [dpdk-dev] [PATCH v2 3/5] eventdev: move Rx adapter eth Rx to separate function Nikhil Rao
2018-06-27 10:55 ` [dpdk-dev] [PATCH v2 4/5] eventdev: add interrupt driven queues to Rx adapter Nikhil Rao
2018-06-27 10:55 ` [dpdk-dev] [PATCH v2 5/5] eventdev: add Rx adapter tests for interrupt driven queues Nikhil Rao
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=518488a6-5ae1-bf2b-9125-ca622cb4c476@intel.com \
--to=nikhil.rao@intel.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
/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).