[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <39fc3e35-49c6-3d47-e3fc-809f41998362@gmail.com>
Date: Wed, 27 May 2020 08:02:00 -0600
From: David Ahern <dsahern@...il.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>,
David Ahern <dsahern@...nel.org>, netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, brouer@...hat.com,
daniel@...earbox.net, john.fastabend@...il.com, ast@...nel.org,
kafai@...com, songliubraving@...com, yhs@...com, andriin@...com
Subject: Re: [PATCH bpf-next 2/5] bpf: Add support to attach bpf program to a
devmap entry
On 5/27/20 4:01 AM, Toke Høiland-Jørgensen wrote:
> Did you give any special consideration to where the hook should be? I'm
> asking because my immediate thought was that it should be on flush
> (i.e., in bq_xmit_all()), but now that I see this I'm so sure anymore.
> What were your thoughts around this?
I chose this spot for many reasons:
1. dev_map_enqueue has the bpf_dtab_netdev structure which holds the program
2. programs take xdp_buff, and dev_map_enqueue still has the xdp_buff
with the rx information; no need to convert from buff to frame losing rx
data, enqueue, back to buff to run program, back to frame to hand off to
the driver.
3. no sense enqueuing if the device program drops the frame.
Powered by blists - more mailing lists