summaryrefslogtreecommitdiff
path: root/include/linux/mlx4
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2016-02-26 19:32:24 +0300
committerDavid S. Miller <davem@davemloft.net>2016-03-02 00:07:29 +0300
commit09d4d087cd4869859fcc5dfc692f0830550a1b48 (patch)
treebfcf5d70a2e2f8b24c7a94d9776daf92c0a1ee69 /include/linux/mlx4
parentbfcd3a46617209454cfc0947ab093e37fd1e84ef (diff)
downloadlinux-09d4d087cd4869859fcc5dfc692f0830550a1b48.tar.xz
mlx4: Implement devlink interface
Implement newly introduced devlink interface. Add devlink port instances for every port and set the port types accordingly. Signed-off-by: Jiri Pirko <jiri@mellanox.com> v2->v3: -add dev param to devlink_register (api change) Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mlx4')
-rw-r--r--include/linux/mlx4/driver.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h
index 2e8af001c5da..bd0e7075ea6d 100644
--- a/include/linux/mlx4/driver.h
+++ b/include/linux/mlx4/driver.h
@@ -33,6 +33,7 @@
#ifndef MLX4_DRIVER_H
#define MLX4_DRIVER_H
+#include <net/devlink.h>
#include <linux/mlx4/device.h>
struct mlx4_dev;
@@ -89,6 +90,8 @@ int mlx4_port_map_set(struct mlx4_dev *dev, struct mlx4_port_map *v2p);
void *mlx4_get_protocol_dev(struct mlx4_dev *dev, enum mlx4_protocol proto, int port);
+struct devlink_port *mlx4_get_devlink_port(struct mlx4_dev *dev, int port);
+
static inline u64 mlx4_mac_to_u64(u8 *addr)
{
u64 mac = 0;