Message ID | 1433359137-12720-1-git-send-email-rolette@infiniteio.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D95D0C320; Wed, 3 Jun 2015 21:19:29 +0200 (CEST) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by dpdk.org (Postfix) with ESMTP id 2FD88C31C for <dev@dpdk.org>; Wed, 3 Jun 2015 21:19:28 +0200 (CEST) Received: by obcnx10 with SMTP id nx10so15923461obc.2 for <dev@dpdk.org>; Wed, 03 Jun 2015 12:19:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WppOcdz3VCwVce1zqOAJ4pyVp+DT35hZakw8491hUXc=; b=WRf1pdJTS4GD0glf8fBa4VDH4iqxpZBwFKs4HRdhDPhiwdkzVuqORryxd3l/p2SqdQ BFt8WuI+6Dhc5OpwYFPACLhL7D5VpMjDKq76XcM6vXYXQgD1AvzLYJUKCa6f14IwfrdM sbgyRjejQPzAP4SQ8tmmRJ8yXmczBzfnkiDOSylv6k96ov4UwH/lt8lI+JtGmwySqclD v0so1cXzFIRihRgvvogSaqo1vE0+dRP98+5B5742snuYAyqj/YqhpLes1HekkAvqj24Q uAsvcIiiz3fMakXf8MkFn+s3rJl4/5pr9FJrXaYIRKTdS541H/ECtagYLodiEGIhGeVm kJfQ== X-Gm-Message-State: ALoCoQlciF6GSuyjqVqQVnehW+6yYoJg5CIuu9C6vtOG6qmFOfTPuzJ3pWSbwoKfj1RN9TRaa4DI X-Received: by 10.202.87.133 with SMTP id l127mr27191009oib.83.1433359167679; Wed, 03 Jun 2015 12:19:27 -0700 (PDT) Received: from localhost.localdomain (rrcs-97-77-120-78.sw.biz.rr.com. [97.77.120.78]) by mx.google.com with ESMTPSA id c9sm12039646oih.11.2015.06.03.12.19.25 (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Jun 2015 12:19:26 -0700 (PDT) From: Jay Rolette <rolette@infiniteio.com> To: dev@dpdk.org Date: Wed, 3 Jun 2015 14:18:55 -0500 Message-Id: <1433359137-12720-1-git-send-email-rolette@infiniteio.com> X-Mailer: git-send-email 2.3.2 (Apple Git-55) Subject: [dpdk-dev] [PATCH 1/3] kni: minor opto X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Jay Rolette
June 3, 2015, 7:18 p.m. UTC
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(-)
Comments
On Wed, Jun 03, 2015 at 02:18:55PM -0500, Jay Rolette wrote: > 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> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
On Thu, Jun 04, 2015 at 02:39:17PM +0100, Bruce Richardson wrote: > On Wed, Jun 03, 2015 at 02:18:55PM -0500, Jay Rolette wrote: > > 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> > > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > Forgot to mention though, that the commit title needs to be a little more descriptive.
2015-06-04 14:40, Bruce Richardson: > On Thu, Jun 04, 2015 at 02:39:17PM +0100, Bruce Richardson wrote: > > On Wed, Jun 03, 2015 at 02:18:55PM -0500, Jay Rolette wrote: > > > 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> > > > > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > > > Forgot to mention though, that the commit title needs to be a little more > descriptive. So you should not ack this version ;)
On Thu, Jun 04, 2015 at 05:02:06PM +0200, Thomas Monjalon wrote: > 2015-06-04 14:40, Bruce Richardson: > > On Thu, Jun 04, 2015 at 02:39:17PM +0100, Bruce Richardson wrote: > > > On Wed, Jun 03, 2015 at 02:18:55PM -0500, Jay Rolette wrote: > > > > 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> > > > > > > Acked-by: Bruce Richardson <bruce.richardson@intel.com> > > > > > Forgot to mention though, that the commit title needs to be a little more > > descriptive. > > So you should not ack this version ;) > Code and text description looked fine, so I thought an ack otherwise appropriate. However, I will refrain from doing so in future :-) /Bruce
Would it be better to modify the similar thing in kni_ioctl_create()? - 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)
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) > >
Hi Jay From: Jay Rolette [mailto:rolette@infiniteio.com] Sent: Monday, June 15, 2015 8:43 PM To: Zhang, Helin Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/3] kni: minor opto On Sun, Jun 14, 2015 at 9:07 PM, Zhang, Helin <helin.zhang@intel.com<mailto: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. Yes, your patches are OK for me. I have acked it. - Helin - Helin > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org<mailto:dev-bounces@dpdk.org>] On Behalf Of Jay Rolette > Sent: Thursday, June 4, 2015 3:19 AM > To: dev@dpdk.org<mailto: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<mailto: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)
2015-06-16 01:15, Zhang, Helin:
> Yes, your patches are OK for me. I have acked it.
Series applied, thanks
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