microsoft / retina

eBPF distributed networking observability tool for Kubernetes
https://retina.sh
MIT License
2.68k stars 194 forks source link

feat: enhance drop reason by using free_skb_reason() #367

Open anubhabMajumdar opened 4 months ago

anubhabMajumdar commented 4 months ago

Linux kernel 5.17 includes a new function call free_skb_reason to provide better visibility into why a packet was dropped in the n/w stack. Here are all the drop reasons added - https://elixir.bootlin.com/linux/v5.15.158/source/include/linux/skbuff.h#L314 .

Use the new kernel function to enhance our drop reason plugin to be more verbose and accurate.

rbtr commented 4 months ago

Is this available via CORE on older kernel versions? @timraymond determined our current minimum required kernel version is 5.4 making this a breaking change.

rectified95 commented 3 months ago

v5.17 has only 5 reasons: https://elixir.bootlin.com/linux/v5.17.15/source/include/linux/skbuff.h We should probably go for 5.18 which has about 40 of them: https://elixir.bootlin.com/linux/v5.18/source/include/linux/skbuff.h#L316