]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: Introduce connmark action
authorFelix Fietkau <nbd@openwrt.org>
Sun, 18 Jan 2015 21:35:14 +0000 (16:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 19 Jan 2015 21:02:06 +0000 (16:02 -0500)
commit2cf8dfe75b7bf2a43f68c0d550943c6f5e4d400f
tree0f25f92070e4208f89b8cbc59eda605347dfc95b
parent4a9938400e0133b6cb32a99bcd7edd0c6469b2c6
net: sched: Introduce connmark action

This tc action allows you to retrieve the connection tracking mark
This action has been used heavily by openwrt for a few years now.

There are known limitations currently:

doesn't work for initial packets, since we only query the ct table.
  Fine given use case is for returning packets

no implicit defrag.
  frags should be rare so fix later..

won't work for more complex tasks, e.g. lookup of other extensions
  since we have no means to store results

we still have a 2nd lookup later on via normal conntrack path.
This shouldn't break anything though since skb->nfct isn't altered.

V2:
remove unnecessary braces (Jiri)
change the action identifier to 14 (Jiri)
Fix some stylistic issues caught by checkpatch
V3:
Move module params to bottom (Cong)
Get rid of tcf_hashinfo_init and friends and conform to newer API (Cong)

Acked-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tc_act/tc_connmark.h [new file with mode: 0644]
include/uapi/linux/tc_act/tc_connmark.h [new file with mode: 0644]
net/sched/Kconfig
net/sched/Makefile
net/sched/act_connmark.c [new file with mode: 0644]