From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>,
Jeff Squyres <jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: RDMAoE verbs questions
Date: Mon, 7 Dec 2009 19:25:11 +0200 [thread overview]
Message-ID: <20091207172511.GA13496@mtls03> (raw)
In-Reply-To: <ada1vjaukx8.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
On Fri, Dec 04, 2009 at 08:03:31PM -0800, Roland Dreier wrote:
>
> > Yes, every Linux arch aligns structs to the min alignment for the
> > members, so at least 32 in this case.
> >
> > However, it doesn't really matter, look at ibv_cmd_query_port, it
> > doesn't zero the padding. So there must be an ABI bump to ensure that
> > new code links to a library that doesn't fill the new member with
> > garbage.
> >
> > This is a messy one, the low level libraries have to be reved somehow too..
> > ops.query_port2() I guess.
>
> Actually I think we can fix this in libibverbs without having to break
> anything. It's a little bit devious, but if we do something like:
>
> // ... add link_layer member in padding of struct ibv_port_attr
>
> enum {
> IBV_LINK_LAYER_UNSPECIFIED,
> IBV_LINK_LAYER_INFINIBAND,
> IBV_LINK_LAYER_ETHERNET,
> };
>
> static inline int __ibv_query_port(struct ibv_context *context, uint8_t port_num,
> struct ibv_port_attr *port_attr)
> {
> port_attr->link_layer = IBV_LINK_LAYER_UNSPECIFIED;
> return ibv_query_port(context, port_num, port_attr);
> }
>
> // ... rest of file...
>
> #define ibv_query_port(context, port_num, port_attr) \
> __ibv_query_port(context, port_num, port_attr)
>
> then I think legacy apps should be OK (port_attr size doesn't change,
> binary compat is still there), and new apps that do check link_layer
> should also be OK ... if they use an old library and/or old driver,
> they'll see LINK_LAYER_UNSPECIFIED, which means that IBoE is not supported.
>
> What do you think, does this work?
>
> - R.
It looks good to me. Thanks, I will take it for RDMAoE.
--
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
next prev parent reply other threads:[~2009-12-07 17:25 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-24 23:23 RDMAoE verbs questions Jeff Squyres
[not found] ` <209ECE49-3AB9-4E62-B825-54E474321FA6-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25 0:11 ` Jason Gunthorpe
[not found] ` <20091125001136.GP6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-25 2:12 ` Jeff Squyres
[not found] ` <DD0B6BCA-5892-4CA9-8F5D-87C6CC1189DC-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25 4:52 ` Jason Gunthorpe
[not found] ` <20091125045244.GJ1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-25 9:53 ` Pavel Shamis (Pasha)
[not found] ` <4B0CFEAB.70304-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2009-11-25 17:44 ` Jason Gunthorpe
2009-11-25 12:01 ` Jeff Squyres
2009-11-25 14:04 ` Tziporet Koren
[not found] ` <4B0D3982.2040408-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2009-11-25 14:30 ` Jeff Squyres
[not found] ` <7127F20E-2307-492D-B929-A6ACA5A74D14-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25 14:41 ` Eli Cohen
2009-11-25 17:39 ` Jason Gunthorpe
[not found] ` <20091125173917.GK1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-01 20:58 ` Christoph Lameter
2009-11-30 13:34 ` Eli Cohen
2009-11-30 14:03 ` Jeff Squyres
[not found] ` <5A90523D-56AE-4675-AA39-B6876FB32999-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-12-01 14:28 ` Eli Cohen
2009-12-01 21:00 ` Christoph Lameter
2009-11-30 17:21 ` Jason Gunthorpe
2009-11-30 18:50 ` Roland Dreier
[not found] ` <adaiqcrx2xx.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-11-30 19:03 ` Jason Gunthorpe
[not found] ` <20091130190345.GV6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-05 4:03 ` Roland Dreier
[not found] ` <ada1vjaukx8.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-12-05 4:16 ` Jason Gunthorpe
2009-12-07 17:25 ` Eli Cohen [this message]
2009-12-09 19:06 ` Roland Dreier
[not found] ` <adak4wwrmpq.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-12-09 21:48 ` Jason Gunthorpe
[not found] ` <20091209214843.GM6188-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-09 22:31 ` Eli Cohen
2009-11-30 20:01 ` Todd Rimmer
[not found] ` <5AEC2602AE03EB46BFC16C6B9B200DA81691763FEA-e4KNYiSEog6Xx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2009-12-01 16:46 ` Eli Cohen
2009-12-01 14:42 ` Eli Cohen
2009-11-25 7:25 ` Or Gerlitz
[not found] ` <4B0CDBEC.1030203-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-25 11:52 ` Jeff Squyres
[not found] ` <10904370-1D66-4013-BB3F-0F4B5EE581EE-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-11-25 14:59 ` Or Gerlitz
[not found] ` <4B0D4660.5060701-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-25 20:13 ` Pavel Shamis (Pasha)
[not found] ` <4B0D8FD2.9000702-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2009-11-26 7:26 ` Or Gerlitz
[not found] ` <4B0E2DA7.7060809-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-26 9:00 ` Pavel Shamis (Pasha)
[not found] ` <4B0E43BA.6070700-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2009-11-26 11:16 ` Or Gerlitz
2009-11-30 13:54 ` Jeff Squyres
2009-12-02 12:12 ` Eli Cohen
[not found] <F57121538EA0C94F86018DDD40ADA1D101A4E9A6@mtiexch01.mti.com>
[not found] ` <2ED289D4E09FBD4D92D911E869B97FDD01CBE494@mtlexch01.mtl.com>
[not found] ` <2ED289D4E09FBD4D92D911E869B97FDD01CBE494-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-01 16:22 ` Liran Liss
[not found] ` <2ED289D4E09FBD4D92D911E869B97FDD01D0D6F9-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-01 16:27 ` Sean Hefty
[not found] ` <44B4931AF8354AF3BABCCA052150D2BA-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-12-01 17:00 ` Liran Liss
[not found] ` <2ED289D4E09FBD4D92D911E869B97FDD01D0D792-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-02 8:08 ` Or Gerlitz
[not found] ` <000001ca732d$1f99b4d0$5ecd1e70$@com>
2009-12-02 10:49 ` Liran Liss
2009-12-02 10:59 ` Or Gerlitz
2009-12-01 17:46 ` Jason Gunthorpe
[not found] ` <20091201174604.GO1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-02 10:38 ` Liran Liss
[not found] ` <2ED289D4E09FBD4D92D911E869B97FDD01D647E2-ia22CT07NJfiMCgWhms8HQC/G2K4zDHf@public.gmane.org>
2009-12-02 17:33 ` Jason Gunthorpe
[not found] ` <20091202173314.GP1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-12-03 18:26 ` Liran Liss
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=20091207172511.GA13496@mtls03 \
--to=eli-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=jsquyres-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=rdreier-FYB4Gu1CFyUAvxtiuMwx3w@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