Skip to content

Print drop reason from sk_skb_reason_drop. Catch up with kernel 6.11 changes#430

Merged
brb merged 1 commit intocilium:mainfrom
DanPartelly:skb_reason_drop
Oct 8, 2024
Merged

Print drop reason from sk_skb_reason_drop. Catch up with kernel 6.11 changes#430
brb merged 1 commit intocilium:mainfrom
DanPartelly:skb_reason_drop

Conversation

@DanPartelly
Copy link

This commit extracts a drop reason from sk_skb_reason_drop(), and prints it when sk_skb_drop_reason() is called.

This function was introduced in kernel v6.11-rc1. At the same time, kfree_skb_reason() became an inline helper which just calls sk_skb_reason_drop().
See: torvalds/linux@ba8de79

Summary of changes:

  • bpf: teach kprobe_skb() to capture the 3rd function argument in the event map
  • go: teach getKFreeSKBReasons() to cope with changes to kfree_skb_reason and introduction of sk_skb_reason_drop() in kernel
  • go: teach getOutFuncName() about sk_skb_reason_drop()

This commit extracts a drop reason from sk_skb_reason_drop(), and prints it when sk_skb_drop_reason() is called.

This function was introduced in kernel v6.11-rc1. At the same time, kfree_skb_reason()   became an inline helper which just calls  sk_skb_reason_drop().

See: torvalds/linux@ba8de79
@DanPartelly DanPartelly requested a review from a team as a code owner October 5, 2024 10:35
@DanPartelly DanPartelly requested review from brb and removed request for a team October 5, 2024 10:35
@DanPartelly DanPartelly changed the title Print drop reason from sk_skb_reason_drop. Catch up witk kernel 6.11 changes Print drop reason from sk_skb_reason_drop. Catch up with kernel 6.11 changes Oct 5, 2024
Copy link
Member

@brb brb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@brb brb merged commit 2ed349d into cilium:main Oct 8, 2024
@DanPartelly DanPartelly deleted the skb_reason_drop branch October 8, 2024 16:52
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.

2 participants