lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180523170453.0824ca1a@redhat.com>
Date:   Wed, 23 May 2018 17:04:53 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     netdev@...r.kernel.org, Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Christoph Hellwig <hch@...radead.org>,
        BjörnTöpel <bjorn.topel@...el.com>,
        Magnus Karlsson <magnus.karlsson@...el.com>,
        makita.toshiaki@....ntt.co.jp, brouer@...hat.com
Subject: Re: [bpf-next V4 PATCH 3/8] xdp: add tracepoint for devmap like
 cpumap have

On Wed, 23 May 2018 07:24:03 -0700
John Fastabend <john.fastabend@...il.com> wrote:

> > @@ -219,8 +221,8 @@ void __dev_map_insert_ctx(struct bpf_map *map, u32 bit)
> >  static int bq_xmit_all(struct bpf_dtab_netdev *obj,
> >  			 struct xdp_bulk_queue *bq)
> >  {
> > -	unsigned int processed = 0, drops = 0;
> >  	struct net_device *dev = obj->dev;
> > +	int sent = 0, drops = 0;
> >  	int i;
> >  
> >  	if (unlikely(!bq->count))
> > @@ -241,10 +243,13 @@ static int bq_xmit_all(struct bpf_dtab_netdev *obj,
> >  			drops++;
> >  			xdp_return_frame(xdpf);
> >  		}
> > -		processed++;
> > +		sent++;  
> 
> Do 'dropped' frames also get counted as 'sent' frames? This seems a bit
> counter-intuitive to me. Should it be 'drops+sent = total frames'
> instead?

Again, sorry for mixing this up when spliting up the patch.  The
patchset does end up with: 'drops+sent = total frames'.  (The
"processed" counter is a copy-paste of code from cpumap, which have
another semantics).  I'll clean it up in V5, to help reviewers.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ