mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-01 01:49:19 -05:00
net sched ife action: Introduce skb tcindex metadata encap decap
Sample use case of how this is encoded: user space via tuntap (or a connected VM/Machine/container) encodes the tcindex TLV. Sample use case of decoding: IFE action decodes it and the skb->tc_index is then used to classify. So something like this for encoded ICMP packets: .. first decode then reclassify... skb->tcindex will be set sudo $TC filter add dev $ETH parent ffff: prio 2 protocol 0xbeef \ u32 match u32 0 0 flowid 1:1 \ action ife decode reclassify ...next match the decode icmp packet... sudo $TC filter add dev $ETH parent ffff: prio 4 protocol ip \ u32 match ip protocol 1 0xff flowid 1:1 \ action continue ... last classify it using the tcindex classifier and do someaction.. sudo $TC filter add dev $ETH parent ffff: prio 5 protocol ip \ handle 0x11 tcindex classid 1:1 \ action blah.. Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6a5d58b67e
commit
408fbc22ef
@@ -32,8 +32,9 @@ enum {
|
||||
#define IFE_META_HASHID 2
|
||||
#define IFE_META_PRIO 3
|
||||
#define IFE_META_QMAP 4
|
||||
#define IFE_META_TCINDEX 5
|
||||
/*Can be overridden at runtime by module option*/
|
||||
#define __IFE_META_MAX 5
|
||||
#define __IFE_META_MAX 6
|
||||
#define IFE_META_MAX (__IFE_META_MAX - 1)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user