2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

netdev-vport: Use common offloads interface

netdev vports are backed by actualy netdev at the kernel
level, so they can use the common netdev-tc offloads interface
for flow offloading (if enabled).

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
This commit is contained in:
Paul Blakey
2017-06-13 18:03:46 +03:00
committed by Simon Horman
parent d5ae4a6026
commit 01b257860c
3 changed files with 52 additions and 22 deletions

View File

@@ -530,7 +530,6 @@ static int set_flags(const char *, unsigned int flags);
static int update_flags(struct netdev_linux *netdev, enum netdev_flags off,
enum netdev_flags on, enum netdev_flags *old_flagsp)
OVS_REQUIRES(netdev->mutex);
static int do_get_ifindex(const char *netdev_name);
static int get_ifindex(const struct netdev *, int *ifindexp);
static int do_set_addr(struct netdev *netdev,
int ioctl_nr, const char *ioctl_name,
@@ -5414,8 +5413,8 @@ set_flags(const char *name, unsigned int flags)
return af_inet_ifreq_ioctl(name, &ifr, SIOCSIFFLAGS, "SIOCSIFFLAGS");
}
static int
do_get_ifindex(const char *netdev_name)
int
linux_get_ifindex(const char *netdev_name)
{
struct ifreq ifr;
int error;
@@ -5438,7 +5437,7 @@ get_ifindex(const struct netdev *netdev_, int *ifindexp)
struct netdev_linux *netdev = netdev_linux_cast(netdev_);
if (!(netdev->cache_valid & VALID_IFINDEX)) {
int ifindex = do_get_ifindex(netdev_get_name(netdev_));
int ifindex = linux_get_ifindex(netdev_get_name(netdev_));
if (ifindex < 0) {
netdev->get_ifindex_error = -ifindex;