@@ -89,6 +89,7 @@ struct netdev_flow_api {
int netdev_register_flow_api_provider(const struct netdev_flow_api *);
int netdev_unregister_flow_api_provider(const char *type);
+bool netdev_flow_api_equals(const struct netdev *, const struct netdev *);
#ifdef __linux__
extern const struct netdev_flow_api netdev_offload_tc;
@@ -156,6 +156,18 @@ netdev_unregister_flow_api_provider(const char *type)
return error;
}
+bool
+netdev_flow_api_equals(const struct netdev *netdev1,
+ const struct netdev *netdev2)
+{
+ const struct netdev_flow_api *netdev_flow_api1 =
+ ovsrcu_get(const struct netdev_flow_api *, &netdev1->flow_api);
+ const struct netdev_flow_api *netdev_flow_api2 =
+ ovsrcu_get(const struct netdev_flow_api *, &netdev2->flow_api);
+
+ return netdev_flow_api1 == netdev_flow_api2;
+}
+
static int
netdev_assign_flow_api(struct netdev *netdev)
{
Signed-off-by: Eli Britstein <elibr@mellanox.com> --- lib/netdev-offload-provider.h | 1 + lib/netdev-offload.c | 12 ++++++++++++ 2 files changed, 13 insertions(+)