Openvswitch currently configures the kerenel datapath via netlink over an internal ovs protocol.
This patch series offers a new provider: dpif-netlink-tc that uses the tc flower protocol to offload ovs rules into HW data-path through netdevices that e.g represent NIC e-switch ports. The user can create a bridge with type: datapath_type=dpif-hw-acc in order to use this provider. This provider can be used to pass the tc flower rules to the HW for HW offloads. Also introducing in this patch series a policy module in which the user can program a HW-offload policy. The policy module accept a ovs flow and returns a policy decision for each flow:NO_OFFLOAD or HW_ONLY -- currently the policy is to HW offload all rules. If the HW_OFFLOAD rule assignment fails the provider will fallback to the system datapath. Flower was chosen b/c its sort of natural to state OVS DP rules for this classifier. However, the code can be extended to support other classifiers such as U32, eBPF, etc which have HW offloads as well. The use-case we are currently addressing is the newly introduced SRIOV switchdev mode in the Linux kernel which is introduced in version 4.8 [1][2]. This series was tested against SRIOV VFs vports representors of the Mellanox 100G ConnectX-4 series exposed by the mlx5 kernel driver. changes from the RFC (http://openvswitch.org/pipermail/dev/2016-September/079952.html) - removed patch #9 which added the ingress qdisc on the ports (Ben P.) - added flush support (now the last patch, #9) - renamed provider to from dpif-hw-netlink to dpif-hw-acc - coding style changes - offloading matching on vlan and vlan pop/push action - fixed segmentation fault while dumping a large number of flows - using different tc priorities for different filter masks - fixed the code to get appctl upcall/show nflows working properly Paul and Shahar. [1] http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=513334e18a74f70c0be58c2eb73af1715325b870 [2] http://git.kernel.org/cgit/linux/kernel/git/davem/net.git/commit/?id=53d94892e27409bb2b48140207c0273b2ba65f61 Paul Blakey (9): dpif-hw-acc: New dpif provider dpif-hw-acc: Add tc interface dpif-hw-acc: Add new hash maps ufid <-> tc flow and ovs port <-> netdev dpif-hw-acc: add a user offload policy framework dpif-hw-acc: converting a tc flow back to ovs flow dpif-hw-acc: using port maps on init and changes dpif-hw-acc: operate implementation dpif-hw-acc: support for flow dump from tc dpif-hw-acc: flow flush lib/automake.mk | 6 + lib/dpif-hw-acc.c | 2020 +++++++++++++++++++++++++++++++++++++++++++++++ lib/dpif-hw-acc.h | 46 ++ lib/dpif-provider.h | 1 + lib/dpif.c | 1 + lib/hw-offload-policy.c | 23 + lib/hw-offload-policy.h | 20 + lib/tc.c | 906 +++++++++++++++++++++ lib/tc.h | 86 ++ 9 files changed, 3109 insertions(+) create mode 100644 lib/dpif-hw-acc.c create mode 100644 lib/dpif-hw-acc.h create mode 100644 lib/hw-offload-policy.c create mode 100644 lib/hw-offload-policy.h create mode 100644 lib/tc.c create mode 100644 lib/tc.h -- 1.8.3.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev