If you're interested in the latter technique (hitting the HW directly from userspace), take a look at https://www.dpdk.org/. That's the framework that 95% of things that do that use (number pulled directly out of my rear end).
I hope, by "you", you mean the rest of us journeymen and not this tptacek [0]
[0] https://fly.io/blog/bpf-xdp-packet-filters-and-udp/ / https://archive.md/TVIyy