diff options
| author | David S. Miller <davem@davemloft.net> | 2017-06-06 19:45:25 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-06-06 19:45:25 +0300 |
| commit | 359fce1d4052e31bd74b34e026ffcb709c3bc433 (patch) | |
| tree | 1cca4caace0d58603d19d494849f2653e2805bb3 /net/core/dev.c | |
| parent | 928a759593d21ec184536bde0b4816d21bcd5a86 (diff) | |
| parent | bd5ddba52dc0e2b37ce67e68ba1c419693009185 (diff) | |
| download | linux-359fce1d4052e31bd74b34e026ffcb709c3bc433.tar.xz | |
Merge branch 'net-trap-control-action'
Jiri Pirko says:
====================
net: introduce trap control action to tc and offload it
This patchset introduces a control action dedicated to indicate
to trap the matched packet to CPU. This is specific action for
HW offloads. Also, the patchset offloads the action to mlxsw driver.
Example usage:
$ tc filter add dev enp3s0np19 parent ffff: protocol ip prio 20 flower skip_sw dst_ip 192.168.10.1 action trap
v1->v2:
- patch 1
- fix the comment according to Andrew's note
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
| -rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 06e0a7492df8..8f72f4a9c6ac 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3269,6 +3269,7 @@ sch_handle_egress(struct sk_buff *skb, int *ret, struct net_device *dev) return NULL; case TC_ACT_STOLEN: case TC_ACT_QUEUED: + case TC_ACT_TRAP: *ret = NET_XMIT_SUCCESS; consume_skb(skb); return NULL; @@ -4038,6 +4039,7 @@ sch_handle_ingress(struct sk_buff *skb, struct packet_type **pt_prev, int *ret, return NULL; case TC_ACT_STOLEN: case TC_ACT_QUEUED: + case TC_ACT_TRAP: consume_skb(skb); return NULL; case TC_ACT_REDIRECT: |
