Right. However, if a VM is using SR-IOV which connects the VM directly to the NIC, the kernel is bypassed. Since sending my email, I also found a packet filter in golang:
https://godoc.org/golang.org/x/net/bpf I have tested the above code yet. Thanks, Hemant On Thursday, October 4, 2018 at 12:22:11 AM UTC-4, Tamás Gulácsi wrote: > > If your metering runs in the same (virtual) machine as the metered > processes, the kernel sees the packets, so ebpf is the fastest. > > If you run in different machines, or the virtualization skips the host, > then you cannot catch the packets. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.