Re: [PATCH net-next] x86: bpf_jit_comp: add pkt_type support
From: David Miller <davem@davemloft.net>
Date: 2013-01-31 03:39:11
From: David Miller <davem@davemloft.net>
Date: 2013-01-31 03:39:11
From: Eric Dumazet <redacted> Date: Wed, 30 Jan 2013 17:51:44 -0800
From: Eric Dumazet <edumazet@google.com> Supporting access to skb->pkt_type is a bit tricky if we want to have a generic code, allowing pkt_type to be moved in struct sk_buff pkt_type is a bit field, so compiler cannot really help us to find its offset. Let's use a helper for this : It will throw a one time message if pkt_type no longer starts at a byte boundary or is no longer a 3bit field. Reported-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, although that's quite a hoop to jump through to accomplish this.