[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <19ae0adc-3f53-9b80-49bc-192b8643dda1@iogearbox.net>
Date: Fri, 13 Jul 2018 15:38:22 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Magnus Karlsson <magnus.karlsson@...el.com>, bjorn.topel@...el.com,
ast@...com, netdev@...r.kernel.org, eric.dumazet@...il.com
Cc: qi.z.zhang@...el.com, pavel@...tnetmon.com
Subject: Re: [PATCH bpf 0/4] Consistent sendmsg error reporting in AF_XDP
On 07/11/2018 10:12 AM, Magnus Karlsson wrote:
> This patch set adjusts the AF_XDP TX error reporting so that it becomes
> consistent between copy mode and zero-copy. First some background:
>
> Copy-mode for TX uses the SKB path in which the action of sending the
> packet is performed from process context using the sendmsg
> syscall. Completions are usually done asynchronously from NAPI mode by
> using a TX interrupt. In this mode, send errors can be returned back
> through the syscall.
>
> In zero-copy mode both the sending of the packet and the completions
> are done asynchronously from NAPI mode for performance reasons. In
> this mode, the sendmsg syscall only makes sure that the TX NAPI loop
> will be run that performs both the actions of sending and
> completing. In this mode it is therefore not possible to return errors
> through the sendmsg syscall as the sending is done from the NAPI
> loop. Note that it is possible to implement a synchronous send with
> our API, but in our benchmarks that made the TX performance drop by
> nearly half due to synchronization requirements and cache line
> bouncing. But for some netdevs this might be preferable so let us
> leave it up to the implementation to decide.
>
> The problem is that the current code base returns some errors in
> copy-mode that are not possible to return in zero-copy mode. This
> patch set aligns them so that the two modes always return the same
> error code. We achieve this by removing some of the errors returned by
> sendmsg in copy-mode (and in one case adding an error message for
> zero-copy mode) and offering alternative error detection methods that
> are consistent between the two modes.
Looks good, applied to bpf, thanks Magnus!
Powered by blists - more mailing lists