[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20130320.131622.87230078711098980.davem@davemloft.net>
Date: Wed, 20 Mar 2013 13:16:22 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: dborkman@...hat.com
Cc: netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH v3 net-next 3/4] filter: add ANC_PAY_OFFSET instruction
for loading payload start offset
From: Daniel Borkmann <dborkman@...hat.com>
Date: Tue, 19 Mar 2013 17:39:31 +0100
> It is very useful to do dynamic truncation of packets. In particular,
> we're interested to push the necessary header bytes to the user space and
> cut off user payload that should probably not be transferred for some reasons
> (e.g. privacy, speed, or others). With the ancillary extension PAY_OFFSET,
> we can load it into the accumulator, and return it. E.g. in bpfc syntax ...
>
> ld #poff ; { 0x20, 0, 0, 0xfffff034 },
> ret a ; { 0x16, 0, 0, 0x00000000 },
>
> ... as a filter will accomplish this without having to do a big hackery in
> a BPF filter itself. Follow-up JIT implementations are welcome.
>
> Thanks to Eric Dumazet for suggesting and discussing this during the
> Netfilter Workshop in Copenhagen.
>
> Suggested-by: Eric Dumazet <edumazet@...gle.com>
> Signed-off-by: Daniel Borkmann <dborkman@...hat.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists