On 2018年01月10日 23:34, Ophir Munk wrote:
I agree that classifying directly through eBPF using socket filter is easier 
than building a set of rules in TC, however there are more concerns that 
justify using eBPF with TC.
1. An RSS rule can come in the middle of non-RSS rules. It seems natural to 
have it as part of TC. How do I know if a packet needs to be treated with RSS 
or not? (there may be a higher priority rule that sends the packet to a 
specific queue regardless of RSS).

Well this could be done through eBPF too, just check the high priority rule before before indirection table should be ok.

Btw, want to review the code, but the bpf byte code is rather hard to review unless you add some comments.

2. BPF complexity comes mainly in writing BPF programs, compiling them and 
sending BPF instructions to the kernel. In both mechanisms (socket filter or 
TC) this complexity is the same.

Yes, I agree. But using socket filter can make it work for e.g macvtap (though not implemented) or even a vhost-user backend which tc-bpf won't work.


Please let me have your feedback.

I don't object the method, it looks rather interesting (I'm planing to implement RSS emulation in qemu through TAP eBPF socket filter, your patch is a very good reference for me).

Thanks

Reply via email to