DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jay Rolette <rolette@infiniteio.com>
To: "Zhang, Helin" <helin.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 1/3] kni: minor opto
Date: Mon, 15 Jun 2015 07:42:39 -0500	[thread overview]
Message-ID: <CADNuJVqSycg1SE3Y2ewSErQy+kytbZJp--qCWe80yoDaNLEMHA@mail.gmail.com> (raw)
In-Reply-To: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A881E2C@SHSMSX104.ccr.corp.intel.com>

On Sun, Jun 14, 2015 at 9:07 PM, Zhang, Helin <helin.zhang@intel.com> wrote:

> Would it be better to modify the similar thing in kni_ioctl_create()?
>

That one doesn't need to use the "safe" version of list_for_each_entry()
either, but it isn't in the packet processing path so the minor performance
improvement doesn't really matter.


>
> - Helin
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jay Rolette
> > Sent: Thursday, June 4, 2015 3:19 AM
> > To: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH 1/3] kni: minor opto
> >
> > Don't need the 'safe' version of list_for_each_entry() if you aren't
> deleting from
> > the list as you iterate over it
> >
> > Signed-off-by: Jay Rolette <rolette@infiniteio.com>
> > ---
> >  lib/librte_eal/linuxapp/kni/kni_misc.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c
> > b/lib/librte_eal/linuxapp/kni/kni_misc.c
> > index 1935d32..312f196 100644
> > --- a/lib/librte_eal/linuxapp/kni/kni_misc.c
> > +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
> > @@ -213,13 +213,12 @@ static int
> >  kni_thread_single(void *unused)
> >  {
> >       int j;
> > -     struct kni_dev *dev, *n;
> > +     struct kni_dev *dev;
> >
> >       while (!kthread_should_stop()) {
> >               down_read(&kni_list_lock);
> >               for (j = 0; j < KNI_RX_LOOP_NUM; j++) {
> > -                     list_for_each_entry_safe(dev, n,
> > -                                     &kni_list_head, list) {
> > +                     list_for_each_entry(dev, &kni_list_head, list) {
> >  #ifdef RTE_KNI_VHOST
> >                               kni_chk_vhost_rx(dev);
> >  #else
> > --
> > 2.3.2 (Apple Git-55)
>
>

  reply	other threads:[~2015-06-15 12:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 19:18 Jay Rolette
2015-06-03 19:18 ` [dpdk-dev] [PATCH 2/3] " Jay Rolette
2015-06-04 13:44   ` Bruce Richardson
2015-06-15  2:21   ` Zhang, Helin
2015-06-03 19:18 ` [dpdk-dev] [PATCH 3/3] kni: rx loop was using the wrong counter Jay Rolette
2015-06-04 13:47   ` Bruce Richardson
2015-06-04 13:39 ` [dpdk-dev] [PATCH 1/3] kni: minor opto Bruce Richardson
2015-06-04 13:40   ` Bruce Richardson
2015-06-04 15:02     ` Thomas Monjalon
2015-06-04 15:05       ` Bruce Richardson
2015-06-15  2:07 ` Zhang, Helin
2015-06-15 12:42   ` Jay Rolette [this message]
2015-06-16  1:15     ` Zhang, Helin
2015-06-16 15:20       ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2015-06-03 19:07 Jay Rolette
2015-06-16  1:12 ` Zhang, Helin

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=CADNuJVqSycg1SE3Y2ewSErQy+kytbZJp--qCWe80yoDaNLEMHA@mail.gmail.com \
    --to=rolette@infiniteio.com \
    --cc=dev@dpdk.org \
    --cc=helin.zhang@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).