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  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 8 Apr 2020 14:56:14 +0000
From:   Haiyang Zhang <haiyangz@...rosoft.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>,
        "sameehj@...zon.com" <sameehj@...zon.com>
CC:     Wei Liu <wei.liu@...nel.org>, KY Srinivasan <kys@...rosoft.com>,
        Stephen Hemminger <sthemmin@...rosoft.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "bpf@...r.kernel.org" <bpf@...r.kernel.org>,
        "zorik@...zon.com" <zorik@...zon.com>,
        "akiyano@...zon.com" <akiyano@...zon.com>,
        "gtzalik@...zon.com" <gtzalik@...zon.com>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        John Fastabend <john.fastabend@...il.com>,
        Alexander Duyck <alexander.duyck@...il.com>,
        Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
        David Ahern <dsahern@...il.com>,
        Willem de Bruijn <willemdebruijn.kernel@...il.com>,
        Ilias Apalodimas <ilias.apalodimas@...aro.org>,
        Lorenzo Bianconi <lorenzo@...nel.org>,
        Saeed Mahameed <saeedm@...lanox.com>
Subject: RE: [PATCH RFC v2 12/33] hv_netvsc: add XDP frame size to driver



> -----Original Message-----
> From: Jesper Dangaard Brouer <brouer@...hat.com>
> Sent: Wednesday, April 8, 2020 7:52 AM
> To: sameehj@...zon.com
> Cc: Wei Liu <wei.liu@...nel.org>; KY Srinivasan <kys@...rosoft.com>;
> Haiyang Zhang <haiyangz@...rosoft.com>; Stephen Hemminger
> <sthemmin@...rosoft.com>; Jesper Dangaard Brouer
> <brouer@...hat.com>; netdev@...r.kernel.org; bpf@...r.kernel.org;
> zorik@...zon.com; akiyano@...zon.com; gtzalik@...zon.com; Toke
> Høiland-Jørgensen <toke@...hat.com>; Daniel Borkmann
> <borkmann@...earbox.net>; Alexei Starovoitov
> <alexei.starovoitov@...il.com>; John Fastabend
> <john.fastabend@...il.com>; Alexander Duyck
> <alexander.duyck@...il.com>; Jeff Kirsher <jeffrey.t.kirsher@...el.com>;
> David Ahern <dsahern@...il.com>; Willem de Bruijn
> <willemdebruijn.kernel@...il.com>; Ilias Apalodimas
> <ilias.apalodimas@...aro.org>; Lorenzo Bianconi <lorenzo@...nel.org>;
> Saeed Mahameed <saeedm@...lanox.com>
> Subject: [PATCH RFC v2 12/33] hv_netvsc: add XDP frame size to driver
> 
> The hyperv NIC drivers XDP implementation is rather disappointing as it
> will be a slowdown to enable XDP on this driver, given it will allocate a
> new page for each packet and copy over the payload, before invoking the
> XDP BPF-prog.

As explained when I submit the XDP support for hv_netvsc -- without XDP, 
this driver already allocates memory and does a copy for every packet. So 
the page allocation for XDP data buf is not slower than the existing code 
path. Also, an optimization that only allocates a PAGE once, and re-uses it 
in a NAPI cycle will be done.

And, my XDP implementation for hv_netvsc transparently passes xdp_prog 
to the associated VF NIC. Many of the Azure VMs are using SRIOV, so 
majority of the data are actually processed directly on the VF driver's XDP 
path. So the overhead of the synthetic data path (hv_netvsc) is minimal.

Thanks,
- Haiyang

Powered by blists - more mailing lists