Re: [PATCH bpf-next v2] bpftool: Check argc first before "file" in do_batch()

From: Quentin Monnet
Date: Tue Nov 15 2022 - 15:19:33 EST


On Tue, 15 Nov 2022 at 18:42, <sdf@xxxxxxxxxx> wrote:
>
> On 11/15, Tiezhu Yang wrote:
> > If the parameters for batch are more than 2, check argc first can
> > return immediately, no need to use is_prefix() to check "file" with
> > a little overhead and then check argc, it is better to check "file"
> > only when the parameters for batch are 2.
>
> > Signed-off-by: Tiezhu Yang <yangtiezhu@xxxxxxxxxxx>
>
> Acked-by: Stanislav Fomichev <sdf@xxxxxxxxxx>

Reviewed-by: Quentin Monnet <quentin@xxxxxxxxxxxxx>

Thanks