History log of /external/iproute2/tc/m_action.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
572478960c5715509389837396f5b929fe3f0a6c 05-Feb-2016 Elliott Hughes <enh@google.com> Merge remote-tracking branch 'aosp/upstream-master' into mymerge

Change-Id: Ibc952037986c546d20e75479fd2983d07111ff88
753ef5bbd60891437739e8ceee711957fa7a4bd2 24-Oct-2015 Stephen Hemminger <shemming@brocade.com> tc: remove extra whitespace

No blank lines at EOF, or trailing whitespace.
/external/iproute2/tc/m_action.c
68b91c56161a6f5a49f4ed1318f7ba0c2c8a080c 30-Sep-2015 Chih-Hung Hsieh <chh@google.com> Merge v4.0.0 from aosp/upstream-master

Now this module compiles cleanly with both gcc and clang.

* git merge aed6d85
* Minor changes to Android.mk files to compile the new source.
* Add Android specific changes after merge of 4.0.0.
Some old Android changes to 3.4.0 are not needed anymore.

Bug: 18513435

Change-Id: I903f4ea78a96c4e55efdcb0db160f269fdb12da2
c079e121a73af5eb49e003b13607e8a690331df6 27-May-2015 Stephen Hemminger <shemming@brocade.com> libnetlink: add size argument to rtnl_talk

There have been several instances where response from kernel
has overrun the stack buffer from the caller. Avoid future problems
by passing a size argument.

Also drop the unused peer and group arguments to rtnl_talk.
/external/iproute2/tc/m_action.c
4bd624467bc6f8f6e8b4c676f3dd8ae7593fbe70 16-Apr-2015 Daniel Borkmann <daniel@iogearbox.net> tc: built-in eBPF exec proxy

This work follows upon commit 6256f8c9e45f ("tc, bpf: finalize eBPF
support for cls and act front-end") and takes up the idea proposed by
Hannes Frederic Sowa to spawn a shell (or any other command) that holds
generated eBPF map file descriptors.

File descriptors, based on their id, are being fetched from the same
unix domain socket as demonstrated in the bpf_agent, the shell spawned
via execvpe(2) and the map fds passed over the environment, and thus
are made available to applications in the fashion of std{in,out,err}
for read/write access, for example in case of iproute2's examples/bpf/:

# env | grep BPF
BPF_NUM_MAPS=3
BPF_MAP1=6 <- BPF_MAP_ID_QUEUE (id 1)
BPF_MAP0=5 <- BPF_MAP_ID_PROTO (id 0)
BPF_MAP2=7 <- BPF_MAP_ID_DROPS (id 2)

# ls -la /proc/self/fd
[...]
lrwx------. 1 root root 64 Apr 14 16:46 0 -> /dev/pts/4
lrwx------. 1 root root 64 Apr 14 16:46 1 -> /dev/pts/4
lrwx------. 1 root root 64 Apr 14 16:46 2 -> /dev/pts/4
[...]
lrwx------. 1 root root 64 Apr 14 16:46 5 -> anon_inode:bpf-map
lrwx------. 1 root root 64 Apr 14 16:46 6 -> anon_inode:bpf-map
lrwx------. 1 root root 64 Apr 14 16:46 7 -> anon_inode:bpf-map

The advantage (as opposed to the direct/native usage) is that now the
shell is map fd owner and applications can terminate and easily reattach
to descriptors w/o any kernel changes. Moreover, multiple applications
can easily read/write eBPF maps simultaneously.

To further allow users for experimenting with that, next step is to add
a small helper that can get along with simple data types, so that also
shell scripts can make use of bpf syscall, f.e to read/write into maps.

Generally, this allows for prepopulating maps, or any runtime altering
which could influence eBPF program behaviour (f.e. different run-time
classifications, skb modifications, ...), dumping of statistics, etc.

Reference: http://thread.gmane.org/gmane.linux.network/357471/focus=357860
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Acked-by: Alexei Starovoitov <ast@plumgrid.com>
/external/iproute2/tc/m_action.c
954de6c72b242cdef14cd3bcbcdbef78c70f155a 21-Sep-2014 Jamal Hadi Salim <jhs@mojatatu.com> actions: BugFix action stats to display with -s

Was broken by commit 288abf513f5d11b98f09c6977d2019097afb7e9f
Lets not be too clever and have a separate call to print flushed
actions info.

Broken looks like:
root@moja-1:~# tc actions add action drop index 4
root@moja-1:~# tc -s actions ls action gact

action order 0: gact action drop
random type none pass val 0
index 4 ref 1 bind 0 installed 9 sec used 4 sec

The fixed version looks like:
action order 0: gact action drop
random type none pass val 0
index 4 ref 1 bind 0 installed 9 sec used 4 sec
Sent 108948 bytes 1297 pkts (dropped 1297, overlimits 0)

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
/external/iproute2/tc/m_action.c
288abf513f5d11b98f09c6977d2019097afb7e9f 24-May-2014 Jamal Hadi Salim <jhs@mojatatu.com> actions: correctly report the number of actions flushed

This also fixes a long standing bug of not sanely reporting the
action chain ordering

Sample scenario test

on window 1(event window):
run "tc monitor" and observe events

on window 2:
sudo tc actions add action drop index 10
sudo tc actions add action ok index 12
sudo tc actions ls action gact
sudo tc actions flush action gact

See the event window reporting two entries
(doing another listing should show empty generic actions)

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
/external/iproute2/tc/m_action.c
9282d08d93966dcca92cb4630efdc8c87ac53e41 24-May-2014 Jamal Hadi Salim <jhs@mojatatu.com> actions: keyword flowid or classid terminates action pipeline

scenario testcase:

TC="sudo ./tc/tc"
DEV="dev eth0"
$TC qdisc del $DEV ingress
$TC qdisc add $DEV ingress
$TC filter add $DEV parent ffff: protocol ip u32 match ip src 10.0.0.0/24 action police rate 6Mbit burst 6Mbit drop flowid :1
$TC filter add $DEV parent ffff: protocol ip u32 match ip dst 10.0.0.0/24 action police rate 1Gbit burst 1Gbit pass flowid :1
$TC -s filter ls $DEV parent ffff: protocol ip
$TC qdisc del $DEV ingress
$TC qdisc add $DEV ingress
$TC filter add $DEV parent ffff: protocol ip u32 match ip src 10.0.0.0/24 flowid 1:1 action police rate 6Mbit burst 6Mbit drop
$TC filter add $DEV parent ffff: protocol ip u32 match ip dst 10.0.0.0/24 flowid 1:2 action police rate 1Gbit burst 1Gbit pass

$TC -s filter ls $DEV parent ffff: protocol ip
$TC qdisc del $DEV ingress
$TC qdisc add $DEV ingress
$TC filter add $DEV parent ffff: protocol ip pref 10 \
u32 match ip protocol 1 0xff \
flowid 1:10 \
action skbedit mark 11 \
action police rate 10kbit burst 10k pipe index 1 \
action skbedit mark 12 \
action police rate 20kbit burst 20k pipe index 2 \
action mirred egress mirror dev dummy0

$TC -s filter ls $DEV parent ffff: protocol ip
$TC qdisc del $DEV ingress
$TC qdisc add $DEV ingress
$TC filter add $DEV parent ffff: protocol ip pref 10 \
u32 match ip protocol 1 0xff \
action skbedit mark 11 \
action police rate 10kbit burst 10k pipe index 1 \
action skbedit mark 12 \
action police rate 20kbit burst 20k pipe index 2 \
action mirred egress mirror dev dummy0 \
flowid 1:10

$TC -s filter ls $DEV parent ffff: protocol ip

Reported-by: Seann Herdejurgen <seann@herdejurgen.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
/external/iproute2/tc/m_action.c
f24a7e720592aa8f267a66b8d80f5617f4c1df61 22-Dec-2013 Jamal Hadi Salim <jhs@mojatatu.com> dont skip action order

attached.

cheers,
jamal
commit 58d78f9f6447df324cdeb99262442c5e3f1f924b
Author: Jamal Hadi Salim <jhs@mojatatu.com>
Date: Sun Dec 22 10:34:18 2013 -0500

dont skip displaying of action chains or lists by TCA_ACT_MAX_PRIO

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
/external/iproute2/tc/m_action.c
b159a7f1aeb4c2fc3a9053d314bbc4d235beac67 22-Dec-2013 Jamal Hadi Salim <jhs@mojatatu.com> allow batch gets of actions

Attached.

cheers,
jamal
commit c5f30cabef14c951596210b96bc9b423b0d39592
Author: Jamal Hadi Salim <hadi@mojatatu.com>
Date: Sun Dec 22 10:24:17 2013 -0500

Allow batching of action gets
Example:
----
tc actions get \
action gact index 100 \
action gact index 4
----

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
/external/iproute2/tc/m_action.c
ec731b7f59d21a62b72823c29d621bf77a827be1 21-Apr-2010 San Mehat <san@google.com> tc: Add ingress/mirred support

Change-Id: I5c0096fee3232a6370dd4b8943fae37bffcd9973
Signed-off-by: San Mehat <san@google.com>
/external/iproute2/tc/m_action.c
d1f28cf181a6f77f230d90267eef0ecfbcb25f30 12-Feb-2013 Stephen Hemminger <stephen@networkplumber.org> ip: make local functions static
/external/iproute2/tc/m_action.c
cd70f3f522e04b4d2fa80ae10292379bf223a53b 28-Dec-2011 Stephen Hemminger <shemminger@vyatta.com> libnetlink: remove unused junk callback

Both rtnl_talk and rtnl_dump had a callback for handling portions
of netlink message that do not match the correct pid or seq.
But this callback was never used by any part of iproute2 so remove
it.
/external/iproute2/tc/m_action.c
02833d1b381f468c8744f786061b36b7a4c2572a 02-Aug-2010 Andreas Henriksson <andreas@fatal.se> tc: make symbols loaded from tc action modules global.

Fixes problems with xtables based MARK target ("ipt" module).
When tc loads the "ipt" (xt) module it kept the symbols local,
this made loading of libxtables not find the required struct.

currently ipt/xt is the only tc action module.
iproute2 never seem to do dlclose.
hopefully the modules doesn't export more symbols then needed.

In this situation hopefully the RTLD_GLOBAL flag won't hurt us.

I've been using this patch in the Debian package of iproute for
the last 3 weeks and noone has complained.
( This fixes http://bugs.debian.org/584898 )

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
/external/iproute2/tc/m_action.c
ab814d635529787036b3caddb590034a4e6a48e6 12-Apr-2010 Andreas Henriksson <andreas@fatal.se> iproute2: add option to build m_xt as a tc module (v3)

This will build the xt module (action ipt) of tc as a
shared object that is linked at runtime by tc if used,
rather then built into tc.

This is similar to how the atm qdisc support
is handled (q_atm.so).

Signed-off-by: Andreas Henriksson <andreas@xxxxxxxx>
/external/iproute2/tc/m_action.c
ae665a522bd46bea44c5ea84c89c8b1731954170 05-Dec-2006 Stephen Hemminger <shemminger@osdl.org> Remove trailing whitespace

Go through source files and remove all trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
/external/iproute2/tc/m_action.c
302d3fb720d920ca15b7bfb979532cc0e5d7f20f 26-Sep-2006 Stephen Hemminger <shemminger@osdl.org> More TC patches from Jamal.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
/external/iproute2/tc/m_action.c
ebf32083e0a15b416357087362738e123cd0df9f 08-Aug-2006 Jamal Hadi Salim <hadi@cyberus.ca> First part of cleaning up the help output of actions.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
/external/iproute2/tc/m_action.c
5bec34845bba39dfc1efb409ebc2b158a9f0fbc4 08-Aug-2006 Jamal Hadi Salim <hadi@cyberus.ca> This patch adds ability to monitor tc events similar to ipmonitor.
User runs "tc monitor" (without quotes) and watches events of
addition, deletion and updates from qdiscs, classes, filters and
actions as they happen.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
/external/iproute2/tc/m_action.c
f1e4f042a5bb36538702cd4f0471149ff06c7a15 04-Aug-2006 jamal <hadi@cyberus.ca> Add help text for actions.
/external/iproute2/tc/m_action.c
c1027a759bb9e08ea5711ea8bc7f86ec49062951 14-Mar-2005 site!shemminger <site!shemminger> Fix batch mode handle usage.

(Logical change 1.169)
/external/iproute2/tc/m_action.c
52f337c1c1d71c1c289ed12c159aaace148fb7b5 14-Mar-2005 osdl.net!shemminger <osdl.net!shemminger> Style fix.

2005/03/04 18:49:53-08:00 net[shemminger]!shemminger
Import patch iproute-batch.1.050209.patch

(Logical change 1.162)
/external/iproute2/tc/m_action.c
ac2fc2df5e117f6bf20d823f4bf1d9390ffbedf4 18-Jan-2005 8!tgraf <8!tgraf> Use parse_rtattr_nested

(Logical change 1.129)
/external/iproute2/tc/m_action.c
4a86fe19bc7f125d3eb40366277f87da4cda78dd 18-Jan-2005 8!tgraf <8!tgraf> Use NLMSG_TAIL

(Logical change 1.127)
/external/iproute2/tc/m_action.c
cda4026c7f3b5a2c53be7e69615e134ef180a4fb 18-Jan-2005 8!tgraf <8!tgraf> move dl body cache into get_action_kind

(Logical change 1.125)
/external/iproute2/tc/m_action.c
e5879dc603ca2e9f27ca6d754fdf5e20f8072344 08-Dec-2004 ch[shemminger]!tgraf <ch[shemminger]!tgraf> iproute2: gnet_stats

(Logical change 1.107)
/external/iproute2/tc/m_action.c
50772dc51ac02239958e1ebcdb21277fcdf133a7 07-Dec-2004 osdl.net!shemminger <osdl.net!shemminger> Add ip rule flush capabilty and fix all the prototype changes
because of that code rewrites the nlmsghdr.

(Logical change 1.106)
/external/iproute2/tc/m_action.c
bb6a21a4fcaf400ca4766eea6064f2df30393d1e 07-Oct-2004 osdl.net!shemminger <osdl.net!shemminger> Fix build warnings on x86_64

(Logical change 1.92)
/external/iproute2/tc/m_action.c
95812b56a5a66e7e9a21744cfe8bc0bb9791ea98 28-Sep-2004 net[shemminger]!kaber <net[shemminger]!kaber> : prevent tc crashes

(Logical change 1.81)
/external/iproute2/tc/m_action.c
3d327bf58b22a2ae07ac4a2cf37801e282ed81f4 31-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> new tc_stats handling, and const args to filter

(Logical change 1.77)
/external/iproute2/tc/m_action.c
d81b135b6f659900c0a51ca1a733c165e49aaaec 23-Aug-2004 net[shemminger]!shemminger <net[shemminger]!shemminger> Import patch jamal-p1

(Logical change 1.70)
/external/iproute2/tc/m_action.c
68d5ba54296ba689ec96e20c82bc5936d63ecc66 14-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> (Logical change 1.66)
/external/iproute2/tc/m_action.c
6c45560b070371bd28bd90aa9a3c059c5f08c5eb 14-Aug-2004 osdl.net!shemminger <osdl.net!shemminger> Initial revision
/external/iproute2/tc/m_action.c