[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQKNGMiwmodP=6MVFD8OtbQj+OGUmigVYrGDQQ6gi0VODA@mail.gmail.com>
Date: Tue, 27 Jun 2023 16:50:29 -0700
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: John Fastabend <john.fastabend@...il.com>
Cc: Stanislav Fomichev <sdf@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Donald Hunter <donald.hunter@...il.com>, bpf <bpf@...r.kernel.org>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>, Song Liu <song@...nel.org>,
Yonghong Song <yhs@...com>, KP Singh <kpsingh@...nel.org>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Network Development <netdev@...r.kernel.org>
Subject: Re: [RFC bpf-next v2 11/11] net/mlx5e: Support TX timestamp metadata
On Tue, Jun 27, 2023 at 4:33 PM John Fastabend <john.fastabend@...il.com> wrote:
>
> Yeah I think so and then carry a couple different object files
> for the environment around. We do this already for some things.
> Its not ideal but it works. I think a good end goal would be
>
> int bpf_devtx_request_timestamp(...)
> {
> set_ts = dlsym( dl_handle, request-timestamp);
> return set_ts(...)
> }
>
> Then we could at attach time take that dlsym and rewrite it.
Sounds like we need polymorphic kfuncs.
Same kfunc name called by bpf prog, but implementation would
change depending on {attach_btf_id, prog_type, etc}.
The existing bpf_xdp_metadata_rx_hash is almost that.
Except it's driver specific.
We should probably generalize this mechanism.
Powered by blists - more mailing lists