Subject: Re: [net-next,v2,1/2] net, sched: add skb_at_tc_ingress helper

From: Sven Eckelmann <[email-masked]>
Date: Wed, 16 Mar 2016 12:00:40 +0100

On Thursday 07 January 2016 15:50:22 Daniel Borkmann wrote:
> Add a skb_at_tc_ingress() as this will be needed elsewhere as well and
> can hide the ugly ifdef.
> 
> Signed-off-by: Daniel Borkmann <[email-masked]>
> Acked-by: Alexei Starovoitov <[email-masked]>
> ---
>  include/net/sch_generic.h | 9 +++++++++
>  net/sched/cls_bpf.c       | 6 +-----
>  2 files changed, 10 insertions(+), 5 deletions(-)

This change breaks builds of external modules when the kernel headers where 
exported via headers_install. For example make-kpkg from the debian package 
kernel-package does this to create its linux-headers-... packages. The 
official Debian package linux-headers-4.5.0-rc7-amd64_4.5~rc7-1~exp1_amd64.deb 
doesn't seem to be affected.

Problem is that net/sch_generic.h is now depending on the defines AT_INGRESS + 
G_TC_AT from include/uapi/linux/pkt_cls.h. But these are in a __KERNEL__ 
section which gets stripped by headers_install when 
include/uapi/linux/pkt_cls.h is "moved" to include/linux/pkt_cls.h. 
net/sch_generic.h will now include include/linux/pkt_cls.h instead of 
include/uapi/linux/pkt_cls.h (which also exists in the package generated by 
make-kpkg/kernel-package). So net/sch_generic.h will not have these two 
defines which it needs when it gets build with "CONFIG_NET_CLS_ACT".

This can either seen as fault by the debian tool make-kpkg or by the kernel. I 
personally would guess that it is the fault of make-kpkg but I will let the 
people judge which know more about it.

The problem was analyzed in https://www.open-mesh.org/issues/246#note-8. It 
also includes instructions how to reproduce it on Debian with make-kpkg and 
out-of-tree version of batman-adv.

Kind regards,
	Sven