[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 8 Aug 2019 12:21:06 -0500
From: Zvi Effron <zeffron@...tgames.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: Xdp <xdp-newbies@...r.kernel.org>,
Anton Protopopov <a.s.protopopov@...il.com>, dsahern@...il.com,
Toke Høiland-Jørgensen <toke@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [bpf-next PATCH 0/3] bpf: improvements to xdp_fwd sample
On Thu, Aug 8, 2019 at 4:30 AM Jesper Dangaard Brouer <brouer@...hat.com> wrote:
>
> Another improvement from Toke, is that the bpf_redirect_map() helper,
> now also check if the redirect index is valid in the map. If not, then
> it returns another value than XDP_REDIRECT. You can choose the
> alternative return value yourself, via "flags" e.g. XDP_PASS. Thus,
> you don't even need to check/validate devmap in your BPF-code, as it is
> part of the bpf_redirect_map() call now.
>
> action = bpf_redirect_map(&map, &index, flags_as_xdp_value)
>
> The default flags used in most programs today is 0, which maps to
> XDP_ABORTED. This is sort of a small UAPI change, but for the better.
> As today, the packet is dropped later, only diagnose/seen via
> tracepoint xdp:xdp_redirect_map_err.
>
That's great to hear, as I'd thought it already worked that way (minus
the flags to specify what the alternate action is).
Thanks for explaining!
--Zvi
Powered by blists - more mailing lists