public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Vladimir Sokolovsky
	<vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Cc: linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH V2 1/2] IB/core: Add support for enhanced atomic operations
Date: Thu, 25 Feb 2010 15:38:40 -0800	[thread overview]
Message-ID: <adaljegx4vz.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <20100214135128.GA7607@vlad-laptop> (Vladimir Sokolovsky's message of "Sun, 14 Feb 2010 15:51:28 +0200")

I think I'd be OK adding this for 2.6.34, if there were some case made
that this would be useful for someone working on code that used this.
So what case can be made for adding this to 2.6.34 without an in-tree user?

 > - Add a new IB_WR_ATOMIC_MASKED_CMP_AND_SWP and IB_WR_ATOMIC_MASKED_FETCH_AND_ADD send
 > opcodes that can be used to mark a "masked atomic compare and swap" and
 > "masked atomic fetch and add" work request correspondingly.
 > - Add IB_DEVICE_MASKED_ATOMIC capability bit.
 > - Add mask fields to atomic struct of ib_send_wr
 > - Add new opcodes to ib_wc_opcode

The description of these operations from the mlx4 patch really belongs
here.

 > +	IB_WR_ATOMIC_MASKED_CMP_AND_SWP,
 > +	IB_WR_ATOMIC_MASKED_FETCH_AND_ADD,

Even in your description you talk about "masked atomic..." which makes
the ATOMIC_MASKED read a little strangely.  These enum values would make
more sense as:

	IB_WR_MASKED_ATOMIC_CMP_AND_SWP,
	IB_WR_MASKED_ATOMIC_FETCH_AND_ADD,

 >  			u64	swap;
 >  			u32	rkey;
 > +			u64	compare_add_mask;
 > +			u64	swap_mask;

It doesn't make any practical difference here, but it would be cleaner
to add the new fields before the rkey field, so that we don't leave a
hole due to padding.

 - R.
-- 
Roland Dreier  <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.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

  reply	other threads:[~2010-02-25 23:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-14 13:51 [PATCH V2 1/2] IB/core: Add support for enhanced atomic operations Vladimir Sokolovsky
2010-02-25 23:38 ` Roland Dreier [this message]
     [not found]   ` <adaljegx4vz.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2010-02-28 21:09     ` Andy Grover
     [not found]       ` <4B8ADB89.3010700-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2010-03-01 16:13         ` Håkon Bugge

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=adaljegx4vz.fsf@roland-alpha.cisco.com \
    --to=rdreier-fyb4gu1cfyuavxtiumwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=vlad-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@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