[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <07db58dd-0752-e148-8d89-e22b8d7769f0@linux.dev>
Date: Wed, 30 Nov 2022 16:16:00 -0800
From: Martin KaFai Lau <martin.lau@...ux.dev>
To: Stanislav Fomichev <sdf@...gle.com>
Cc: bpf@...r.kernel.org, ast@...nel.org, daniel@...earbox.net,
andrii@...nel.org, song@...nel.org, yhs@...com,
john.fastabend@...il.com, kpsingh@...nel.org, haoluo@...gle.com,
jolsa@...nel.org, David Ahern <dsahern@...il.com>,
Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemb@...gle.com>,
Jesper Dangaard Brouer <brouer@...hat.com>,
Anatoly Burakov <anatoly.burakov@...el.com>,
Alexander Lobakin <alexandr.lobakin@...el.com>,
Magnus Karlsson <magnus.karlsson@...il.com>,
Maryam Tahhan <mtahhan@...hat.com>, xdp-hints@...-project.net,
netdev@...r.kernel.org,
Toke Høiland-Jørgensen <toke@...hat.com>
Subject: Re: [xdp-hints] Re: [PATCH bpf-next v3 00/11] xdp: hints via kfuncs
On 11/30/22 3:01 PM, Toke Høiland-Jørgensen wrote:
>> It feels like beyond that extra dev_put, we'd need to reset our
>> aux->xdp_netdev and/or add some flag or something else to indicate
>> that this bpf program is "orphaned" and can't be attached anywhere
>> anymore (since the device is gone; netdev_run_todo should free the
>> netdev it seems).
imo, orphan the prog and not able to attach again is ok. Finding the next
compatible netdev would be nice but not a must to begin with. Regardless, it
needs a bpf_prog<->netdev decoupling approach which allows to unregister netdev
gracefully instead of getting the "unregister_netdevice: waiting for xyz to
become free...".
fwiw, offload.c has solved a similar problem and it keeps its own list of prog
depending on a particular netdev. Whatever approach makes more sense here.
Ideally, other non-NIC HW kfunc can reuse a similar approach in the future.
Powered by blists - more mailing lists