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-netlink 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. 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-netlink: New dpif provider dpif-hw-netlink: Add tc interface dpif-hw-netlink: Added new maps dpif-hw-netlink: added new user offload policy dpif-hw-netlink: converting a tc flow back to ovs flow dpif-hw-netlink: using port maps on init and changes dpif-hw-netlink: operate implementation dpif-hw-netlink: support for flow dump from tc netdev-linux: add tc ingress qdisc support lib/automake.mk | 6 + lib/dpif-hw-netlink.c | 1894 +++++++++++++++++++++++++++++++++++++++++++++++ lib/dpif-hw-netlink.h | 41 + lib/dpif-provider.h | 1 + lib/dpif.c | 1 + lib/hw-offload-policy.c | 23 + lib/hw-offload-policy.h | 20 + lib/netdev-linux.c | 72 ++ lib/tc.c | 796 ++++++++++++++++++++ lib/tc.h | 102 +++ 10 files changed, 2956 insertions(+) create mode 100644 lib/dpif-hw-netlink.c create mode 100644 lib/dpif-hw-netlink.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