mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-08 14:23:19 +00:00
RDMA/bnxt_re: Get the toggle bits from SRQ events
SRQ arming requires the toggle bits received from hardware. Get the toggle bits from SRQ notification for the gen p7 adapters. This value will be zero for the older adapters. Signed-off-by: Hongguang Gao <hongguang.gao@broadcom.com> Signed-off-by: Chandramohan Akula <chandramohan.akula@broadcom.com> Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com> Link: https://patch.msgid.link/1724945645-14989-2-git-send-email-selvin.xavier@broadcom.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
e012316d83
commit
640c2cf84e
@ -77,6 +77,7 @@ struct bnxt_re_srq {
|
||||
struct bnxt_qplib_srq qplib_srq;
|
||||
struct ib_umem *umem;
|
||||
spinlock_t lock; /* protect srq */
|
||||
void *uctx_srq_page;
|
||||
};
|
||||
|
||||
struct bnxt_re_qp {
|
||||
|
@ -54,6 +54,10 @@
|
||||
#include "qplib_rcfw.h"
|
||||
#include "qplib_sp.h"
|
||||
#include "qplib_fp.h"
|
||||
#include <rdma/ib_addr.h>
|
||||
#include "bnxt_ulp.h"
|
||||
#include "bnxt_re.h"
|
||||
#include "ib_verbs.h"
|
||||
|
||||
static void __clean_cq(struct bnxt_qplib_cq *cq, u64 qp);
|
||||
|
||||
@ -347,6 +351,7 @@ static void bnxt_qplib_service_nq(struct tasklet_struct *t)
|
||||
case NQ_BASE_TYPE_SRQ_EVENT:
|
||||
{
|
||||
struct bnxt_qplib_srq *srq;
|
||||
struct bnxt_re_srq *srq_p;
|
||||
struct nq_srq_event *nqsrqe =
|
||||
(struct nq_srq_event *)nqe;
|
||||
|
||||
@ -354,6 +359,12 @@ static void bnxt_qplib_service_nq(struct tasklet_struct *t)
|
||||
q_handle |= (u64)le32_to_cpu(nqsrqe->srq_handle_high)
|
||||
<< 32;
|
||||
srq = (struct bnxt_qplib_srq *)q_handle;
|
||||
srq->toggle = (le16_to_cpu(nqe->info10_type) & NQ_CN_TOGGLE_MASK)
|
||||
>> NQ_CN_TOGGLE_SFT;
|
||||
srq->dbinfo.toggle = srq->toggle;
|
||||
srq_p = container_of(srq, struct bnxt_re_srq, qplib_srq);
|
||||
if (srq_p->uctx_srq_page)
|
||||
*((u32 *)srq_p->uctx_srq_page) = srq->toggle;
|
||||
bnxt_qplib_armen_db(&srq->dbinfo,
|
||||
DBC_DBC_TYPE_SRQ_ARMENA);
|
||||
if (nq->srqn_handler(nq,
|
||||
|
@ -105,6 +105,7 @@ struct bnxt_qplib_srq {
|
||||
struct bnxt_qplib_sg_info sg_info;
|
||||
u16 eventq_hw_ring_id;
|
||||
spinlock_t lock; /* protect SRQE link list */
|
||||
u8 toggle;
|
||||
};
|
||||
|
||||
struct bnxt_qplib_sge {
|
||||
|
Loading…
Reference in New Issue
Block a user