From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id E8EB95A53 for ; Mon, 15 Jun 2015 14:42:39 +0200 (CEST) Received: by wibdq8 with SMTP id dq8so76900448wib.1 for ; Mon, 15 Jun 2015 05:42:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=tvTskK9pdR5gRJIZMS+Z/Py6tCYLRxYN3lyRxx59QgA=; b=JfGDlyuILVMUoGF2cQt0O1bUN/WsQrGMi6qZfd74LsgKaoHnQYrYHFrSa+kVfLt1Dt sCOQ6NYmjnXoWzZlnjQv2exbdIUs+uF3HkpaB5upx0FXTjIVoL/jrLzfsdk6en4kfcqi RZV5Gpc+/4aKGbmSeeHW0RPHVqOQiBre3GjM3uCDqOCfnLDJrFoEfcTJ522YZgVoLS77 c8FU6aGi5ZD+uEYe9CvUHtD8JY6Ki0Ul1ZOEi7cE1FUJhLPtJSgiSWe4TPKZpL3VPZY0 ZnpsNb/u8NIkdnjGkrdJzaFtHmwguXtHmamAlUPjiGiz0ysSsfs4KQ0cjceYSTUHywzm pM4g== X-Gm-Message-State: ALoCoQnvH+tUZxvC8iNtG34jpulcQ6IP7EQLyN77ibVL8w70fqa2x3Z1w9g12MNCqRiDy7kdxt8e MIME-Version: 1.0 X-Received: by 10.180.96.196 with SMTP id du4mr30986700wib.77.1434372159804; Mon, 15 Jun 2015 05:42:39 -0700 (PDT) Received: by 10.194.36.193 with HTTP; Mon, 15 Jun 2015 05:42:39 -0700 (PDT) In-Reply-To: References: <1433359137-12720-1-git-send-email-rolette@infiniteio.com> Date: Mon, 15 Jun 2015 07:42:39 -0500 Message-ID: From: Jay Rolette To: "Zhang, Helin" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 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 12:42:40 -0000 On Sun, Jun 14, 2015 at 9:07 PM, Zhang, Helin 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 > > --- > > 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) > >