From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 4096F5A65 for ; Mon, 15 Jun 2015 04:09:32 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 14 Jun 2015 19:09:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,615,1427785200"; d="scan'208";a="727320365" Received: from pgsmsx104.gar.corp.intel.com ([10.221.44.91]) by fmsmga001.fm.intel.com with ESMTP; 14 Jun 2015 19:09:30 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by PGSMSX104.gar.corp.intel.com (10.221.44.91) with Microsoft SMTP Server (TLS) id 14.3.224.2; Mon, 15 Jun 2015 10:07:48 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.129]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.246]) with mapi id 14.03.0224.002; Mon, 15 Jun 2015 10:07:47 +0800 From: "Zhang, Helin" To: Jay Rolette Thread-Topic: [dpdk-dev] [PATCH 1/3] kni: minor opto Thread-Index: AQHQnjJOIae+1GZST0SSaWgrC4+7Q52s43lA Date: Mon, 15 Jun 2015 02:07:47 +0000 Message-ID: References: <1433359137-12720-1-git-send-email-rolette@infiniteio.com> In-Reply-To: <1433359137-12720-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: Mon, 15 Jun 2015 02:09:32 -0000 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 >=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 > --- > 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)