#ifndef DEV_H #define DEV_H #include #include "built_in.h" extern size_t device_mtu(const char *ifname); extern int device_address(const char *ifname, int af, struct sockaddr_storage *ss); extern int __device_ifindex(const char *ifname); extern int device_hw_address(const char *ifname, uint8_t *addr, size_t len); extern int device_ifindex(const char *ifname); extern int device_type(const char *ifname); extern short device_get_flags(const char *ifname); extern void device_set_flags(const char *ifname, const short flags); extern int device_up_and_running(const char *ifname); extern uint32_t device_bitrate(const char *ifname); extern short device_enter_promiscuous_mode(const char *ifname); extern void device_leave_promiscuous_mode(const char *ifname, short oldflags); extern const char *device_type2str(uint16_t type); extern const char *device_addr2str(const unsigned char *addr, int alen, int type, char *buf, int blen); #endif /* DEV_H */ 0d3b877bb2a44328c0978734cfc2'/> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNogah Frankel <nogahf@mellanox.com>2017-02-09 14:54:48 +0100
committerDavid S. Miller <davem@davemloft.net>2017-02-10 11:46:41 -0500
commit1e5d94327dfb0d3b877bb2a44328c0978734cfc2 (patch)
treeef7ecfb3e48491ac1657dc21f913fa366b67b71f
parent8ecd4591e7612a7ea5c67589cf1a7f18bd17ba14 (diff)
mlxsw: spectrum: Extend port_orig_get for bridge devices
The function mlxsw_sp_port_orig_get returns the vport from the physical port if needed, based on the original device. This patch addresses the case where the original device is a bridge. If it is vlan unaware bridge, it returns the matching vport. If it is vlan aware bridge, there is no matching vport, and it returns the original port. Signed-off-by: Nogah Frankel <nogahf@mellanox.com> Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c