]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/net/ethernet/mellanox/mlx4/mlx4.h
net/mlx4_core: Add firmware commands to support device managed flow steering
[mirror_ubuntu-zesty-kernel.git] / drivers / net / ethernet / mellanox / mlx4 / mlx4.h
index e5d20220762cf6437078062676607d0d0423779c..c07e882e8369ce6c9e0ed0486c33da3545107165 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <linux/mutex.h>
 #include <linux/radix-tree.h>
+#include <linux/rbtree.h>
 #include <linux/timer.h>
 #include <linux/semaphore.h>
 #include <linux/workqueue.h>
@@ -509,7 +510,7 @@ struct slave_list {
 struct mlx4_resource_tracker {
        spinlock_t lock;
        /* tree for each resources */
-       struct radix_tree_root res_tree[MLX4_NUM_OF_RESOURCE_TYPE];
+       struct rb_root res_tree[MLX4_NUM_OF_RESOURCE_TYPE];
        /* num_of_slave's lists, one per slave */
        struct slave_list *slave_list;
 };
@@ -1032,7 +1033,7 @@ int mlx4_SET_PORT(struct mlx4_dev *dev, u8 port);
 /* resource tracker functions*/
 int mlx4_get_slave_from_resource_id(struct mlx4_dev *dev,
                                    enum mlx4_resource resource_type,
-                                   int resource_id, int *slave);
+                                   u64 resource_id, int *slave);
 void mlx4_delete_all_resources_for_slave(struct mlx4_dev *dev, int slave_id);
 int mlx4_init_resource_tracker(struct mlx4_dev *dev);
 
@@ -1117,6 +1118,16 @@ int mlx4_QUERY_IF_STAT_wrapper(struct mlx4_dev *dev, int slave,
                               struct mlx4_cmd_mailbox *inbox,
                               struct mlx4_cmd_mailbox *outbox,
                               struct mlx4_cmd_info *cmd);
+int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
+                                        struct mlx4_vhcr *vhcr,
+                                        struct mlx4_cmd_mailbox *inbox,
+                                        struct mlx4_cmd_mailbox *outbox,
+                                        struct mlx4_cmd_info *cmd);
+int mlx4_QP_FLOW_STEERING_DETACH_wrapper(struct mlx4_dev *dev, int slave,
+                                        struct mlx4_vhcr *vhcr,
+                                        struct mlx4_cmd_mailbox *inbox,
+                                        struct mlx4_cmd_mailbox *outbox,
+                                        struct mlx4_cmd_info *cmd);
 
 int mlx4_get_mgm_entry_size(struct mlx4_dev *dev);
 int mlx4_get_qp_per_mgm(struct mlx4_dev *dev);