linux/include/net/tc_act
Jamal Hadi Salim 86da71b573 net_sched: Introduce skbmod action
This action is intended to be an upgrade from a usability perspective
from pedit (as well as operational debugability).
Compare this:

sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \
u32 match ip protocol 1 0xff flowid 1:2 \
action pedit munge offset -14 u8 set 0x02 \
munge offset -13 u8 set 0x15 \
munge offset -12 u8 set 0x15 \
munge offset -11 u8 set 0x15 \
munge offset -10 u16 set 0x1515 \
pipe

to:

sudo tc filter add dev $ETH parent 1: protocol ip prio 10 \
u32 match ip protocol 1 0xff flowid 1:2 \
action skbmod dmac 02:15:15:15:15:15

Also try to do a MAC address swap with pedit or worse
try to debug a policy with destination mac, source mac and
etherype. Then make few rules out of those and you'll get my point.

In the future common use cases on pedit can be migrated to this action
(as an example different fields in ip v4/6, transports like tcp/udp/sctp
etc). For this first cut, this allows modifying basic ethernet header.

The most important ethernet use case at the moment is when redirecting or
mirroring packets to a remote machine. The dst mac address needs a re-write
so that it doesnt get dropped or confuse an interconnecting (learning) switch
or dropped by a target machine (which looks at the dst mac). And at times
when flipping back the packet a swap of the MAC addresses is needed.

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-09-15 19:33:47 -04:00
..
tc_bpf.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_connmark.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_csum.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_defact.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_gact.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_ife.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_ipt.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_mirred.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_nat.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_pedit.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_skbedit.h net_sched: get rid of struct tcf_common 2016-07-25 21:49:20 -07:00
tc_skbmod.h net_sched: Introduce skbmod action 2016-09-15 19:33:47 -04:00
tc_tunnel_key.h net/sched: Introduce act_tunnel_key 2016-09-10 20:53:56 -07:00
tc_vlan.h net_sched: act_vlan: Add priority option 2016-08-18 23:13:14 -07:00