2018-04-27 19:16 GMT+02:00 Willem de Bruijn <[email protected]>:
> On Fri, Apr 27, 2018 at 8:17 AM, Björn Töpel <[email protected]> wrote:
>> From: Björn Töpel <[email protected]>
>>
>> This patch set introduces a new address family called AF_XDP that is
>> optimized for high performance packet processing and, in upcoming
>> patch sets, zero-copy semantics. In this v2 version, we have removed
>> all zero-copy related code in order to make it smaller, simpler and
>> hopefully more review friendly. This patch set only supports copy-mode
>> for the generic XDP path (XDP_SKB) for both RX and TX and copy-mode
>> for RX using the XDP_DRV path. Zero-copy support requires XDP and
>> driver changes that Jesper Dangaard Brouer is working on. Some of his
>> work has already been accepted. We will publish our zero-copy support
>> for RX and TX on top of his patch sets at a later point in time.
>
>> Changes from V1:
>>
>> * Fixes to bugs spotted by Will in his review
>> * Implemented the performance otimization to BPF_MAP_TYPE_XSKMAP
>>   suggested by Will
>
> An xsk may only exist in one map at a time. Is this somehow assured?
>

Actually this is *not* the case. An xsk may reside in many maps, and
multiple times in the same map. So it's not assured at all. :-)

The restriction for an xsk is per netdev/queue/umem (and) the napi
context guarantee the SPSC constraint.

For the record, your XSKMAP suggestion gave ~100kpps in the ingress
path! Very nice!

>> * Refactored packet_direct_xmit to become a common function
>>   in core/dev.c as suggested by Will
>> * Added documentation as suggested by Jesper
>> * Proper page unpinning as suggested by MST
>> * Some minor code cleanups
>
> Everything else looks great to me. If the above is correct (or corrected)
>
> Acked-by: Willem de Bruijn <[email protected]>
>

Thanks for the in-depth review, Will! Very much appreciated! (bow)


Björn

> I did not read everything again, but applied both patchsets on top of
> bpf-next to do a diff of diffs. In case others find it useful:
>
>   https://github.com/wdebruij/linux/tree/bpf-next-afxdp-v1
>   https://github.com/wdebruij/linux/tree/bpf-next-afxdp-v2

Reply via email to