]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net/mlx5: Report EQE data upon CQ completion
authorYishai Hadas <yishaih@mellanox.com>
Sun, 30 Jun 2019 16:23:27 +0000 (19:23 +0300)
committerLeon Romanovsky <leonro@mellanox.com>
Wed, 3 Jul 2019 18:00:20 +0000 (21:00 +0300)
Report EQE data upon CQ completion to let upper layers use this data.

Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
drivers/infiniband/hw/mlx5/cq.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/qp.c
drivers/net/ethernet/mellanox/mlx5/core/cq.c
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
include/linux/mlx5/cq.h

index d323b822b694f198fb0d95b2d94e9ae0dd30eca8..4efbbd2fce0cdfb6793a4694d85660e8380d0286 100644 (file)
@@ -37,7 +37,7 @@
 #include "mlx5_ib.h"
 #include "srq.h"
 
-static void mlx5_ib_cq_comp(struct mlx5_core_cq *cq)
+static void mlx5_ib_cq_comp(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe)
 {
        struct ib_cq *ibcq = &to_mibcq(cq)->ibcq;
 
index 798aa5e0941e554a6272ebbf836eb99684a0f63e..26b1ce2359ba03d7767787b6fa83499b93acf9c4 100644 (file)
@@ -4492,7 +4492,7 @@ static void mlx5_ib_handle_internal_error(struct mlx5_ib_dev *ibdev)
         * lock/unlock above locks Now need to arm all involved CQs.
         */
        list_for_each_entry(mcq, &cq_armed_list, reset_notify) {
-               mcq->comp(mcq);
+               mcq->comp(mcq, NULL);
        }
        spin_unlock_irqrestore(&ibdev->reset_flow_resource_lock, flags);
 }
index f6623c77443ab07d2ddece4ceb7ec6c360aa9ea8..768c7e81f688169c49455e447de77d6a6f61a89e 100644 (file)
@@ -6297,7 +6297,7 @@ static void handle_drain_completion(struct ib_cq *cq,
                /* Run the CQ handler - this makes sure that the drain WR will
                 * be processed if wasn't processed yet.
                 */
-               mcq->mcq.comp(&mcq->mcq);
+               mcq->mcq.comp(&mcq->mcq, NULL);
        }
 
        wait_for_completion(&sdrain->done);
index 1bd4336392a2d5df14a99ffa8cd74eb1ee1fd83e..818edc63e428fdb86220a3147d8fcc12f7c4ada6 100644 (file)
@@ -58,7 +58,7 @@ void mlx5_cq_tasklet_cb(unsigned long data)
        list_for_each_entry_safe(mcq, temp, &ctx->process_list,
                                 tasklet_ctx.list) {
                list_del_init(&mcq->tasklet_ctx.list);
-               mcq->tasklet_ctx.comp(mcq);
+               mcq->tasklet_ctx.comp(mcq, NULL);
                mlx5_cq_put(mcq);
                if (time_after(jiffies, end))
                        break;
@@ -68,7 +68,8 @@ void mlx5_cq_tasklet_cb(unsigned long data)
                tasklet_schedule(&ctx->task);
 }
 
-static void mlx5_add_cq_to_tasklet(struct mlx5_core_cq *cq)
+static void mlx5_add_cq_to_tasklet(struct mlx5_core_cq *cq,
+                                  struct mlx5_eqe *eqe)
 {
        unsigned long flags;
        struct mlx5_eq_tasklet *tasklet_ctx = cq->tasklet_ctx.priv;
index 3a183d690e235e6457c6148eaf030627b5f6d2ed..16753f26307974467ab98a5029d16609f55bca4e 100644 (file)
@@ -780,7 +780,7 @@ netdev_tx_t mlx5e_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb,
                          struct mlx5e_tx_wqe *wqe, u16 pi, bool xmit_more);
 
 void mlx5e_trigger_irq(struct mlx5e_icosq *sq);
-void mlx5e_completion_event(struct mlx5_core_cq *mcq);
+void mlx5e_completion_event(struct mlx5_core_cq *mcq, struct mlx5_eqe *eqe);
 void mlx5e_cq_error_event(struct mlx5_core_cq *mcq, enum mlx5_event event);
 int mlx5e_napi_poll(struct napi_struct *napi, int budget);
 bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget);
index f9862bf75491bb6da0be989bcd15414ab59ee8c2..c665ae0f22bd340043e01281dba9ab2918c5fc7f 100644 (file)
@@ -136,7 +136,7 @@ int mlx5e_napi_poll(struct napi_struct *napi, int budget)
        return work_done;
 }
 
-void mlx5e_completion_event(struct mlx5_core_cq *mcq)
+void mlx5e_completion_event(struct mlx5_core_cq *mcq, struct mlx5_eqe *eqe)
 {
        struct mlx5e_cq *cq = container_of(mcq, struct mlx5e_cq, mcq);
 
index 678454535460143662be66e8c614df23be27ad0e..41f25ea2e8d9eefaaee7d2b14e668185bed78ff1 100644 (file)
@@ -153,7 +153,7 @@ static int mlx5_eq_comp_int(struct notifier_block *nb,
                cq = mlx5_eq_cq_get(eq, cqn);
                if (likely(cq)) {
                        ++cq->arm_sn;
-                       cq->comp(cq);
+                       cq->comp(cq, eqe);
                        mlx5_cq_put(cq);
                } else {
                        mlx5_core_warn(eq->dev, "Completion event for bogus CQ 0x%x\n", cqn);
index 1fa922698a88ba89129fe3365f04a867e20a5945..4c50efe4e7f11878895a98db4305b52d21bcbb15 100644 (file)
@@ -414,7 +414,8 @@ static void mlx5_fpga_conn_cq_tasklet(unsigned long data)
        mlx5_fpga_conn_cqes(conn, MLX5_FPGA_CQ_BUDGET);
 }
 
-static void mlx5_fpga_conn_cq_complete(struct mlx5_core_cq *mcq)
+static void mlx5_fpga_conn_cq_complete(struct mlx5_core_cq *mcq,
+                                      struct mlx5_eqe *eqe)
 {
        struct mlx5_fpga_conn *conn;
 
index e44157a2b7db6096fdfb2aa5cdca7b4f352bff02..40748fc1b11b996ba129f29549a0c8a7e00d2cd1 100644 (file)
@@ -47,7 +47,7 @@ struct mlx5_core_cq {
        struct completion       free;
        unsigned                vector;
        unsigned int            irqn;
-       void (*comp)            (struct mlx5_core_cq *);
+       void (*comp)(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe);
        void (*event)           (struct mlx5_core_cq *, enum mlx5_event);
        u32                     cons_index;
        unsigned                arm_sn;
@@ -55,7 +55,7 @@ struct mlx5_core_cq {
        int                     pid;
        struct {
                struct list_head list;
-               void (*comp)(struct mlx5_core_cq *);
+               void (*comp)(struct mlx5_core_cq *cq, struct mlx5_eqe *eqe);
                void            *priv;
        } tasklet_ctx;
        int                     reset_notify_added;