mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
netdev: Dynamic per-port Flow API.
Current issues with Flow API: * OVS calls offloading functions regardless of successful flow API initialization. (ex. on init_flow_api failure) * Static initilaization of Flow API for a netdev_class forbids having different offloading types for different instances of netdev with the same netdev_class. (ex. different vports in 'system' and 'netdev' datapaths at the same time) Solution: * Move Flow API from the netdev_class to netdev instance. * Make Flow API dynamic, i.e. probe the APIs and choose the suitable one. Side effects: * Flow API providers localized as possible in their modules. * Now we have an ability to make runtime checks. For example, we could check if particular device supports features we need, like if dpdk device supports RSS+MARK action. Signed-off-by: Ilya Maximets <i.maximets@samsung.com> Acked-by: Roi Dayan <roid@mellanox.com>
This commit is contained in:
@@ -47,7 +47,6 @@
|
||||
#include "unaligned.h"
|
||||
#include "unixctl.h"
|
||||
#include "openvswitch/vlog.h"
|
||||
#include "netdev-tc-offloads.h"
|
||||
#ifdef __linux__
|
||||
#include "netdev-linux.h"
|
||||
#endif
|
||||
@@ -1116,10 +1115,8 @@ netdev_vport_get_ifindex(const struct netdev *netdev_)
|
||||
}
|
||||
|
||||
#define NETDEV_VPORT_GET_IFINDEX netdev_vport_get_ifindex
|
||||
#define NETDEV_FLOW_OFFLOAD_API , LINUX_FLOW_OFFLOAD_API
|
||||
#else /* !__linux__ */
|
||||
#define NETDEV_VPORT_GET_IFINDEX NULL
|
||||
#define NETDEV_FLOW_OFFLOAD_API
|
||||
#endif /* __linux__ */
|
||||
|
||||
#define VPORT_FUNCTIONS_COMMON \
|
||||
@@ -1133,8 +1130,7 @@ netdev_vport_get_ifindex(const struct netdev *netdev_)
|
||||
.get_etheraddr = netdev_vport_get_etheraddr, \
|
||||
.get_stats = netdev_vport_get_stats, \
|
||||
.get_pt_mode = netdev_vport_get_pt_mode, \
|
||||
.update_flags = netdev_vport_update_flags \
|
||||
NETDEV_FLOW_OFFLOAD_API
|
||||
.update_flags = netdev_vport_update_flags
|
||||
|
||||
#define TUNNEL_FUNCTIONS_COMMON \
|
||||
VPORT_FUNCTIONS_COMMON, \
|
||||
|
Reference in New Issue
Block a user