* [PATCH net-next] qed: Add EDPM mode type for user-fw compatibility
@ 2020-05-26 6:41 Michal Kalderon
2020-05-26 22:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Michal Kalderon @ 2020-05-26 6:41 UTC (permalink / raw)
To: davem, michal.kalderon, yuval.bason, ariel.elior; +Cc: netdev
From: Yuval Basson <yuval.bason@marvell.com>
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: f10939403352 ("qed: Add support for QP verbs")
Signed-off-by: Yuval Basson <yuval.bason@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
---
drivers/net/ethernet/qlogic/qed/qed_rdma.c | 1 +
drivers/net/ethernet/qlogic/qed/qed_rdma.h | 1 +
drivers/net/ethernet/qlogic/qed/qed_roce.c | 3 +++
include/linux/qed/qed_rdma_if.h | 3 +++
4 files changed, 8 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.c b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
index 50985871cd3d..98455f698f53 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_rdma.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.c
@@ -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);
}
diff --git a/drivers/net/ethernet/qlogic/qed/qed_rdma.h b/drivers/net/ethernet/qlogic/qed/qed_rdma.h
index 5a7ebc764bb6..3898cae61e7a 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_rdma.h
+++ b/drivers/net/ethernet/qlogic/qed/qed_rdma.h
@@ -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)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_roce.c b/drivers/net/ethernet/qlogic/qed/qed_roce.c
index 46a4d09eacef..4566815f7b87 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_roce.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_roce.c
@@ -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;
diff --git a/include/linux/qed/qed_rdma_if.h b/include/linux/qed/qed_rdma_if.h
index f93edd5750a5..584077565f12 100644
--- a/include/linux/qed/qed_rdma_if.h
+++ b/include/linux/qed/qed_rdma_if.h
@@ -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 {
--
2.14.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] qed: Add EDPM mode type for user-fw compatibility
2020-05-26 6:41 [PATCH net-next] qed: Add EDPM mode type for user-fw compatibility Michal Kalderon
@ 2020-05-26 22:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-05-26 22:15 UTC (permalink / raw)
To: michal.kalderon; +Cc: yuval.bason, ariel.elior, netdev
From: Michal Kalderon <michal.kalderon@marvell.com>
Date: Tue, 26 May 2020 09:41:20 +0300
> From: Yuval Basson <yuval.bason@marvell.com>
>
> 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: f10939403352 ("qed: Add support for QP verbs")
> Signed-off-by: Yuval Basson <yuval.bason@marvell.com>
> Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-26 22:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 6:41 [PATCH net-next] qed: Add EDPM mode type for user-fw compatibility Michal Kalderon
2020-05-26 22:15 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.