iproute2/tc
Jakub Kicinski 67c857df80 {f, m}_bpf: don't allow specifying multiple bpf programs
Both BPF filter and action will allow users to specify run
multiple times, and only the last one will be considered by
the kernel.  Explicitly refuse such command lines.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
2017-11-26 11:57:57 -08:00
..
.gitignore Add ignore files to make using git easier 2006-08-08 12:04:38 -07:00
e_bpf.c bpf: make tc's bpf loader generic and move into lib 2016-11-29 12:35:32 -08:00
em_canid.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_cmp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_ipset.c Convert the obvious cases to strlcpy() 2017-09-01 12:10:54 -07:00
em_meta.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_nbyte.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
em_u32.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
emp_ematch.l SPDX license identifiers 2017-11-24 12:21:35 -08:00
emp_ematch.y tc: remove extra whitespace 2015-10-23 15:43:28 -07:00
f_basic.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
f_bpf.c {f, m}_bpf: don't allow specifying multiple bpf programs 2017-11-26 11:57:57 -08:00
f_cgroup.c tc actions: Improved batching and time filtered dumping 2017-08-04 13:16:51 -07:00
f_flow.c tc actions: Improved batching and time filtered dumping 2017-08-04 13:16:51 -07:00
f_flower.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
f_fw.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
f_matchall.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
f_route.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
f_rsvp.c tc: break long lines 2017-11-24 11:31:36 -08:00
f_tcindex.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
f_u32.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_action.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
m_bpf.c {f, m}_bpf: don't allow specifying multiple bpf programs 2017-11-26 11:57:57 -08:00
m_connmark.c tc/actions: introduce support for goto chain action 2017-05-22 13:31:51 -07:00
m_csum.c tc: actions: add helpers to parse and print control actions 2017-05-22 13:31:51 -07:00
m_ematch.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_ematch.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
m_estimator.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_gact.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_ife.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_ipt.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
m_mirred.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
m_nat.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_pedit.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
m_pedit.h drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_police.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_sample.c tc: actions: add helpers to parse and print control actions 2017-05-22 13:31:51 -07:00
m_simple.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_skbedit.c tc: actions: add helpers to parse and print control actions 2017-05-22 13:31:51 -07:00
m_skbmod.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
m_tunnel_key.c tc: m_tunnel_key: add csum/nocsum option 2017-06-16 09:11:42 -07:00
m_vlan.c tc/actions: introduce support for goto chain action 2017-05-22 13:31:51 -07:00
m_xt_old.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
m_xt.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
Makefile SPDX license identifiers 2017-11-24 12:21:35 -08:00
p_eth.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_icmp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_ip6.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_ip.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_tcp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
p_udp.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
q_atm.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
q_cbq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_cbs.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_choke.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_clsact.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
q_codel.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_drr.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_dsmark.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
q_fifo.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_fq_codel.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_fq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_gred.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_hfsc.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_hhf.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
q_htb.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_ingress.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_mqprio.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_multiq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_netem.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_pie.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_prio.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_qfq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_red.c tc: break long lines 2017-11-24 11:31:36 -08:00
q_rr.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_sfb.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_sfq.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
q_tbf.c tc: break long lines 2017-11-24 11:31:36 -08:00
README.last tc: remove extra whitespace 2015-10-23 15:43:28 -07:00
static-syms.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc_cbq.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_cbq.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc_class.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
tc_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc_core.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_core.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc_estimator.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_exec.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
tc_filter.c tc: replace magic constant 16 with #define 2017-11-24 11:19:18 -08:00
tc_monitor.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_qdisc.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
tc_red.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_red.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc_stab.c drop unneeded include of syslog.h 2017-11-12 16:22:36 -08:00
tc_util.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08:00
tc_util.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
tc.c tc: B.W limits can now be specified in %. 2017-11-24 11:22:13 -08: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.