Re: [rdma-core 3/4] bnxt_re/lib: consolidate hwque and swque in common structure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 03, 2021 at 12:18:01PM +0530, Devesh Sharma wrote:
> Consolidating hardware queue (hwque) and software queue (swque)
> under a single bookkeeping data structure bnxt_re_joint_queue.
> 
> This is to ease the hardware and software queue management. Further
> reduces the size of bnxt_re_qp structure.
> 
> Signed-off-by: Devesh Sharma <devesh.sharma@xxxxxxxxxxxx>
> ---
>  providers/bnxt_re/db.c    |   6 +-
>  providers/bnxt_re/main.h  |  13 ++--
>  providers/bnxt_re/verbs.c | 133 +++++++++++++++++++++-----------------
>  3 files changed, 87 insertions(+), 65 deletions(-)

<...>

>  static void bnxt_re_free_queues(struct bnxt_re_qp *qp)
>  {
> -	if (qp->rqq) {
> -		if (qp->rwrid)
> -			free(qp->rwrid);
> -		pthread_spin_destroy(&qp->rqq->qlock);
> -		bnxt_re_free_aligned(qp->rqq);
> +	if (qp->jrqq) {
> +		if (qp->jrqq->swque)
> +			free(qp->jrqq->swque);

You don't need "if() free()", use "free" directly in all places.

Thanks



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux