linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Adit Ranadive <aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
Cc: dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	pv-drivers-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org,
	jhansen-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org,
	asarwade-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org,
	georgezhang-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org,
	bryantan-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH v6 12/16] IB/pvrdma: Add Queue Pair support
Date: Mon, 5 Dec 2016 19:25:34 +0200	[thread overview]
Message-ID: <20161205172533.GA14581@yuval-lap> (raw)
In-Reply-To: <20161202130726.GB3663@yuval-lap>

On Fri, Dec 02, 2016 at 03:07:27PM +0200, Yuval Shaia wrote:
> On Sun, Oct 02, 2016 at 07:10:32PM -0700, Adit Ranadive wrote:
> > +		} else {
> > +			qp->is_kernel = true;
> > +
> > +			ret = pvrdma_set_sq_size(to_vdev(pd->device),
> > +						 &init_attr->cap,
> > +						 init_attr->qp_type, qp);
> > +			if (ret)
> > +				goto err_qp;
> > +
> > +			ret = pvrdma_set_rq_size(to_vdev(pd->device),
> > +						 &init_attr->cap, qp);
> > +			if (ret)
> > +				goto err_qp;
> > +
> > +			qp->npages = qp->npages_send + qp->npages_recv;
> 
> Per next comment shouldn't it be:
> qp->npages = qp->npages_send + qp->npages_recv + PAGE_SIZE;
> 
> Otherwise there will be only npages_send - 1 pages for send ring.
> 
> > +
> > +			/* Skip header page. */
> > +			qp->sq.offset = PAGE_SIZE;
> > +
> > +			/* Recv queue pages are after send pages. */
> > +			qp->rq.offset = qp->npages_send * PAGE_SIZE;
> 
> Unless i'm missing something here, per comment it should be:
> qp->rq.offset = qp->sq.offset + qp->npages_send * PAGE_SIZE;

Hi,
Any comments about this question?

> 
> > +		}
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-12-05 17:25 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-03  2:10 [PATCH v6 00/16] Add Paravirtual RDMA Driver Adit Ranadive
     [not found] ` <cover.1475458407.git.aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-10-03  2:10   ` [PATCH v6 01/16] vmxnet3: Move PCI Id to pci_ids.h Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 02/16] IB/pvrdma: Add user-level shared functions Adit Ranadive
     [not found]     ` <515c704574423b16feb4c3d97847156623a8d042.1475458407.git.aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-10-05 13:42       ` Leon Romanovsky
     [not found]         ` <20161005134254.GH9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-05 17:43           ` Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 03/16] IB/pvrdma: Add functions for ring traversal Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 04/16] IB/pvrdma: Add the paravirtual RDMA device specification Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 05/16] IB/pvrdma: Add functions for Verbs support Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 06/16] IB/pvrdma: Add paravirtual rdma device Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 07/16] IB/pvrdma: Add helper functions Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 08/16] IB/pvrdma: Add device command support Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 09/16] IB/pvrdma: Add support for Completion Queues Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 10/16] IB/pvrdma: Add UAR support Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 11/16] IB/pvrdma: Add support for memory regions Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 12/16] IB/pvrdma: Add Queue Pair support Adit Ranadive
     [not found]     ` <6a643e92376856394d45638d80a90619d3abac37.1475458407.git.aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-11-14 11:34       ` Yuval Shaia
     [not found]         ` <20161114113403.GA11338-Hxa29pjIrERMGUUWBy6pNA@public.gmane.org>
2016-12-02 15:37           ` Adit Ranadive
2016-11-21 15:51       ` Yuval Shaia
2016-12-02 15:18         ` Adit Ranadive
2016-12-02 10:35       ` Yuval Shaia
2016-12-02 13:43         ` Yuval Shaia
2016-12-02 13:07       ` Yuval Shaia
2016-12-02 14:36         ` Adit Ranadive
2016-12-05 17:25         ` Yuval Shaia [this message]
2016-12-05 21:21           ` Adit Ranadive
     [not found]             ` <76188e1e-9b9b-07d6-febd-41827a049837-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-12-06  8:00               ` Yuval Shaia
2016-12-11 21:13       ` Yuval Shaia
2016-10-03  2:10   ` [PATCH v6 13/16] IB/pvrdma: Add the main driver module for PVRDMA Adit Ranadive
     [not found]     ` <d52d003f8befeb883a05b5234a90e7d6430218f2.1475458407.git.aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2016-12-08 12:23       ` Yuval Shaia
2016-12-29 22:31         ` Adit Ranadive
     [not found]           ` <eb847a54-6319-66a8-3703-bf942cb29084-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org>
2017-01-02  8:50             ` Yuval Shaia
2016-10-03  2:10   ` [PATCH v6 14/16] IB/pvrdma: Add Kconfig and Makefile Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 15/16] IB: Add PVRDMA driver Adit Ranadive
2016-10-03  2:10   ` [PATCH v6 16/16] MAINTAINERS: Update for " Adit Ranadive
2016-10-05 13:44   ` [PATCH v6 00/16] Add Paravirtual RDMA Driver Leon Romanovsky
     [not found]     ` <20161005134421.GI9282-2ukJVAZIZ/Y@public.gmane.org>
2016-10-21 17:49       ` Adit Ranadive

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161205172533.GA14581@yuval-lap \
    --to=yuval.shaia-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=aditr-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    --cc=asarwade-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    --cc=bryantan-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=georgezhang-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    --cc=jhansen-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=pv-drivers-pghWNbHTmq7QT0dZR+AlfA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).