[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87355nnsdb.fsf@toke.dk>
Date: Wed, 29 Mar 2023 23:46:08 +0200
From: Toke Høiland-Jørgensen <toke@...hat.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>, bpf@...r.kernel.org,
Stanislav Fomichev <sdf@...gle.com>
Cc: Jesper Dangaard Brouer <brouer@...hat.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, martin.lau@...nel.org,
ast@...nel.org, daniel@...earbox.net, alexandr.lobakin@...el.com,
larysa.zaremba@...el.com, xdp-hints@...-project.net,
anthony.l.nguyen@...el.com, yoong.siang.song@...el.com,
boon.leong.ong@...el.com, intel-wired-lan@...ts.osuosl.org,
pabeni@...hat.com, jesse.brandeburg@...el.com, kuba@...nel.org,
edumazet@...gle.com, john.fastabend@...il.com, hawk@...nel.org,
davem@...emloft.net
Subject: Re: [xdp-hints] [PATCH bpf RFC-V2 1/5] xdp: rss hash types
representation
Jesper Dangaard Brouer <brouer@...hat.com> writes:
> diff --git a/net/core/xdp.c b/net/core/xdp.c
> index 7133017bcd74..81d41df30695 100644
> --- a/net/core/xdp.c
> +++ b/net/core/xdp.c
> @@ -721,12 +721,14 @@ __bpf_kfunc int bpf_xdp_metadata_rx_timestamp(const struct xdp_md *ctx, u64 *tim
> * @hash: Return value pointer.
> *
> * Return:
> - * * Returns 0 on success or ``-errno`` on error.
> + * * Returns (positive) RSS hash **type** on success or ``-errno`` on error.
This change is going to break any BPF program that does:
if (!bpf_xdp_metadata_rx_hash(ctx, &hash))
/* do something with hash */
so I think adding a second argument is better; that way, at least
breakage will be explicit instead of being a hidden change in semantics
(and the CO-RE style checking for kfuncs Alexei introduced should
trigger correctly).
But really, what we should do anyway is merge this during the -rc phase
to minimise any breakage :)
-Toke
Powered by blists - more mailing lists