utils.c (117697cc935b0ab04ec66274d8e64ccfebd7d0d2) utils.c (10467ce09fefa2e74359f5b2ab1efb8909402f19)
1// SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
2/* Copyright (c) 2015 - 2021 Intel Corporation */
3#include "main.h"
4
5/**
6 * irdma_arp_table -manage arp table
7 * @rf: RDMA PCI function
8 * @ip_addr: ip address for device

--- 2472 unchanged lines hidden (view full) ---

2481 case IRDMA_QP_EVENT_ACCESS_ERR:
2482 ibevent.event = IB_EVENT_QP_ACCESS_ERR;
2483 break;
2484 }
2485 ibevent.device = iwqp->ibqp.device;
2486 ibevent.element.qp = &iwqp->ibqp;
2487 iwqp->ibqp.event_handler(&ibevent, iwqp->ibqp.qp_context);
2488}
1// SPDX-License-Identifier: GPL-2.0 or Linux-OpenIB
2/* Copyright (c) 2015 - 2021 Intel Corporation */
3#include "main.h"
4
5/**
6 * irdma_arp_table -manage arp table
7 * @rf: RDMA PCI function
8 * @ip_addr: ip address for device

--- 2472 unchanged lines hidden (view full) ---

2481 case IRDMA_QP_EVENT_ACCESS_ERR:
2482 ibevent.event = IB_EVENT_QP_ACCESS_ERR;
2483 break;
2484 }
2485 ibevent.device = iwqp->ibqp.device;
2486 ibevent.element.qp = &iwqp->ibqp;
2487 iwqp->ibqp.event_handler(&ibevent, iwqp->ibqp.qp_context);
2488}
2489
2490bool irdma_cq_empty(struct irdma_cq *iwcq)
2491{
2492 struct irdma_cq_uk *ukcq;
2493 u64 qword3;
2494 __le64 *cqe;
2495 u8 polarity;
2496
2497 ukcq = &iwcq->sc_cq.cq_uk;
2498 cqe = IRDMA_GET_CURRENT_CQ_ELEM(ukcq);
2499 get_64bit_val(cqe, 24, &qword3);
2500 polarity = (u8)FIELD_GET(IRDMA_CQ_VALID, qword3);
2501
2502 return polarity != ukcq->polarity;
2503}