DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Dumitrescu, Cristian" <cristian.dumitrescu@intel.com>
To: "Laatz, Kevin" <kevin.laatz@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Singh, Jasvinder" <jasvinder.singh@intel.com>
Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: add link show to the cli
Date: Fri, 15 Jun 2018 15:31:28 +0000	[thread overview]
Message-ID: <3EB4FA525960D640B5BDFFD6A3D891268E75A47F@IRSMSX108.ger.corp.intel.com> (raw)
In-Reply-To: <17B8B96B619B7A459C5ACA628B274952BFF8E8@IRSMSX103.ger.corp.intel.com>

Hi Kevin,

If you only need access to this linked list for iterating through it, you can add a new function: struct link *link_next(struct link *) that gets you the next element in the list (for first element, invoke with link = NULL; at and of list, it returns NULL). Makes sense?

Are there other usages of this linked list that you need to cover?

Regards,
Cristian

> -----Original Message-----
> From: Laatz, Kevin
> Sent: Friday, June 15, 2018 3:57 PM
> To: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>; dev@dpdk.org
> Cc: Singh, Jasvinder <jasvinder.singh@intel.com>
> Subject: RE: [PATCH] examples/ip_pipeline: add link show to the cli
> 
> Hi Cristian,
> 
> > > +
> > > +	link_list = links_get();
> >
> > We don't need this function, the lined list of links is a global public object,
> > please access it directly.
> 
> link_list is declared as a static struct in link.c so it is not accessible from cli.c
> 
> I can either leave this function in to pass the pointer to the cli.c or move the
> declaration to link.h.
> Do you have a preference?
> 
> > >
> > > +struct link_list *
> > > +links_get(void)
> > > +{
> > > +	return &link_list;
> > > +}
> > > +
> >
> > Function to be removed, used linked list of links directly (see comment
> > above).
> 
> See above comment
> 
> Thanks,
> Kevin

  reply	other threads:[~2018-06-15 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08 16:30 Kevin Laatz
2018-06-08 16:51 ` Dumitrescu, Cristian
2018-06-15 14:57   ` Laatz, Kevin
2018-06-15 15:31     ` Dumitrescu, Cristian [this message]
2018-06-22 14:31 ` [dpdk-dev] [PATCH v2] " Kevin Laatz

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=3EB4FA525960D640B5BDFFD6A3D891268E75A47F@IRSMSX108.ger.corp.intel.com \
    --to=cristian.dumitrescu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jasvinder.singh@intel.com \
    --cc=kevin.laatz@intel.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).