Hi,

I want to modify packet and broadcast/multicast to different ports.
One way is that at tc ingress, attach a single eBPF program and call
multiple "bpf_skb_clone_redirect()". For example:
set_mac1, clone_redirect(1), set_mac2, inc_ttl, clone_redirect(2),
set_mac3, clone_redirect(3), ...

Sometimes the packet modification part, ex: set_mac1, is huge and
instead of doing them sequentially, I want to make it parallel.
So I attach another eBPF program to tc egress, and at the original tc
ingress eBPF, I simply call multiple clone_redirect() to the
corresponding tc egress, and execute the modification (set_mac,
inc_ttl) at tc egress BPF, hoping that different CPUs could pick up
different egress eBPF to execute the packet modification and balance
the load.

so my new tc ingress becomes:
clone_redirect(1), clone_redirect(2), clone_redirect(3),

tc egress at port1:
set_mac1, return TC_ACT_OK
tc egress at port2:
set_mac2, inc_ttl, return TC_ACT_OK

Does this make sense? Or is there any better solution? Thanks!
William
_______________________________________________
iovisor-dev mailing list
iovisor-dev@lists.iovisor.org
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to