From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [bpf-next V4 PATCH 2/8] bpf: devmap prepare xdp frames for bulking Date: Wed, 23 May 2018 12:38:42 +0200 Message-ID: <20180523123842.4a3c8386@redhat.com> References: <152665044141.21055.1276346542020340263.stgit@firesoul> <152665048175.21055.15345477060144555643.stgit@firesoul> <1db29c53-1568-a3b5-f2d3-1c830aefe33b@iogearbox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, Daniel Borkmann , Alexei Starovoitov , Christoph Hellwig , =?UTF-8?B?QmrDtnJuVMO2cGVs?= , Magnus Karlsson , makita.toshiaki@lab.ntt.co.jp, brouer@redhat.com To: Daniel Borkmann Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:52148 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932180AbeEWKit (ORCPT ); Wed, 23 May 2018 06:38:49 -0400 In-Reply-To: <1db29c53-1568-a3b5-f2d3-1c830aefe33b@iogearbox.net> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 23 May 2018 11:54:38 +0200 Daniel Borkmann wrote: > > + for (i = 0; i < bq->count; i++) { > > + struct xdp_frame *xdpf = bq->q[i]; > > + int err; > > + > > + err = dev->netdev_ops->ndo_xdp_xmit(dev, xdpf); > > + if (err) { > > + drops++; > > + xdp_return_frame(xdpf); > > + } > > + processed++; > > This sort of thing makes it really hard to review. 'processed' and > 'drops' are not read anywhere in this function. So I need to go and > check all the other patches whether there's further logic involved here > or not. I had to review your series after applying all patches in a > local branch, please never do this. Add the logic in a patch where it's > self-contained and obvious to review. Sorry, 'processed' and 'drops' were used by the tracepoint that Alexei asked me to split into another (next patch). And I can see that I have renamed 'processed' to 'sent' in the next tracepoint patch, which makes reviewing even harder sorry. Those lines should have been moved to the tracepoint patch. My mistake when splitting up the patches. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer