From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758690AbdCVDQQ (ORCPT ); Tue, 21 Mar 2017 23:16:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55032 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757077AbdCVDQO (ORCPT ); Tue, 21 Mar 2017 23:16:14 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 754E3C04B938 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jasowang@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 754E3C04B938 Subject: Re: [PATCH net-next 1/8] ptr_ring: introduce batch dequeuing To: Sergei Shtylyov , mst@redhat.com, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1490069087-4783-1-git-send-email-jasowang@redhat.com> <1490069087-4783-2-git-send-email-jasowang@redhat.com> <9ecd2a27-4f93-2b3f-cb91-c558976973a2@cogentembedded.com> From: Jason Wang Message-ID: <590abb0f-e28a-52f7-5abc-b72159e31d5f@redhat.com> Date: Wed, 22 Mar 2017 11:16:07 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <9ecd2a27-4f93-2b3f-cb91-c558976973a2@cogentembedded.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 22 Mar 2017 03:16:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017年03月21日 18:25, Sergei Shtylyov wrote: > Hello! > > On 3/21/2017 7:04 AM, Jason Wang wrote: > >> Signed-off-by: Jason Wang >> --- >> include/linux/ptr_ring.h | 65 >> ++++++++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 65 insertions(+) >> >> diff --git a/include/linux/ptr_ring.h b/include/linux/ptr_ring.h >> index 6c70444..4771ded 100644 >> --- a/include/linux/ptr_ring.h >> +++ b/include/linux/ptr_ring.h >> @@ -247,6 +247,22 @@ static inline void *__ptr_ring_consume(struct >> ptr_ring *r) >> return ptr; >> } >> >> +static inline int __ptr_ring_consume_batched(struct ptr_ring *r, >> + void **array, int n) >> +{ >> + void *ptr; >> + int i = 0; >> + >> + while (i < n) { > > Hm, why not *for*? Yes, it maybe better, if there's other comment on the series, will change it in next version. Thanks