On 20/03/2017 10:33, Roi Dayan wrote:
On 16/03/2017 17:40, Simon Horman wrote:
On Mon, Mar 13, 2017 at 03:36:50PM +0200, Roi Dayan wrote:
This patch series introduces rule offload functionality to dpif-netlink
via netdev ports new flow offloading API. The user can specify
enable rule offloading or not via OVS configuration. Netdev providers
are able to implement netdev flow offload API in order to offload rules.
This patch series also implements one offload scheme for netdev-linux,
using TC flower classifier, which was chosen because 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
offload as well.
The use-case we are currently addressing is the newly sriov switchdev
in the Linux kernel which was introduced in version 4.8 .
This series was tested against sriov vfs vports representors of the
Mellanox 100G ConnectX-4 series exposed by the mlx5 kernel driver.
- Move declarations to the right commit with implementation
- Fix tc_get_flower flow return false success
- Fix memory leaks - not releasing tc_transact replies
- Fix travis failure for OSX compilation
- Fix loop in dpif_netlink_flow_dump_next
- Fix declared default value for tc-policy in vswitch.xml
- Refactor loop in netdev_tc_flow_dump_next
- Add missing error checks in parse_flow_put
- Fix handling modify request where old rule is in hw and new
rule is not supported and needs to be in sw.
- Use 2 hashmaps instead of 1 for faster reverse lookup of ufid
- Init ports when enabling hw-offload after OVS is running
TODO: Fix breaking of datapath compilation
Fix testsuite failures
we have found that in our testing it seems to resolve problems flagged by
Travis. I think that if this is the way forwards then the code could
be collapsed back into netdev_vport_get_ifindex() and the surrounding
#ifdef __linux__ logic could be removed.
thanks Simon! looks good.
We'll send V5 with your patches and some other fixes we did.
I'm not sure we can get rid of the ifdef __linux__ because of
linux_get_ifindex(). Also we are actually missing another ifdef
__linux__ around the include of netdev-linux.h.
diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 4cc086e..d055d53 100644
@@ -783,7 +783,7 @@ get_stats(const struct netdev *netdev, struct
-netdev_vport_get_ifindex(const struct netdev *netdev_)
+netdev_vport_get_ifindex__(const struct netdev *netdev_)
const char *name = netdev_vport_get_dpif_port(netdev_, buf,
@@ -791,6 +791,15 @@ netdev_vport_get_ifindex(const struct netdev
+netdev_vport_get_ifindex(const struct netdev *netdev_)
+ if (netdev_flow_api_enabled)
+ return netdev_vport_get_ifindex__(netdev_);
+ return -EOPNOTSUPP;
#define NETDEV_VPORT_GET_IFINDEX netdev_vport_get_ifindex
#define NETDEV_FLOW_OFFLOAD_API LINUX_FLOW_OFFLOAD_API
#else /* !__linux__ */
dev mailing list