public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH rdma-core 2/2] bnxt_re/lib: increament psn in case of 0 length packets
Date: Thu, 9 Nov 2017 11:51:38 +0200	[thread overview]
Message-ID: <20171109095138.GE18825@mtr-leonro.local> (raw)
In-Reply-To: <1510218658-16710-3-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1121 bytes --]

On Thu, Nov 09, 2017 at 04:10:58AM -0500, Devesh Sharma wrote:
> If application posts a 0 length packte, post send routine
> is skipping to increament the psn number. This will cause
> PSN number to go out of sync and evantually connection would
> terminate due to sequence error.
>
> post_send routine must increament the psn number by 1 even
> for zero length packets.

s/increament/increment in all places.

Thanks

>
> Signed-off-by: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
> ---
>  providers/bnxt_re/verbs.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/providers/bnxt_re/verbs.c b/providers/bnxt_re/verbs.c
> index 4d9b044..9d4e02b 100644
> --- a/providers/bnxt_re/verbs.c
> +++ b/providers/bnxt_re/verbs.c
> @@ -1048,6 +1048,8 @@ static void bnxt_re_fill_psns(struct bnxt_re_qp *qp, struct bnxt_re_psns *psns,
>  		pkt_cnt = (len / qp->mtu);
>  		if (len % qp->mtu)
>  			pkt_cnt++;
> +		if (len == 0)
> +			pkt_cnt = 1;
>  		nxt_psn = ((qp->sq_psn + pkt_cnt) & BNXT_RE_PSNS_NPSN_MASK);
>  		psns->flg_npsn = htole32(nxt_psn);
>  		qp->sq_psn = nxt_psn;
> --
> 1.8.3.1
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2017-11-09  9:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-09  9:10 [PATCH rdma-core 0/2] libbnxt_re bug fixes Devesh Sharma
     [not found] ` <1510218658-16710-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-11-09  9:10   ` [PATCH rdma-core 1/2] bnxt_re/lib: fix the memory barrier call during poll-cq Devesh Sharma
2017-11-09  9:10   ` [PATCH rdma-core 2/2] bnxt_re/lib: increament psn in case of 0 length packets Devesh Sharma
     [not found]     ` <1510218658-16710-3-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-11-09  9:51       ` Leon Romanovsky [this message]
     [not found]         ` <20171109095138.GE18825-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-11-09 11:05           ` Devesh Sharma

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=20171109095138.GE18825@mtr-leonro.local \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@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