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]
Date:   Thu, 31 May 2018 09:49:02 +0200
From:   Jesper Dangaard Brouer <brouer@...hat.com>
To:     Song Liu <liu.song.a23@...il.com>
Cc:     Networking <netdev@...r.kernel.org>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        John Fastabend <john.fastabend@...il.com>,
        makita.toshiaki@....ntt.co.jp, brouer@...hat.com
Subject: Re: [bpf-next V1 PATCH 8/8] bpf/xdp: devmap can avoid calling
 ndo_xdp_flush

On Wed, 30 May 2018 15:06:27 -0700
Song Liu <liu.song.a23@...il.com> wrote:

> > diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> > index 04fbd75a5274..9c846a7a8cff 100644
> > --- a/kernel/bpf/devmap.c
> > +++ b/kernel/bpf/devmap.c
> > @@ -217,7 +217,7 @@ 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)
> > +                      struct xdp_bulk_queue *bq, bool flush)  
> 
> How about we use "int flags" instead of "bool flush" for easier extension?

This is an internal function in devmap.c, so we can change it
completely as we like.   But I do see your point, and will change this
to match the flags type of ndo_xdp_xmit, because that allows us to pass
this directly to that function without any conditional statements
(although I was expecting to compiler to optimized this out anyway).

-- 
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