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: "linux-rdma
	(linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org)"
	<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [RFC] [OFED] libibverbs: Translate OFED verbs to ibverbs
Date: Thu, 23 Jun 2011 00:45:02 -0600	[thread overview]
Message-ID: <20110623064502.GA8258@obsidianresearch.com> (raw)
In-Reply-To: <1828884A29C6694DAF28B7E6B8A82373029C29-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

On Thu, Jun 23, 2011 at 12:45:23AM +0000, Hefty, Sean wrote:

> The idea is that a single version of libibverbs would support
> both ibverbs and ofverbs via macro magic, with full compatibility with
> ibverbs.  An app would need to be compiled with CFLAGS=-DOFED_VERBS to
> pick up the ofverbs.
 
> This doesn't quite work seamlessly.  I downloaded mvapich2 and built it
> with the following options:
> 
> 
> This failed with
> .../reg_cache/avl.h:42: error: conflicting types for VISIT
> /usr/include/search.h:126: note: previous declaration of VISIT was here
 
> This can probably be worked around by moving the use of search.h into
> an ofed-verbs.c file and exporting ofv_open_xrcd().  (I tried to minimize
> the impact to the upstream libibverbs, hoping it would help make this
> more acceptable for merging.)

Once you create a new linkable symbol you may as well un-inline the
bulk of this emulation..

I don't think this has any place in upstream though, the number of
users of XRC seems too tiny to carry this forever.

> fails with
> ch3_progress.c: In function ?cm_send_pending_1sc_msg?:
> ch3_progress.c:877: error: ?struct ibv_send_wr? has no member
> named ?xrc_remote_srq_num?

You could go like:

verbs.h:

#define ibv_send_wr _real_ibv_send_wr
// rest of verbs.h

#undef ibv_send_wr

#include "ofed-verbs.h"

ofed-verbs.h:

struct ibv_send_wr
{
 // ofa version
}

Then you don't need the #define to get to the correct version.

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:[~2011-06-23  6:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-23  0:45 [RFC] [OFED] libibverbs: Translate OFED verbs to ibverbs Hefty, Sean
     [not found] ` <1828884A29C6694DAF28B7E6B8A82373029C29-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-06-23  6:45   ` Jason Gunthorpe [this message]
     [not found]     ` <20110623064502.GA8258-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-06-23 17:31       ` Hefty, Sean

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=20110623064502.GA8258@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@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