From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anoob Subject: Re: [PATCH v2 2/2] examples/ipsec-secgw: add target queues in flow actions Date: Mon, 11 Dec 2017 14:30:01 +0530 Message-ID: <3d536158-7371-614d-a2ee-a3282fda2c65@caviumnetworks.com> References: <6ac80a2be156911ee35c894924a02f04c43f49fc.1511449894.git.nelio.laranjeiro@6wind.com> <20171208144000.seega54cbv7prktb@laranjeiro-vm.dev.6wind.com> <11087367-b892-aae7-07bc-555232a0ce8d@caviumnetworks.com> <20171211082132.usggk5hfz3xy5usl@laranjeiro-vm.dev.6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Sergio Gonzalez Monroy , Radu Nicolau , dev@dpdk.org, Jerin Jacob , Narayana Prasad To: Nelio Laranjeiro Return-path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0089.outbound.protection.outlook.com [104.47.38.89]) by dpdk.org (Postfix) with ESMTP id C24892C66 for ; Mon, 11 Dec 2017 10:00:16 +0100 (CET) In-Reply-To: <20171211082132.usggk5hfz3xy5usl@laranjeiro-vm.dev.6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Nelio, On 12/11/2017 01:51 PM, Nelio Laranjeiro wrote: > Hi Anoob, > > On Fri, Dec 08, 2017 at 10:10:28PM +0530, Anoob Joseph wrote: >> HI Nelio, >> >> >> On 08-12-2017 20:10, Nelio Laranjeiro wrote: >>> On Fri, Dec 08, 2017 at 07:30:03PM +0530, Anoob wrote: >>>> Hi Nelio, >>>> >>>> >>> [...] >>>>> + goto flow_create; >>>>> + /* Try Queue. */ >>>>> + for (i = 0; >>>>> + i < eth_dev->data->nb_rx_queues; ++i) >>>>> + if (eth_dev->data->rx_queues[i]) >>>>> + break; >>>> Is the following check correct? >>> [...] >>> >>> For an application, it seems not necessary. The application knows which >>> queues are configured in the drivers has it has made the configuration. >>> >>> Removing it in the v3. >> I think you misunderstood me here. > Indeed, I misunderstood, > >> I was talking about the following line. >> >> + if (i != eth_dev->data->nb_rx_queues) >> + return -1; >> >> Shouldn't it be? >> >> + if (i == eth_dev->data->nb_rx_queues) >> + return -1; > Yes it should. > > Anyway, I don't thing it is necessary to keep this check, from what I > saw in the application source code, it initialise all Rx queues up to > nb_rx_queues without leaving any hole. > According to this, I'll just remove this verification, is it okay for > you? I think you can just use Queue 0 here. So you can get rid of the checks etc. For real applications, we should have an entry in SA structure which will determine the Queue to be used. Even for RSS, something like that would be required. Thanks, Anoob