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] [day] [month] [year] [list]
Date:   Tue, 27 Feb 2018 10:28:58 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     "Michael S. Tsirkin" <mst@...hat.com>,
        Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     netdev@...r.kernel.org, John Fastabend <john.fastabend@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Saeed Mahameed <saeedm@...lanox.com>,
        Daniel Borkmann <borkmann@...earbox.net>,
        "David S. Miller" <davem@...emloft.net>,
        Tariq Toukan <tariqt@...lanox.com>
Subject: Re: [net PATCH 1/4] virtio_net: disable XDP_REDIRECT in
 receive_mergeable() case



On 2018年02月27日 10:25, Jason Wang wrote:
>
>
> On 2018年02月27日 08:40, Michael S. Tsirkin wrote:
>>> IMHO we should consider NOT supporting XDP in receive_mergeable() at
>>> all, because the principles behind XDP are to gain speed by (1) code
>>> simplicity, (2) sacrificing memory and (3) where possible moving
>>> runtime checks to setup time.  These principles are clearly being
>>> violated in receive_mergeable(), that e.g. runtime track average
>>> buffer size to save memory consumption.
>>>
>>> In the longer run, we should consider introducing a separate receive
>>> function when attaching an XDP program, and also change the memory
>>> model to be compatible with XDP when attaching an XDP prog.
>> I agree with a separate function approach.
>>
>> So each buffer is tagged as xdp/non xdp, we check that
>> and handle appropriately - where non xdp could be handled
>> by the generic path.
>
> If we want to have separated function, should we do it for all XDP 
> capable drivers instead of virtio-net only?
>
> Thanks
>

What's more, since we don't stop device during XDP set. Even if a buffer 
is tagged as xdp/non xdp during refill, we still can't make sure whether 
or not XDP was used at receive function. So we can not handle them 
separately.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ