[dpdk-dev] [PATCH v3 1/4] net/softnic: add softnic PMD
Singh, Jasvinder
jasvinder.singh at intel.com
Fri Sep 8 12:42:26 CEST 2017
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Friday, September 8, 2017 10:49 AM
> To: Singh, Jasvinder <jasvinder.singh at intel.com>; dev at dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu at intel.com>;
> thomas at monjalon.net
> Subject: Re: [PATCH v3 1/4] net/softnic: add softnic PMD
>
> On 9/8/2017 10:30 AM, Singh, Jasvinder wrote:
> > Hi Ferruh,
> >
> > Thank you for the review and feedback. Please see inline response;
> >
> >> -----Original Message-----
> >> From: Yigit, Ferruh
> >> Sent: Tuesday, September 5, 2017 3:53 PM
> >> To: Singh, Jasvinder <jasvinder.singh at intel.com>; dev at dpdk.org
> >> Cc: Dumitrescu, Cristian <cristian.dumitrescu at intel.com>;
> >> thomas at monjalon.net
> >> Subject: Re: [PATCH v3 1/4] net/softnic: add softnic PMD
> >>
> >> On 8/11/2017 1:49 PM, Jasvinder Singh wrote:
> >>> Add SoftNIC PMD to provide SW fall-back for ethdev APIs.
> >>>
> >>> Signed-off-by: Cristian Dumitrescu <cristian.dumitrescu at intel.com>
> >>> Signed-off-by: Jasvinder Singh <jasvinder.singh at intel.com>
>
> <...>
>
> >>> +
> >>> + /* Default */
> >>> + status = default_init(p, params, numa_node);
> >>> + if (status) {
> >>> + rte_free(p);
> >>> + return NULL;
> >>> + }
> >>> +
> >>> + return p;
> >>> +}
> >>> +
> >>> +static void
> >>> +pmd_free(struct pmd_internals *p)
> >>> +{
> >>> + default_free(p);
> >>
> >> p->hard.name also needs to be freed here.
> >
> > No, we don't allocate any memory to this varibale as it points to the
> > value retrieved from the rte_eth_dev_get_port_by_name();
>
> I guess it is otherway around, the rte_eth_dev_get_port_by_name() uses
> hard.name to get and store the port_id of the underlying hw.
>
> how hard.name set, if I don't miss anything, it is strdup from devargs:
>
> --
> ret = rte_kvargs_process(kvlist, PMD_PARAM_HARD_NAME, &get_string,
> &p->hard.name);
> --
> get_string()
> *(char **)extra_args = strdup(value);
> --
Yes, it is set using above, will correct that. Thanks.
More information about the dev
mailing list