Common use-cases in OvS can produce datapath rules that match on OvS internal ports. For example, when the endpoint IP address of a VXLAN tunnel is on the OvS bridge itself, datapath rules may take the form:
1. in_port(eth1),actions:set(tunnel(...)),vxlan_sys_4789 2. in_port(br0),eth(src=...,dst=...),actions:eth2 Here, the first rule outputs to the vxlan port which determines the next hop to be the OvS bridge. The user-space NORMAL rule can then be used to form rule 2 that forwards the tunnelled packet to a physicaly port. Currently, rules applied to internal ports are not offloaded to the TC datapath. This RFC proposes changes to addresses that. It modifies the TC API in OvS to allow the creation of and interaction with qdiscs at the TC egress hook. These API changes are then used to offload rules applied to internal ports as TC egress filters. The start xmit ndo in OvS internal ports pushes packets into the OvS kernel datapath with ingress set to the given internal port. This is essentially what happens when packets RX on other ports that have an OvS bridge as their master. Therefore, applying flower filters to the egress path of an internal port is akin to the current practice of adding the filters to the ingress path of non internal ports. Once such filters exist in TC, it enables drivers to interpret OvS internal ports with the potential to offload a representation of them to harware devices. An alternative approach to the above it to apply a TC ingress hook in the OvS kernel datapath internal port functions. This would allow the TC offload of internal port rules as ingress fitlers rather than egress. John Hurley (2): ovs-tc: allow offloading TC rules to egress qdiscs ovs-tc: offload datapath rules matching on internal ports lib/dpif.c | 31 ++++++--------------------- lib/netdev-linux.c | 9 ++++---- lib/netdev-tc-offloads.c | 56 ++++++++++++++++++++++++++++++++---------------- lib/tc.c | 45 +++++++++++++++++++++++++------------- lib/tc.h | 20 +++++++++++------ 5 files changed, 93 insertions(+), 68 deletions(-) -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
