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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Mar 2018 10:28:01 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     netdev@...r.kernel.org,
        BjörnTöpel <bjorn.topel@...el.com>,
        magnus.karlsson@...el.com, eugenia@...lanox.com,
        John Fastabend <john.fastabend@...il.com>,
        Eran Ben Elisha <eranbe@...lanox.com>,
        Saeed Mahameed <saeedm@...lanox.com>, galp@...lanox.com,
        Daniel Borkmann <borkmann@...earbox.net>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Tariq Toukan <tariqt@...lanox.com>
Subject: Re: [bpf-next V3 PATCH 00/15] XDP redirect memory return API



On 2018年03月19日 18:10, Jesper Dangaard Brouer wrote:
> On Fri, 16 Mar 2018 17:04:17 +0800
> Jason Wang <jasowang@...hat.com> wrote:
>
>> Looks like the series forget to register memory model for tun and
>> virtio-net.
> Well, no.  It is actually not strictly necessary to invoke
> xdp_rxq_info_reg_mem_model() because enum MEM_TYPE_PAGE_SHARED == 0.
> And if not passing an allocator pointer to the call, then an mem_id is
> not registered... and __xdp_return_frame() skips the rhashtable_lookup.

I see.

>
> I designed the API this way, because I want to support later adding an
> allocator even for the refcnt scheme MEM_TYPE_PAGE_SHARED.  (As it
> would be a performance optimization to return the pages to the
> originating RX-CPU, and move the page refcnt dec back to that orig CPU).
>
> I did add an xdp_rxq_info_reg_mem_model() call to ixgbe, for human
> programmer "documentation" even-though it isn't strickly necessary.  I
> guess, I could add similar calls to tun and virtio_net, and then we
> avoid any implicit assumptions. And makes it more clear that
> XDP_REDIRECT support use the memory model return API.
>

Yes, please do it or add a comment somewhere.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ