]> Git Repo - linux.git/blobdiff - include/linux/mlx5/driver.h
Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox...
[linux.git] / include / linux / mlx5 / driver.h
index 2f4d6182df1bcb862e09724e9350c977e24adffa..6ea8d67e3cb81b4c45df92cfbdcf87c6f84cfad5 100644 (file)
@@ -194,7 +194,8 @@ enum port_state_policy {
 
 enum mlx5_coredev_type {
        MLX5_COREDEV_PF,
-       MLX5_COREDEV_VF
+       MLX5_COREDEV_VF,
+       MLX5_COREDEV_SF,
 };
 
 struct mlx5_field_desc {
@@ -508,6 +509,10 @@ struct mlx5_devcom;
 struct mlx5_fw_reset;
 struct mlx5_eq_table;
 struct mlx5_irq_table;
+struct mlx5_vhca_state_notifier;
+struct mlx5_sf_dev_table;
+struct mlx5_sf_hw_table;
+struct mlx5_sf_table;
 
 struct mlx5_rate_limit {
        u32                     rate;
@@ -565,6 +570,7 @@ struct mlx5_priv {
        int                     host_pf_pages;
 
        struct mlx5_core_health health;
+       struct list_head        traps;
 
        /* start: qp staff */
        struct dentry          *qp_debugfs;
@@ -583,7 +589,6 @@ struct mlx5_priv {
        /* end: alloc staff */
        struct dentry          *dbg_root;
 
-       struct list_head        dev_list;
        struct list_head        ctx_list;
        spinlock_t              ctx_lock;
        struct mlx5_adev       **adev;
@@ -604,6 +609,15 @@ struct mlx5_priv {
 
        struct mlx5_bfreg_data          bfregs;
        struct mlx5_uars_page          *uar;
+#ifdef CONFIG_MLX5_SF
+       struct mlx5_vhca_state_notifier *vhca_state_notifier;
+       struct mlx5_sf_dev_table *sf_dev_table;
+       struct mlx5_core_dev *parent_mdev;
+#endif
+#ifdef CONFIG_MLX5_SF_MANAGER
+       struct mlx5_sf_hw_table *sf_hw_table;
+       struct mlx5_sf_table *sf_table;
+#endif
 };
 
 enum mlx5_device_state {
@@ -1077,11 +1091,26 @@ enum {
        MAX_MR_CACHE_ENTRIES
 };
 
+/* Async-atomic event notifier used by mlx5 core to forward FW
+ * evetns recived from event queue to mlx5 consumers.
+ * Optimise event queue dipatching.
+ */
 int mlx5_notifier_register(struct mlx5_core_dev *dev, struct notifier_block *nb);
 int mlx5_notifier_unregister(struct mlx5_core_dev *dev, struct notifier_block *nb);
+
+/* Async-atomic event notifier used for forwarding
+ * evetns from the event queue into the to mlx5 events dispatcher,
+ * eswitch, clock and others.
+ */
 int mlx5_eq_notifier_register(struct mlx5_core_dev *dev, struct mlx5_nb *nb);
 int mlx5_eq_notifier_unregister(struct mlx5_core_dev *dev, struct mlx5_nb *nb);
 
+/* Blocking event notifier used to forward SW events, used for slow path */
+int mlx5_blocking_notifier_register(struct mlx5_core_dev *dev, struct notifier_block *nb);
+int mlx5_blocking_notifier_unregister(struct mlx5_core_dev *dev, struct notifier_block *nb);
+int mlx5_blocking_notifier_call_chain(struct mlx5_core_dev *dev, unsigned int event,
+                                     void *data);
+
 int mlx5_core_query_vendor_id(struct mlx5_core_dev *mdev, u32 *vendor_id);
 
 int mlx5_cmd_create_vport_lag(struct mlx5_core_dev *dev);
@@ -1214,22 +1243,4 @@ static inline bool mlx5_is_roce_enabled(struct mlx5_core_dev *dev)
        return val.vbool;
 }
 
-/**
- * mlx5_core_net - Provide net namespace of the mlx5_core_dev
- * @dev: mlx5 core device
- *
- * mlx5_core_net() returns the net namespace of mlx5 core device.
- * This can be called only in below described limited context.
- * (a) When a devlink instance for mlx5_core is registered and
- *     when devlink reload operation is disabled.
- *     or
- * (b) during devlink reload reload_down() and reload_up callbacks
- *     where it is ensured that devlink instance's net namespace is
- *     stable.
- */
-static inline struct net *mlx5_core_net(struct mlx5_core_dev *dev)
-{
-       return devlink_net(priv_to_devlink(dev));
-}
-
 #endif /* MLX5_DRIVER_H */
This page took 0.037675 seconds and 4 git commands to generate.