Re: [PATCH] bpf: Use E2BIG instead of ENOENT

From: Tao Chen
Date: Mon Nov 06 2023 - 11:13:21 EST



Hi, Alexei, the delete element api of stackmap return E2BIG when the key size beyond the buckets size, so i try to keep the same approach. Maybe it's not necessary, anyway, thanks for your reply.

在 2023/11/6 下午11:59, Tao Chen 写道:


---------- Forwarded message ---------
发件人: *Alexei Starovoitov* <alexei.starovoitov@xxxxxxxxx <mailto:alexei.starovoitov@xxxxxxxxx>>
Date: 2023年11月5日周日 04:54
Subject: Re: [PATCH] bpf: Use E2BIG instead of ENOENT
To: Tao Chen <chen.dylane@xxxxxxxxx <mailto:chen.dylane@xxxxxxxxx>>
Cc: Song Liu <song@xxxxxxxxxx <mailto:song@xxxxxxxxxx>>, Jiri Olsa <jolsa@xxxxxxxxxx <mailto:jolsa@xxxxxxxxxx>>, Alexei Starovoitov <ast@xxxxxxxxxx <mailto:ast@xxxxxxxxxx>>, Daniel Borkmann <daniel@xxxxxxxxxxxxx <mailto:daniel@xxxxxxxxxxxxx>>, Andrii Nakryiko <andrii@xxxxxxxxxx <mailto:andrii@xxxxxxxxxx>>, Yonghong Song <yonghong.song@xxxxxxxxx <mailto:yonghong.song@xxxxxxxxx>>, Martin KaFai Lau <martin.lau@xxxxxxxxx <mailto:martin.lau@xxxxxxxxx>>, John Fastabend <john.fastabend@xxxxxxxxx <mailto:john.fastabend@xxxxxxxxx>>, Hao Luo <haoluo@xxxxxxxxxx <mailto:haoluo@xxxxxxxxxx>>, bpf <bpf@xxxxxxxxxxxxxxx <mailto:bpf@xxxxxxxxxxxxxxx>>, LKML <linux-kernel@xxxxxxxxxxxxxxx <mailto:linux-kernel@xxxxxxxxxxxxxxx>>


On Fri, Nov 3, 2023 at 7:44 PM Tao Chen <chen.dylane@xxxxxxxxx <mailto:chen.dylane@xxxxxxxxx>> wrote:
>
> Use E2BIG instead of ENOENT when the key size beyond the buckets size,
> it seems more meaningful.

seems more meaningful?
Sorry. That's hardly a reason to break someone's code.