Thread (47 messages) 47 messages, 5 authors, 2014-06-27

Re: [PATCH net-next v2] net: filter: add insn for loading internal transport header offset

From: David Miller <davem@davemloft.net>
Date: 2014-05-02 21:49:30

From: Chema Gonzalez <redacted>
Date: Thu,  1 May 2014 11:44:40 -0700
Patch adds an ANC_TRA_OFFSET insn that loads the internal transport
header of a packet ("internal" meaning after decapsulation by the
flow dissector).

Signed-off-by: Chema Gonzalez <redacted>
I'm not so convinced of this change.

What are the use cases?

If the use cases are to simply pull the ports out of the transport
header for filter matching or hashing, don't just make a half-step
like this.

We can probably add an extension to AF_PACKET which provides the flow
key at the end of the tpacket3_hdr if a certain socket option is set.

That would provide the transport header as well as a side effect, and
be much more powerful and efficient than this particular BPF
instruction.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help