public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: "Hefty, Sean" <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	Yishai Hadas <yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
	<matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
	<majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
	"talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org"
	<talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Subject: Re: [PATCH V4 libibverbs 2/7] Add member functions to poll an extended CQ
Date: Tue, 31 May 2016 12:06:08 -0600	[thread overview]
Message-ID: <20160531180608.GA21834@obsidianresearch.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373AB05CA6D-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Tue, May 31, 2016 at 05:46:38PM +0000, Hefty, Sean wrote:

> These are more thoughts than questions: If an app wants to support
> iWarp/RoCE/OPA, is it just going to have a branch around the calls
> anyway?

This doesn't really change one way or the other, apps have to
understand what attributes are available on the CQ and do whatever
branching is needed to access them.

It is a good question if we should have different accessors, like
get_src_addr(buf,sizeof(buf)) or something that can handle the other
protocols with less hassle.

But at the end of the day, the user will still have to cast the buf to
the right type...

> What data is actually needed by the apps?

The apps decide when they create the CQ what things the CQ is needed
to return. So apps are in control. Are you musing if some of these are
needed or not?

Oh, that reminds me: Yishai, please purge pkey_index from the new
API. It was a mistake in the old API, the standard says it is only
valid for QP1, and we don't support QP1 in user space. Any app that
uses pkey_index is broken. It was a mistake to ever expose this to
userspace.

> Is there any relationship between the various calls?  For example,
> if an app calls read_slid, is it more likely than not to also call
> read_pkey_index and read_dlid_path_bits, etc.?
> Is the app expected to retrieve addressing data piecemeal like this
> for every possible architecture?  Are 5 function calls better than
> one call that fills out a structure, when all fields are needed?

There are certainly logical groups, eg the various path parameters are
almost always going to be needed together.

I was asking this same question.. I think the response was that
memcpying into a stack struct was more expensive than the branches..

I'm skeptical of that, but maybe if the C ABI doesn't use return value
optimization like C++ does it could get a bit costly....

Even so, it seems like an easier API for the end user...

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:[~2016-05-31 18:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29 14:51 [PATCH V4 libibverbs 0/7] Completion timestamping Yishai Hadas
     [not found] ` <1464533475-18949-1-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 14:51   ` [PATCH V4 libibverbs 1/7] Add support for extended creating CQ verb Yishai Hadas
2016-05-29 14:51   ` [PATCH V4 libibverbs 2/7] Add member functions to poll an extended CQ Yishai Hadas
     [not found]     ` <1464533475-18949-3-git-send-email-yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-29 22:38       ` Doug Ledford
     [not found]         ` <574B6F71.9060808-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-29 23:30           ` Jason Gunthorpe
     [not found]             ` <20160529233009.GA12420-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-29 23:47               ` Doug Ledford
     [not found]                 ` <8F7BC9E2-75EC-413B-BEBE-11450225AF06-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-30  1:35                   ` Jason Gunthorpe
     [not found]                     ` <20160530013507.GA19230-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-30  3:39                       ` Doug Ledford
2016-05-31 17:46                       ` Hefty, Sean
     [not found]                         ` <1828884A29C6694DAF28B7E6B8A82373AB05CA6D-P5GAC/sN6hkd3b2yrw5b5LfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2016-05-31 18:06                           ` Jason Gunthorpe [this message]
     [not found]                             ` <20160531180608.GA21834-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-05-31 19:48                               ` Hefty, Sean
2016-05-30  7:47                   ` Matan Barak
     [not found]                     ` <4958edf4-7296-26c9-4cbe-8fab45be11a3-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-30 10:01                       ` Yishai Hadas
     [not found]                     ` <4e8befc4-aec5-a17d-24ce-40ff97d345da@redhat.com>
     [not found]                       ` <4e8befc4-aec5-a17d-24ce-40ff97d345da-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-30 13:50                         ` Doug Ledford
     [not found]                           ` <8708a378-4c48-df98-86a4-d210bbe690b5-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-30 15:01                             ` Matan Barak (External)
     [not found]                               ` <ecdbec76-31cd-74e1-25b4-7d60c3fa2af0-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2016-05-30 17:05                                 ` Jason Gunthorpe
2016-05-29 14:51   ` [PATCH V4 libibverbs 3/7] Add timestamp_mask and hca_core_clock to ibv_query_device_ex Yishai Hadas
2016-05-29 14:51   ` [PATCH V4 libibverbs 4/7] Add completion timestamp to poll_cq Yishai Hadas
2016-05-29 14:51   ` [PATCH V4 libibverbs 5/7] Create a single threaded CQ Yishai Hadas
2016-05-29 14:51   ` [PATCH V4 libibverbs 6/7] Add a verb that queries real time values from the HCA Yishai Hadas
2016-05-29 14:51   ` [PATCH V4 libibverbs 7/7] Add timestamp support in rc_pingpong Yishai Hadas

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=20160531180608.GA21834@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=majd-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=matanb-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=talal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@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