mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bot+bpf-ci@kernel.org
To: mahe.tardy@gmail.com,bpf@vger.kernel.org
Cc: qmo@kernel.org,ast@kernel.org,daniel@iogearbox.net,andrii@kernel.org,eddyz87@gmail.com,memxor@gmail.com,martin.lau@linux.dev,song@kernel.org,yonghong.song@linux.dev,jolsa@kernel.org,emil@etsalapatis.com,ihor.solodrai@linux.dev,shuah@kernel.org,mahe.tardy@gmail.com,hi@tychen.cc,gyutae.bae@navercorp.com,sh_def@163.com,josef@toxicpanda.com,linux-kernel@vger.kernel.org,linux-kselftest@vger.kernel.org,ast@kernel.org,andrii@kernel.org,daniel@iogearbox.net,martin.lau@kernel.org,eddyz87@gmail.com,yonghong.song@linux.dev,mason@kernel.org,ihor.solodrai@linux.dev
Subject: Re: [PATCH bpf-next v3 4/5] bpftool: Add attach option for light skeleton generation
Date: Mon,  2 Nov 2026 20:56:11 +0000 (UTC)	[thread overview]
Message-ID: <d6f3b8857bc4575bf2467f95f84ffe8475e2009bb43932644ea0dda53a561827@mail.kernel.org> (raw)
In-Reply-To: <20261102201356.5798-5-mahe.tardy@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1954 bytes --]

> bpftool: Add attach option for light skeleton generation

TL;DR: bpftool bash completion for "gen skeleton" may offer "attach" as the
object name after "name <TAB>", since there is no name case before the
catch-all branch. Minor completion bug.

> diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool
> index a28af31937ad..9247a9fdcaef 100644
> --- a/tools/bpf/bpftool/bash-completion/bpftool
> +++ b/tools/bpf/bpftool/bash-completion/bpftool
> @@ -1021,7 +1021,7 @@ _bpftool()
>                              return 0
>                              ;;
>                          *)
> -                            _bpftool_once_attr 'name'
> +                            _bpftool_once_attr 'name attach'
>                              return 0
>                              ;;
>                      esac

Does this completion offer "attach" as the object name?

The skeleton branch of _bpftool() has no case for prev == name, so when the
cursor is on the OBJECT_NAME value it falls into the catch-all *) branch and
runs _bpftool_once_attr 'name attach'.  The 'name' keyword is skipped because
it is already on the line, but 'attach' is not.

So "bpftool gen skeleton prog.o name <TAB>" now offers "attach", and
"name a<TAB>" completes to "name attach".  That sets the object name to
"attach" and does not request loader attachment.  Before this change,
_bpftool_once_attr 'name' offered nothing in that position.

Other value-taking keywords in this file are handled explicitly, for example
the 'map create' branch has a name) case that returns 0.  Would adding a
name) case that does "return 0" ahead of the *) branch for skeleton restore
the previous behaviour?


---
AI reviewed your patch. Please fix the bug or email reply why it's not a bug.
See: https://github.com/kernel-patches/vmtest/blob/master/ci/claude/README.md

CI run summary: https://github.com/kernel-patches/bpf/actions/runs/41519963115

  reply	other threads:[~2026-11-02 20:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-02 20:13 [PATCH bpf-next v3 0/5] libbpf: Support gen loader attach Mahe Tardy
2026-11-02 20:13 ` [PATCH bpf-next v3 1/5] libbpf: Count entry programs for bpf_gen__init() Mahe Tardy
2026-11-02 20:45   ` bot+bpf-ci
2026-11-02 20:13 ` [PATCH bpf-next v3 2/5] libbpf: Track generated loader link FDs Mahe Tardy
2026-11-02 20:13 ` [PATCH bpf-next v3 3/5] libbpf: Emit BPF_LINK_CREATE calls in generated loaders Mahe Tardy
2026-11-02 20:13 ` [PATCH bpf-next v3 4/5] bpftool: Add attach option for light skeleton generation Mahe Tardy
2026-11-02 20:56   ` bot+bpf-ci [this message]
2026-11-02 20:13 ` [PATCH bpf-next v3 5/5] selftests/bpf: Test gen loader attach Mahe Tardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d6f3b8857bc4575bf2467f95f84ffe8475e2009bb43932644ea0dda53a561827@mail.kernel.org \
    --to=bot+bpf-ci@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=emil@etsalapatis.com \
    --cc=gyutae.bae@navercorp.com \
    --cc=hi@tychen.cc \
    --cc=ihor.solodrai@linux.dev \
    --cc=jolsa@kernel.org \
    --cc=josef@toxicpanda.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=mahe.tardy@gmail.com \
    --cc=martin.lau@kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=mason@kernel.org \
    --cc=memxor@gmail.com \
    --cc=qmo@kernel.org \
    --cc=sh_def@163.com \
    --cc=shuah@kernel.org \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®