Lets say I have a linux machine that has an infinite amount of packets coming in in one interface. I've opened a raw socket and set a bpf filter that none of the packets go through.
Now for every packet the kernel receives it runs the bpf bytecode and filters out the data.
How do I see the CPU usage that's taken by the kernel? Is it counted as time my process spends? Or somewhere else? Would I see this using top?
Thanks