* [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr
@ 2010-08-26 14:19 Eli Cohen
2011-01-04 7:54 ` Or Gerlitz
0 siblings, 1 reply; 6+ messages in thread
From: Eli Cohen @ 2010-08-26 14:19 UTC (permalink / raw)
To: Roland Dreier; +Cc: RDMA list
This field can have one of the values - IBV_LINK_LAYER_UNSPECIFIED,
IBV_LINK_LAYER_INFINIBAND, IBV_LINK_LAYER_ETHERNET. It can be used by
applications to know the link layer used by the port, which can be either
Infiniband or Ethernet. The addition of the new field does not change the size
of struct ibv_port_attr due to alignment of the preceding field. Binary
compatibility is not compromised either since new apps with old libraries will
determine the link layer as IB while old applications with new a new library do
not read this field.
Solution suggested by:
Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Signed-off-by: Eli Cohen <eli-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
---
include/infiniband/verbs.h | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h
index 0f1cb2e..17df3ff 100644
--- a/include/infiniband/verbs.h
+++ b/include/infiniband/verbs.h
@@ -161,6 +161,12 @@ enum ibv_port_state {
IBV_PORT_ACTIVE_DEFER = 5
};
+enum {
+ IBV_LINK_LAYER_UNSPECIFIED,
+ IBV_LINK_LAYER_INFINIBAND,
+ IBV_LINK_LAYER_ETHERNET,
+};
+
struct ibv_port_attr {
enum ibv_port_state state;
enum ibv_mtu max_mtu;
@@ -181,6 +187,8 @@ struct ibv_port_attr {
uint8_t active_width;
uint8_t active_speed;
uint8_t phys_state;
+ uint8_t link_layer;
+ uint8_t pad;
};
enum ibv_event_type {
@@ -693,6 +701,16 @@ struct ibv_context {
void *abi_compat;
};
+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;
+ port_attr->pad = 0;
+
+ return context->ops.query_port(context, port_num, port_attr);
+}
+
/**
* ibv_get_device_list - Get list of IB devices currently available
* @num_devices: optional. if non-NULL, set to the number of devices
@@ -1097,4 +1115,7 @@ END_C_DECLS
# undef __attribute_const
+#define ibv_query_port(context, port_num, port_attr) \
+ ___ibv_query_port(context, port_num, port_attr)
+
#endif /* INFINIBAND_VERBS_H */
--
1.7.2.2
--
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr
2010-08-26 14:19 [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr Eli Cohen
@ 2011-01-04 7:54 ` Or Gerlitz
[not found] ` <4D22D23B.9070504-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2011-01-04 7:54 UTC (permalink / raw)
To: Roland Dreier; +Cc: Eli Cohen, RDMA list
Eli Cohen wrote:
> This field can have one of the values - IBV_LINK_LAYER_UNSPECIFIED,
> IBV_LINK_LAYER_INFINIBAND, IBV_LINK_LAYER_ETHERNET. It can be used by
> applications to know the link layer used by the port, which can be either
> Infiniband or Ethernet. The addition of the new field does not change the size
> of struct ibv_port_attr due to alignment of the preceding field [...]
> Solution suggested by:
> Roland Dreier <rolandd-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Roland,
Are you planning to look into completing the IBoE support for user space any time soon? with v10 of the patch Eli posted four patches to libibverbs and two patch to libmlx4
Or.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr
[not found] ` <4D22D23B.9070504-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
@ 2011-01-04 19:19 ` Roland Dreier
[not found] ` <adawrmkh3yd.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2011-01-04 19:19 UTC (permalink / raw)
To: Or Gerlitz; +Cc: Eli Cohen, RDMA list
> Are you planning to look into completing the IBoE support for user
> space any time soon? with v10 of the patch Eli posted four patches to
> libibverbs and two patch to libmlx4
Yes, I just got back from a long vacation and I want to try and get some
things into my 2.6.38 tree first, and then work on userspace stuff in a
few days.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr
[not found] ` <adawrmkh3yd.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2011-01-04 22:30 ` Or Gerlitz
[not found] ` <AANLkTikKSdA9TxnLd=9jzCSRCeHi3u8A_Bv7Lx98Os8b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Or Gerlitz @ 2011-01-04 22:30 UTC (permalink / raw)
To: Roland Dreier; +Cc: Or Gerlitz, Eli Cohen, RDMA list
Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org> wrote:
> I just got back from a long vacation and I want to try and get some
> things into my 2.6.38 tree first, and then work on userspace stuff in a few days.
sounds great, so what's on the plate for 2.6.38?
Or.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr
[not found] ` <AANLkTikKSdA9TxnLd=9jzCSRCeHi3u8A_Bv7Lx98Os8b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2011-01-04 22:43 ` Roland Dreier
[not found] ` <adawrmkffx0.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Roland Dreier @ 2011-01-04 22:43 UTC (permalink / raw)
To: Or Gerlitz; +Cc: Or Gerlitz, Eli Cohen, RDMA list
> sounds great, so what's on the plate for 2.6.38?
Don't know for sure, just working through the backlog at patchwork,
taking the easier/more obvious stuff first and seeing how far I get.
- R.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr
[not found] ` <adawrmkffx0.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2011-01-05 13:24 ` Or Gerlitz
0 siblings, 0 replies; 6+ messages in thread
From: Or Gerlitz @ 2011-01-05 13:24 UTC (permalink / raw)
To: Roland Dreier, Jason Gunthorpe
Cc: Or Gerlitz, Eli Cohen, RDMA list, Nir Muchtar
Roland Dreier wrote:
> Don't know for sure, just working through the backlog at patchwork,
> taking the easier/more obvious stuff first and seeing how far I get.
The "IB Netlink Interface and RDMA CM exports" patch set is of relatively small volume (but great value...) and has gone through detailed review by Jason, I believe that practically all comments were addressed, Jason, are you acking/signing it?
Or.
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-05 13:24 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-26 14:19 [PATCHv10 1/4] libibverbs: Add link layer field to ibv_port_attr Eli Cohen
2011-01-04 7:54 ` Or Gerlitz
[not found] ` <4D22D23B.9070504-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2011-01-04 19:19 ` Roland Dreier
[not found] ` <adawrmkh3yd.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-04 22:30 ` Or Gerlitz
[not found] ` <AANLkTikKSdA9TxnLd=9jzCSRCeHi3u8A_Bv7Lx98Os8b-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-01-04 22:43 ` Roland Dreier
[not found] ` <adawrmkffx0.fsf-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2011-01-05 13:24 ` Or Gerlitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox