mirror_iproute2/tc
Daniel Borkmann 4710e46ec3 tc, ipt: don't enforce iproute2 dependency on iptables-devel
Since 5cd1adba79 ("Update to current iptables headers") compilation
of iproute2 broke for systems without iptables-devel package [1].
Reason is that even though we fall back to build m_ipt.c, the include
depends on a xtables-version.h header, which only ships with
iptables-devel. Machines not having this package fail compilation with:

    [...]
    CC       m_ipt.o
In file included from ../include/iptables.h:5:0,
                 from m_ipt.c:17:
../include/xtables.h:34:29: fatal error: xtables-version.h: No such file or directory
compilation terminated.
../Config:31: recipe for target 'm_ipt.o' failed
make[1]: *** [m_ipt.o] Error 1

The configure script only barks that package xtables was not found in
the pkg-config search path. The generated Config then only contains f.e.
TC_CONFIG_IPSET. In tc's Makefile we thus fall back to adding m_ipt.o
to TCMODULES. m_ipt.c then includes the local include/iptables.h header
copy, which includes the include/xtables.h copy. Latter then includes
xtables-version.h, which only ships with iptables-devel.

One way to resolve this is to skip this whole mess when pkg-config has
no xtables config available. I've carried something along these lines
locally for a while now, but it's just too annyoing. :/ Build works fine
now also when xtables.pc is not available.

  [1] http://www.spinics.net/lists/netdev/msg366162.html

Fixes: 5cd1adba79 ("Update to current iptables headers")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2016-10-26 10:58:22 -07:00
..
.gitignore Add ignore files to make using git easier 2006-08-08 12:04:38 -07:00
e_bpf.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
em_canid.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
em_cmp.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
em_ipset.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
em_meta.c tc: ematch: Ignore all-zero mask value when printing filters 2016-07-20 12:20:13 -07:00
em_nbyte.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
em_u32.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
emp_ematch.l fix build issues with flex ver 2.5 2010-04-22 15:27:42 -07:00
emp_ematch.y tc: remove extra whitespace 2015-10-23 15:43:28 -07:00
f_basic.c tc: code cleanup 2016-03-21 11:48:36 -07:00
f_bpf.c tc: cls_bpf: handle skip_sw and skip_hw flags 2016-10-17 05:27:59 -07:00
f_cgroup.c tc: code cleanup 2016-03-21 11:48:36 -07:00
f_flow.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
f_flower.c tc: flower: Introduce vlan support 2016-09-01 08:38:41 -07:00
f_fw.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
f_matchall.c tc: Add support for the matchall traffic classifier. 2016-09-01 08:37:01 -07:00
f_route.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
f_rsvp.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
f_tcindex.c tc classifiers: Modernize tcindex classifier 2016-08-22 10:08:00 -07:00
f_u32.c tc: f_u32: Fill in 'linkid' provided by user 2016-10-09 18:51:00 -07:00
m_action.c tc: fix a misleading failure 2016-08-09 11:18:14 -07:00
m_bpf.c tc: util: No need for action_n2a() to be reentrant 2016-07-25 08:10:43 -07:00
m_connmark.c tc: use action_a2n() everywhere 2016-07-25 08:10:43 -07:00
m_csum.c tc: util: No need for action_n2a() to be reentrant 2016-07-25 08:10:43 -07:00
m_ematch.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
m_ematch.h include needed files 2012-12-23 11:49:06 -08:00
m_estimator.c tc: code cleanup 2016-03-21 11:48:36 -07:00
m_gact.c action gact: list pipe as a valid action 2016-10-12 15:09:52 -07:00
m_ife.c actions ife: Introduce encoding and decoding of tcindex metadata 2016-10-12 15:09:52 -07:00
m_ipt.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
m_mirred.c tc: util: No need for action_n2a() to be reentrant 2016-07-25 08:10:43 -07:00
m_nat.c tc: util: No need for action_n2a() to be reentrant 2016-07-25 08:10:43 -07:00
m_pedit.c tc: util: No need for action_n2a() to be reentrant 2016-07-25 08:10:43 -07:00
m_pedit.h Remove trailing whitespace 2006-12-05 10:10:22 -08:00
m_police.c police: improve usage message 2016-08-29 10:54:40 -07:00
m_simple.c tc: use action_a2n() everywhere 2016-07-25 08:10:43 -07:00
m_skbedit.c Merge branch 'master' into net-next 2016-07-25 08:21:00 -07:00
m_skbmod.c tc: skbmod style cleanup 2016-10-12 15:12:51 -07:00
m_vlan.c tc: m_vlan: Add vlan modify action 2016-10-09 19:11:34 -07:00
m_xt_old.c tc: code cleanup 2016-03-21 11:48:36 -07:00
m_xt.c m_xt: whitespace cleanup 2016-06-14 14:40:53 -07:00
Makefile tc, ipt: don't enforce iproute2 dependency on iptables-devel 2016-10-26 10:58:22 -07:00
p_icmp.c tc: code cleanup 2016-03-21 11:48:36 -07:00
p_ip.c tc/p_ip.c: Minor coding style cleanup 2016-03-27 10:34:22 -07:00
p_tcp.c tc: code cleanup 2016-03-21 11:48:36 -07:00
p_udp.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_atm.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_cbq.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_choke.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_clsact.c ingress, clsact: don't add TCA_OPTIONS to nl msg 2016-05-16 11:20:50 -07:00
q_codel.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_drr.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_dsmark.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_fifo.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_fq_codel.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_fq.c tc: fq: display unthrottle latency 2016-10-09 19:15:13 -07:00
q_gred.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_hfsc.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_hhf.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_htb.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_ingress.c ingress, clsact: don't add TCA_OPTIONS to nl msg 2016-05-16 11:20:50 -07:00
q_mqprio.c ip: make local functions static 2013-02-12 11:38:35 -08:00
q_multiq.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_netem.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_pie.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_prio.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_qfq.c qfq: fix parse_opt dead code 2015-10-27 15:46:20 +09:00
q_red.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_rr.c tc: code cleanup 2016-03-21 11:48:36 -07:00
q_sfb.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_sfq.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
q_tbf.c Use C99 style initializers everywhere 2016-07-20 12:05:24 -07:00
README.last tc: remove extra whitespace 2015-10-23 15:43:28 -07:00
static-syms.c Fix build when shared libraries are disabled 2013-03-13 08:29:59 -07:00
tc_bpf.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
tc_bpf.h tc, bpf: further improve error reporting 2016-04-11 21:53:58 +00:00
tc_cbq.c tc: code cleanup 2016-03-21 11:48:36 -07:00
tc_cbq.h (Logical change 1.3) 2004-04-15 20:56:59 +00:00
tc_class.c remove useless return statement 2016-09-01 08:44:20 -07:00
tc_common.h tc: built-in eBPF exec proxy 2015-04-27 16:39:23 -07:00
tc_core.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
tc_core.h htb: support 64bit rates 2013-11-22 17:36:18 -08:00
tc_estimator.c tc: code cleanup 2016-03-21 11:48:36 -07:00
tc_exec.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00
tc_filter.c tc_filter: style cleanup 2016-10-12 15:21:13 -07:00
tc_monitor.c tc: code cleanup 2016-03-21 11:48:36 -07:00
tc_qdisc.c tc: Fix for missing estimator initialization 2016-08-06 10:14:06 -07:00
tc_red.c tc: code cleanup 2016-03-21 11:48:36 -07:00
tc_red.h (Logical change 1.3) 2004-04-15 20:56:59 +00:00
tc_stab.c remove useless return statement 2016-09-01 08:44:20 -07:00
tc_util.c tc: don't accept qdisc 'handle' greater than ffff 2016-09-20 09:44:59 -07:00
tc_util.h tc: util: No need for action_n2a() to be reentrant 2016-07-25 08:10:43 -07:00
tc.c Replace malloc && memset by calloc 2016-07-20 12:05:24 -07:00

Kernel code and interface.
--------------------------

* Compile time switches

There is only one, but very important, compile time switch.
It is not settable by "make config", but should be selected
manually and after a bit of thinking in <include/net/pkt_sched.h>

PSCHED_CLOCK_SOURCE can take three values:

	PSCHED_GETTIMEOFDAY
	PSCHED_JIFFIES
	PSCHED_CPU


 PSCHED_GETTIMEOFDAY

Default setting is the most conservative PSCHED_GETTIMEOFDAY.
It is very slow both because of weird slowness of do_gettimeofday()
and because it forces code to use unnatural "timeval" format,
where microseconds and seconds fields are separate.
Besides that, it will misbehave, when delays exceed 2 seconds
(f.e. very slow links or classes bounded to small slice of bandwidth)
To resume: as only you will get it working, select correct clock
source and forget about PSCHED_GETTIMEOFDAY forever.


 PSCHED_JIFFIES

Clock is derived from jiffies. On architectures with HZ=100
granularity of this clock is not enough to make reasonable
bindings to real time. However, taking into account Linux
architecture problems, which force us to use artificial
integrated clock in any case, this switch is not so bad
for schduling even on high speed networks, though policing
is not reliable.


 PSCHED_CPU

It is available only for alpha and pentiums with correct
CPU timestamp. It is the fastest way, use it when it is available,
but remember: not all pentiums have this facility, and
a lot of them have clock, broken by APM etc. etc.