linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Devesh Sharma <devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 5/5] libbnxt_re: reset head and tail when moving to RST
Date: Fri, 12 May 2017 10:08:24 -0600	[thread overview]
Message-ID: <20170512160824.GA28142@obsidianresearch.com> (raw)
In-Reply-To: <1494584666-11064-6-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>

On Fri, May 12, 2017 at 06:24:26AM -0400, Devesh Sharma wrote:

>  		ibvwc->wc_flags |= IBV_WC_WITH_IMM;
> +		/* Completion reports the raw-data in LE format, While
> +		 * user expects it in BE format. Thus, swapping on outgoing
> +		 * data is needed. On a BE platform le32toh will do the swap
> +		 * while on LE platform htobe32 will do the job.
> +		 */
>  		ibvwc->imm_data = htobe32(le32toh(rcqe->imm_key));

Just to be clear, getting this right is an interop requirement.

Code like the above means the hardware takes byte 0 of the ImmDt
header and writes to byte 3 of rcqe->imm_key.

verbs requires that byte 0 of the ImmDt header is written to byte 0 of
wc->imm_data

Jason
--
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:[~2017-05-12 16:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 10:24 [PATCH 0/5] libbnxt_re: Critical bug fix series Devesh Sharma
     [not found] ` <1494584666-11064-1-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-05-12 10:24   ` [PATCH 1/5] libbnxt_re: sq needs to be augmented by 128B Devesh Sharma
2017-05-12 10:24   ` [PATCH 2/5] libbnxt_re: fix wqe size for the 0-len posting Devesh Sharma
2017-05-12 10:24   ` [PATCH 3/5] libbnxt_re: move rts to rts after a threshold Devesh Sharma
2017-05-12 10:24   ` [PATCH 4/5] libbnxt_re: unmap DB page during uninit ucontext Devesh Sharma
2017-05-12 10:24   ` [PATCH 5/5] libbnxt_re: reset head and tail when moving to RST Devesh Sharma
     [not found]     ` <1494584666-11064-6-git-send-email-devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-05-12 16:08       ` Jason Gunthorpe [this message]
2017-05-13 10:49   ` [PATCH 0/5] libbnxt_re: Critical bug fix series Leon Romanovsky

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=20170512160824.GA28142@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=devesh.sharma-dY08KVG/lbpWk0Htik3J/w@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;
as well as URLs for NNTP newsgroup(s).