From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 25818293B for ; Mon, 18 Jun 2018 14:13:37 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 05:13:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,239,1526367600"; d="scan'208";a="58526924" Received: from abaagwal-mobl1.gar.corp.intel.com (HELO [10.252.76.57]) ([10.252.76.57]) by fmsmga002.fm.intel.com with ESMTP; 18 Jun 2018 05:13:36 -0700 To: Jerin Jacob Cc: dev@dpdk.org References: <1528481718-7241-1-git-send-email-nikhil.rao@intel.com> <1528481718-7241-3-git-send-email-nikhil.rao@intel.com> <20180617133127.GC7498@jerin> From: "Rao, Nikhil" Message-ID: <518488a6-5ae1-bf2b-9125-ca622cb4c476@intel.com> Date: Mon, 18 Jun 2018 17:43:35 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180617133127.GC7498@jerin> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Subject: Re: [dpdk-dev] [PATCH v1 2/4] eventdev: improve err handling for Rx adapter queue add/del X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2018 12:13:38 -0000 On 6/17/2018 7:01 PM, Jerin Jacob wrote: > -----Original Message----- >> Date: Fri, 8 Jun 2018 23:45:15 +0530 >> From: Nikhil Rao >> To: jerin.jacob@caviumnetworks.com >> CC: dev@dpdk.org, Nikhil Rao >> 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 >> --- >> @@ -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.