From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Or Gerlitz <or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 1/7] libibverbs: Add link layer field port attribute
Date: Wed, 20 Jul 2011 12:33:27 -0600 [thread overview]
Message-ID: <20110720183327.GJ18090@obsidianresearch.com> (raw)
In-Reply-To: <CAJZOPZL9T2XK25BxtOBJj4vW3uSZz4yDWR4wfBxvUaeOgrWU3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Wed, Jul 20, 2011 at 09:20:41PM +0300, Or Gerlitz wrote:
> Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org> wrote:
> > Looks like! Sorry for the confusion
>
> Jason, thanks for your detailed review && feedback, just to recap,
> the patches are okay except the missing entry for the new GID change
> event in ibv_event_type_str which I will add, correct?
Yes, that was the only important thing I saw.
I assume Roland was happy with the #define trick for compatibility
last time it came up?
Looking at the diff, maybe re-shuffle the order of the #define trick
so it is easier to follow, and call ibv_query_port rather than short
cut through the context for better future compatibility.
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index 0f1cb2e..40e8802 100644
@@ -766,6 +774,18 @@ int ibv_query_device(struct ibv_context *context,
*/
int ibv_query_port(struct ibv_context *context, uint8_t port_num,
struct ibv_port_attr *port_attr);
+static inline int ___ibv_query_port(struct ibv_context *context,
+ uint8_t port_num,
+ struct ibv_port_attr *port_attr)
+{
+ /* For compatability linking with old libibverbs */
+ port_attr->link_layer = IBV_LINK_LAYER_UNSPECIFIED;
+ port_attr->pad = 0;
+
+ return ibv_query_port(context,port_num,port_attr);
+}
+#define ibv_query_port(context, port_num, port_attr) \
+ ___ibv_query_port(context, port_num, port_attr)
/**
* ibv_query_gid - Get a GID table entry
--
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:[~2011-07-20 18:33 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-19 9:25 [PATCH 0/7] IBoE user space support Or Gerlitz
[not found] ` <alpine.LRH.2.00.1107191223460.5580-VYr5/9ddeaGSIdy2EShu12Xnswh1EIUO@public.gmane.org>
2011-07-19 9:27 ` [PATCH 1/7] libibverbs: Add link layer field port attribute Or Gerlitz
[not found] ` <alpine.LRH.2.00.1107191226210.5580-VYr5/9ddeaGSIdy2EShu12Xnswh1EIUO@public.gmane.org>
2011-07-19 17:04 ` Jason Gunthorpe
[not found] ` <20110719170454.GD18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 19:36 ` Or Gerlitz
[not found] ` <CAJZOPZ+=3jr18x8Uxt73jAfT0bdPhntOez9dyZfmiHOF5REOSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-19 19:50 ` Jason Gunthorpe
[not found] ` <20110719195020.GE18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 20:22 ` Or Gerlitz
[not found] ` <CAJZOPZ+2S=agGurUC6393e7mqQy4Ob1jaseeoWxeZe2Yu-kCLg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-19 20:31 ` Jason Gunthorpe
[not found] ` <20110719203140.GG18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 21:20 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373136EFE8F-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-07-19 21:39 ` Jason Gunthorpe
[not found] ` <20110719213902.GH18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-20 18:08 ` Or Gerlitz
[not found] ` <CAJZOPZ+HjKiSr=Q6ti9zPfx0YnGXK796xK+Y8fDtLLuM3SnKbA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-20 18:10 ` Jason Gunthorpe
[not found] ` <20110720181052.GI18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-20 18:20 ` Or Gerlitz
[not found] ` <CAJZOPZL9T2XK25BxtOBJj4vW3uSZz4yDWR4wfBxvUaeOgrWU3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-20 18:23 ` Hefty, Sean
2011-07-20 18:33 ` Jason Gunthorpe [this message]
[not found] ` <20110720183327.GJ18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-20 18:47 ` Or Gerlitz
2011-07-20 19:37 ` [PATCH V1 " Or Gerlitz
2011-07-19 9:28 ` [PATCH 2/7] libibverbs: change kernel API to accept link layer Or Gerlitz
2011-07-19 9:30 ` [PATCH 3/7] libibverbs: add GID change event Or Gerlitz
[not found] ` <alpine.LRH.2.00.1107191229210.5580-VYr5/9ddeaGSIdy2EShu12Xnswh1EIUO@public.gmane.org>
2011-07-19 17:00 ` Jason Gunthorpe
[not found] ` <20110719170048.GC18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 19:39 ` Or Gerlitz
2011-07-20 19:38 ` [PATCH V1 " Or Gerlitz
2011-07-19 9:31 ` [PATCH 4/7] libibverbs: Update examples for IBoE Or Gerlitz
[not found] ` <alpine.LRH.2.00.1107191230350.5580-VYr5/9ddeaGSIdy2EShu12Xnswh1EIUO@public.gmane.org>
2011-07-19 16:52 ` Jason Gunthorpe
[not found] ` <20110719165236.GB18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 19:44 ` Or Gerlitz
2011-07-19 9:32 ` [PATCH 5/7] libmlx4: add IBoE support Or Gerlitz
[not found] ` <alpine.LRH.2.00.1107191231540.5580-VYr5/9ddeaGSIdy2EShu12Xnswh1EIUO@public.gmane.org>
2011-07-19 16:49 ` Jason Gunthorpe
[not found] ` <20110719164906.GA18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 19:34 ` Or Gerlitz
[not found] ` <CAJZOPZLsy-EcbCC3FSOLVGL05XBRcdKSYPpt4H+mwAHWrV73vA@mail.gmail.com>
[not found] ` <20110719195528.GF18090@obsidianresearch.com>
[not found] ` <20110719195528.GF18090-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2011-07-19 20:18 ` Or Gerlitz
2011-07-19 9:34 ` [PATCH 6/7] libmlx4: add IBoE UD/VLANs support Or Gerlitz
2011-07-19 9:36 ` [PATCH 7/7] libmlx4: align the list of ConnectX devices supported with the kernel Or Gerlitz
2011-07-20 19:43 ` [PATCH 0/7] IBoE user space support Or Gerlitz
[not found] ` <CAJZOPZJ0JF_biZ32Kf=p6xw4rkm=TzdoMY5AdqMpfWfDRbg69Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-05 18:36 ` Or Gerlitz
[not found] ` <CAJZOPZJRRZX+B=eXKUNTLh684up3_bYievh3PVD_u8QZe3Qb5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-06 15:59 ` Roland Dreier
[not found] ` <CAL1RGDVoCkNRchEtCGeTEJ7Y4-Y-bawCPxxErJ8x9-GrWBbK2g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-09-06 19:58 ` Or Gerlitz
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=20110720183327.GJ18090@obsidianresearch.com \
--to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@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