diff options
author | David S. Miller <davem@davemloft.net> | 2019-08-06 14:24:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-06 14:24:22 -0700 |
commit | ef68de56c7ad6f708bee8db5e08b83013083e757 (patch) | |
tree | 99302dc7ddec18a94a415a37a42df8d29cca0d16 /net | |
parent | 55a47dc2691b2851152d3ad2f2792dde52db972e (diff) | |
parent | 2e0bc7f3cb5553812f5808ede2cea746aabfbd03 (diff) | |
download | linux-riscv-ef68de56c7ad6f708bee8db5e08b83013083e757.tar.gz linux-riscv-ef68de56c7ad6f708bee8db5e08b83013083e757.tar.bz2 linux-riscv-ef68de56c7ad6f708bee8db5e08b83013083e757.zip |
Merge branch 'Support-tunnels-over-VLAN-in-NFP'
John Hurley says:
====================
Support tunnels over VLAN in NFP
This patchset deals with tunnel encap and decap when the end-point IP
address is on an internal port (for example and OvS VLAN port). Tunnel
encap without VLAN is already supported in the NFP driver. This patchset
extends that to include a push VLAN along with tunnel header push.
Patches 1-4 extend the flow_offload IR API to include actions that use
skbedit to set the ptype of an SKB and that send a packet to port ingress
from the act_mirred module. Such actions are used in flower rules that
forward tunnel packets to internal ports where they can be decapsulated.
OvS and its TC API is an example of a user-space app that produces such
rules.
Patch 5 modifies the encap offload code to allow the pushing of a VLAN
header after a tunnel header push.
Patches 6-10 deal with tunnel decap when the end-point is on an internal
port. They detect 'pre-tunnel rules' which do not deal with tunnels
themselves but, rather, forward packets to internal ports where they
can be decapped if required. Such rules are offloaded to a table in HW
along with an indication of whether packets need to be passed to this
table of not (based on their destination MAC address). Matching against
this table prior to decapsulation in HW allows the correct parsing and
handling of outer VLANs on tunnelled packets and the correct updating of
stats for said 'pre-tunnel' rules.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/cls_api.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 3565d9aa09aa..9d85d3295c7c 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3205,6 +3205,12 @@ int tc_setup_flow_action(struct flow_action *flow_action, } else if (is_tcf_mirred_egress_mirror(act)) { entry->id = FLOW_ACTION_MIRRED; entry->dev = tcf_mirred_dev(act); + } else if (is_tcf_mirred_ingress_redirect(act)) { + entry->id = FLOW_ACTION_REDIRECT_INGRESS; + entry->dev = tcf_mirred_dev(act); + } else if (is_tcf_mirred_ingress_mirror(act)) { + entry->id = FLOW_ACTION_MIRRED_INGRESS; + entry->dev = tcf_mirred_dev(act); } else if (is_tcf_vlan(act)) { switch (tcf_vlan_action(act)) { case TCA_VLAN_ACT_PUSH: @@ -3294,6 +3300,9 @@ int tc_setup_flow_action(struct flow_action *flow_action, default: goto err_out; } + } else if (is_tcf_skbedit_ptype(act)) { + entry->id = FLOW_ACTION_PTYPE; + entry->ptype = tcf_skbedit_ptype(act); } else { goto err_out; } |