From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id EA57C5A65 for ; Tue, 16 Jun 2015 03:12:41 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 15 Jun 2015 18:12:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,622,1427785200"; d="scan'208";a="744047826" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga002.fm.intel.com with ESMTP; 15 Jun 2015 18:12:40 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.224.2; Tue, 16 Jun 2015 09:12:39 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by shsmsx102.ccr.corp.intel.com ([169.254.2.165]) with mapi id 14.03.0224.002; Tue, 16 Jun 2015 09:12:38 +0800 From: "Zhang, Helin" To: Jay Rolette Thread-Topic: [dpdk-dev] [PATCH 1/3] kni: minor opto Thread-Index: AQHQnjC7Iae+1GZST0SSaWgrC4+7Q52uZl1g Date: Tue, 16 Jun 2015 01:12:38 +0000 Message-ID: References: <1433358478-12668-1-git-send-email-rolette@infiniteio.com> In-Reply-To: <1433358478-12668-1-git-send-email-rolette@infiniteio.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2015 01:12:42 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jay Rolette > Sent: Thursday, June 4, 2015 3:08 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH 1/3] kni: minor opto >=20 > Don't need the 'safe' version of list_for_each_entry() if you aren't dele= ting from > the list as you iterate over it >=20 > Signed-off-by: Jay Rolette Acked-by: Helin Zhang > --- > lib/librte_eal/linuxapp/kni/kni_misc.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > 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; >=20 > while (!kthread_should_stop()) { > down_read(&kni_list_lock); > for (j =3D 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)