Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys: small cleanups #1154

Merged
merged 3 commits into from
Oct 5, 2023
Merged

sys: small cleanups #1154

merged 3 commits into from
Oct 5, 2023

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Oct 5, 2023

Makefile: fix generate-btf

My recent changes to the kernel packaging format broke the generate-btf 
target. Fix the invocation to work against current builds.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

internal/cmd/gentypes: print more helpful error when patch fails

Output the struct being patched just before showing the patch error. This
makes it easier to figure out how the patch went wrong. Example output:

  struct BtfInfo
   Struct:"bpf_btf_info"[fields=6]
     "btf" Int[unsigned size=64]
     "btf_size" Typedef:"__u32"[Int:"unsigned int"]
     "id" Typedef:"__u32"[Int:"unsigned int"]
     "name" Int[unsigned size=64]
     "name_len" Typedef:"__u32"[Int:"unsigned int"]
     "kernel_btf" Typedef:"__u32"[Int:"unsigned int"]
 Error: output "BtfInfo": patch 1: missing members: frood

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

sys: make ENOTSUPP a constant

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

My recent changes to the kernel packaging format broke the generate-btf
target. Fix the invocation to work against current builds.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Output the struct being patched just before showing the patch error.
This makes it easier to figure out how the patch went wrong.
Example output:

  struct BtfInfo
    Struct:"bpf_btf_info"[fields=6]
      "btf" Int[unsigned size=64]
      "btf_size" Typedef:"__u32"[Int:"unsigned int"]
      "id" Typedef:"__u32"[Int:"unsigned int"]
      "name" Int[unsigned size=64]
      "name_len" Typedef:"__u32"[Int:"unsigned int"]
      "kernel_btf" Typedef:"__u32"[Int:"unsigned int"]
  Error: output "BtfInfo": patch 1: missing members: frood

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb merged commit 9feeb26 into cilium:main Oct 5, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant