Maxim Razin
Maxim Razin

Reputation: 9466

Split a packet in XDP eBPF

Is it possible to generate several packets out of one incoming packet in XDP eBPF? Or probably there are other kernel based solutions?

Upvotes: 1

Views: 949

Answers (1)

Dylan Reimerink
Dylan Reimerink

Reputation: 7968

No, XDP programs are as of now, one packet in, one packet out (or drop). At the TC layer you do have access to the bpf_clone_redirect helper function which as the name suggest can send a close of the current packet to a given network interface, after which you can modify the current packet.

Another common technique to called "port mirroring" typically used for monitoring traffic for a number of purposes. Which can also be setup in plain TC without eBPF:

Upvotes: 2

Related Questions