* [PATCH] rxe: Do not use 'struct sockaddr' in a uapi header
@ 2018-02-07 23:49 Jason Gunthorpe
[not found] ` <20180207234910.GA14608-uk2M96/98Pc@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jason Gunthorpe @ 2018-02-07 23:49 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua
Linux has two 'linux/socket.h' files - and only the one in the kernel
defines struct sockaddr - the user space one does not.
Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
drivers/infiniband/sw/rxe/rxe_av.c | 5 +++--
include/uapi/rdma/rdma_user_rxe.h | 4 +++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/sw/rxe/rxe_av.c b/drivers/infiniband/sw/rxe/rxe_av.c
index 7522d1af3ae2a3..7f1ae364088a07 100644
--- a/drivers/infiniband/sw/rxe/rxe_av.c
+++ b/drivers/infiniband/sw/rxe/rxe_av.c
@@ -74,8 +74,9 @@ void rxe_av_fill_ip_info(struct rxe_av *av,
struct ib_gid_attr *sgid_attr,
union ib_gid *sgid)
{
- rdma_gid2ip(&av->sgid_addr._sockaddr, sgid);
- rdma_gid2ip(&av->dgid_addr._sockaddr, &rdma_ah_read_grh(attr)->dgid);
+ rdma_gid2ip((struct sockaddr *)&av->sgid_addr, sgid);
+ rdma_gid2ip((struct sockaddr *)&av->dgid_addr,
+ &rdma_ah_read_grh(attr)->dgid);
av->network_type = ib_gid_to_network_type(sgid_attr->gid_type, sgid);
}
diff --git a/include/uapi/rdma/rdma_user_rxe.h b/include/uapi/rdma/rdma_user_rxe.h
index bdeea948b2f3a4..e3e6852b58eb45 100644
--- a/include/uapi/rdma/rdma_user_rxe.h
+++ b/include/uapi/rdma/rdma_user_rxe.h
@@ -35,6 +35,9 @@
#define RDMA_USER_RXE_H
#include <linux/types.h>
+#include <linux/socket.h>
+#include <linux/in.h>
+#include <linux/in6.h>
union rxe_gid {
__u8 raw[16];
@@ -57,7 +60,6 @@ struct rxe_av {
__u8 network_type;
struct rxe_global_route grh;
union {
- struct sockaddr _sockaddr;
struct sockaddr_in _sockaddr_in;
struct sockaddr_in6 _sockaddr_in6;
} sgid_addr, dgid_addr;
--
2.16.1
--
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] 2+ messages in thread
* Re: [PATCH] rxe: Do not use 'struct sockaddr' in a uapi header
[not found] ` <20180207234910.GA14608-uk2M96/98Pc@public.gmane.org>
@ 2018-02-14 23:54 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2018-02-14 23:54 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, Moni Shoua
On Wed, Feb 07, 2018 at 04:49:10PM -0700, Jason Gunthorpe wrote:
> Linux has two 'linux/socket.h' files - and only the one in the kernel
> defines struct sockaddr - the user space one does not.
>
> Signed-off-by: Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> drivers/infiniband/sw/rxe/rxe_av.c | 5 +++--
> include/uapi/rdma/rdma_user_rxe.h | 4 +++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
applied to -next
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-14 23:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07 23:49 [PATCH] rxe: Do not use 'struct sockaddr' in a uapi header Jason Gunthorpe
[not found] ` <20180207234910.GA14608-uk2M96/98Pc@public.gmane.org>
2018-02-14 23:54 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).