Thread (36 messages) 36 messages, 6 authors, 2016-11-03

Re: [PATCH net-next v2 0/5] bpf: BPF for lightweight tunnel encapsulation

From: Thomas Graf <tgraf@suug.ch>
Date: 2016-11-02 22:54:46

On 1 November 2016 at 16:12, Hannes Frederic Sowa
[off-list ref] wrote:
On 01.11.2016 21:59, Thomas Graf wrote:
quoted
quoted
Dumping and verifying which routes get used might actually already be
quite complex on its own. Thus my fear.
We even have an API to query which route is used for a tuple. What
else would you like to see?
I am not sure here. Some ideas I had were to allow tcpdump (pf_packet)
sockets sniff at interfaces and also gather and dump the metadata to
user space (this would depend on bpf programs only doing the
modifications in metadata and not in the actual packet).
Not sure I understand. Why does this depend on BPF?
Or maybe just tracing support (without depending on the eBPF program
developer to have added debugging in the BPF program).
Absolutely in favour of that.
quoted
This will be addressed with signing AFAIK.
This sounds a bit unrealistic. Signing lots of small programs can be a
huge burden to the entity doing the signing (if it is not on the same
computer). And as far as I understood the programs should be generated
dynamically?
Right, for generated programs, a hash is a better fit and still sufficient.
quoted
Would it help if we allow to store the original source used for
bytecode generation. What would make it clear which program was used.
I would also be fine with just a strong hash of the bytecode, so the
program can be identified accurately. Maybe helps with deduplication
later on, too. ;)
OK, I think we all already agreed on doing this.
Even though I read through the patchset I am not absolutely sure which
problem it really solves. Especially because lots of things can be done
already at the ingress vs. egress interface (I looked at patch 4 but I
am not sure how realistic they are).
Filtering at egress requires to attach the BPF program to all
potential outgoing interface and then pass every single packet through
the program whereas with LWT BPF, I'm only taking the cost where
actually needed.
quoted
I also don't see how this could possibly scale if all packets must go
through a single BPF program. The overhead will be tremendous if you
only want to filter a couple of prefixes.
In case of hash table lookup it should be fast. llvm will probably also
generate jump table for a few 100 ip addresses, no? Additionally the
routing table lookup could be not done at all.
Why would I want to accept the overhead if I simply avoid it? Just
parsing the header and doing the hash lookup will add cost, cost for
each packet.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help