From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shreyansh Jain Subject: Re: [PATCH v2 11/18] devargs: simplify implementation Date: Mon, 16 Oct 2017 17:12:37 +0530 Message-ID: <4f3a6e5e-65ea-4cef-1146-3b91943ec5c7@nxp.com> References: <49446c2cba12cd5da276bfde8479aa97dcf0f653.1507796100.git.gaetan.rivet@6wind.com> <39e734ea-531c-6335-f1d5-22c75fe38f9e@nxp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Cc: To: Gaetan Rivet Return-path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0087.outbound.protection.outlook.com [104.47.41.87]) by dpdk.org (Postfix) with ESMTP id F03F11B651 for ; Mon, 16 Oct 2017 13:30:30 +0200 (CEST) In-Reply-To: <39e734ea-531c-6335-f1d5-22c75fe38f9e@nxp.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" Hello Gaetan, Please ignore this email (reason inline) On Monday 16 October 2017 05:09 PM, Shreyansh Jain wrote: > Hello Gaetan, > > On Thursday 12 October 2017 01:51 PM, Gaetan Rivet wrote: >> Re-use existing code, remove incorrect comments. >> >> Signed-off-by: Gaetan Rivet >> --- >>   lib/librte_eal/common/eal_common_devargs.c | 8 +++----- >>   1 file changed, 3 insertions(+), 5 deletions(-) >> >> diff --git a/lib/librte_eal/common/eal_common_devargs.c >> b/lib/librte_eal/common/eal_common_devargs.c >> index 49cc3b8..1d87cd9 100644 >> --- a/lib/librte_eal/common/eal_common_devargs.c >> +++ b/lib/librte_eal/common/eal_common_devargs.c >> @@ -153,21 +153,19 @@ rte_eal_devargs_insert(struct rte_devargs *da) >>       return 0; >>   } > > While trying to work on this patch, I noticed that the complete series > (including "Move PCI away from EAL") is not cleanly applicable on > current master (17.11 RC1). I thought it would be some tiny issues. > > But there are some issues which I couldn't pass, Like... > >> -/* store a whitelist parameter for later parsing */ >>   int > > In the this function > >> -rte_eal_devargs_add(const char *devargs_str) >> +rte_eal_devargs_add(const char *dev) >>   { >>       struct rte_devargs *devargs = NULL; >> -    const char *dev = devargs_str; >> -    /* use calloc instead of rte_zmalloc as it's called early at init */ >>       devargs = calloc(1, sizeof(*devargs)); >>       if (devargs == NULL) >>           goto fail; >>       if (rte_eal_devargs_parse(devargs, "%s", dev)) >>           goto fail; > > These lines don't exist in your patch > > --- > 59c2ba6c 172)   if (bus->conf.probe_mode == RTE_BUS_PROBE_UNDEFINED) { > b631f3b0 173)           if (devargs->policy == RTE_DEV_WHITELISTED) > 59c2ba6c 174)                   bus->conf.probe_mode = > RTE_BUS_PROBE_WHITELIST; > b631f3b0 175)           else if (devargs->policy == RTE_DEV_BLACKLISTED) > 59c2ba6c 176)                   bus->conf.probe_mode = > RTE_BUS_PROBE_BLACKLIST; > 02823c1d 177)   } > bf6dea0e 178)   TAILQ_INSERT_TAIL(&devargs_list, devargs, next); > bf6dea0e 179)   return 0; > 0215a4c6 180) > --- > (Some introduced by the move PCI series, but others like b631f3b0 are > very old ~17.08) > > >> -    TAILQ_INSERT_TAIL(&devargs_list, devargs, next); >> +    if (rte_eal_devargs_insert(devargs)) >> +        goto fail; > > And hence, I don't know whether you intend to insert the above line > after or before checking PROBE. > >>       return 0; >>   fail: >> > > Maybe I am doing something wrong here - any ideas? Can you send an > updated/rebased version on current master HEAD? Just after sending this, I noticed that I had not applied the "Bus control framework" patch set which the "devargs..." cover letter talks about. I will try with that and confirm if there is still any issue. > > - > Shreyansh >