]> git.baikalelectronics.ru Git - kernel.git/commitdiff
qed: Add EDPM mode type for user-fw compatibility
authorYuval Basson <yuval.bason@marvell.com>
Tue, 26 May 2020 06:41:20 +0000 (09:41 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 May 2020 22:15:40 +0000 (15:15 -0700)
In older FW versions the completion flag was treated as the ack flag in
edpm messages. Expose the FW option of setting which mode the QP is in
by adding a flag to the qedr <-> qed API.

Flag is added for backward compatibility with libqedr.
This flag will be set by qedr after determining whether the libqedr is
using the updated version.

Fixes: 20cdcc5122df ("qed: Add support for QP verbs")
Signed-off-by: Yuval Basson <yuval.bason@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_rdma.c
drivers/net/ethernet/qlogic/qed/qed_rdma.h
drivers/net/ethernet/qlogic/qed/qed_roce.c
include/linux/qed/qed_rdma_if.h

index 50985871cd3d67a5dfce771fcb12878e253071fa..98455f698f535632598f8bed6ab136af242859cf 100644 (file)
@@ -1378,6 +1378,7 @@ qed_rdma_create_qp(void *rdma_cxt,
                rc = qed_iwarp_create_qp(p_hwfn, qp, out_params);
                qp->qpid = qp->icid;
        } else {
+               qp->edpm_mode = GET_FIELD(in_params->flags, QED_ROCE_EDPM_MODE);
                rc = qed_roce_alloc_cid(p_hwfn, &qp->icid);
                qp->qpid = ((0xFF << 16) | qp->icid);
        }
index 5a7ebc764bb632a83a4fe2248364c6527745bcdc..3898cae61e7af12b31a83f17a4dbf18eea6b3ee3 100644 (file)
@@ -183,6 +183,7 @@ struct qed_rdma_qp {
        void *shared_queue;
        dma_addr_t shared_queue_phys_addr;
        struct qed_iwarp_ep *ep;
+       u8 edpm_mode;
 };
 
 static inline bool qed_rdma_is_xrc_qp(struct qed_rdma_qp *qp)
index 46a4d09eacef95bde318188281d003c4b0915955..4566815f7b876c6b8b8d6eef6455d5615272a8db 100644 (file)
@@ -459,6 +459,9 @@ static int qed_roce_sp_create_requester(struct qed_hwfn *p_hwfn,
                  ROCE_CREATE_QP_REQ_RAMROD_DATA_XRC_FLAG,
                  qed_rdma_is_xrc_qp(qp));
 
+       SET_FIELD(p_ramrod->flags2,
+                 ROCE_CREATE_QP_REQ_RAMROD_DATA_EDPM_MODE, qp->edpm_mode);
+
        p_ramrod->max_ord = qp->max_rd_atomic_req;
        p_ramrod->traffic_class = qp->traffic_class_tos;
        p_ramrod->hop_limit = qp->hop_limit_ttl;
index f93edd5750a58a12e58b75536b1bc8904da1859e..584077565f12648780aa6dce2266ec3e45531df1 100644 (file)
@@ -335,6 +335,9 @@ struct qed_rdma_create_qp_in_params {
        u16 xrcd_id;
        u8 stats_queue;
        enum qed_rdma_qp_type qp_type;
+       u8 flags;
+#define QED_ROCE_EDPM_MODE_MASK      0x1
+#define QED_ROCE_EDPM_MODE_SHIFT     0
 };
 
 struct qed_rdma_create_qp_out_params {