net/mlx5_core: Extend struct mlx5_interface to support multiple protocols
[cascardo/linux.git] / include / linux / mlx5 / driver.h
index f250f65..9a90e75 100644 (file)
@@ -781,14 +781,22 @@ enum {
        MAX_MR_CACHE_ENTRIES    = 16,
 };
 
+enum {
+       MLX5_INTERFACE_PROTOCOL_IB  = 0,
+       MLX5_INTERFACE_PROTOCOL_ETH = 1,
+};
+
 struct mlx5_interface {
        void *                  (*add)(struct mlx5_core_dev *dev);
        void                    (*remove)(struct mlx5_core_dev *dev, void *context);
        void                    (*event)(struct mlx5_core_dev *dev, void *context,
                                         enum mlx5_dev_event event, unsigned long param);
+       void *                  (*get_dev)(void *context);
+       int                     protocol;
        struct list_head        list;
 };
 
+void *mlx5_get_protocol_dev(struct mlx5_core_dev *mdev, int protocol);
 int mlx5_register_interface(struct mlx5_interface *intf);
 void mlx5_unregister_interface(struct mlx5_interface *intf);