Commit 7061f28d authored by Jason Gunthorpe's avatar Jason Gunthorpe

rxe: Do not use 'struct sockaddr' in a uapi header

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: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 5229f87e
...@@ -74,8 +74,9 @@ void rxe_av_fill_ip_info(struct rxe_av *av, ...@@ -74,8 +74,9 @@ void rxe_av_fill_ip_info(struct rxe_av *av,
struct ib_gid_attr *sgid_attr, struct ib_gid_attr *sgid_attr,
union ib_gid *sgid) union ib_gid *sgid)
{ {
rdma_gid2ip(&av->sgid_addr._sockaddr, sgid); rdma_gid2ip((struct sockaddr *)&av->sgid_addr, sgid);
rdma_gid2ip(&av->dgid_addr._sockaddr, &rdma_ah_read_grh(attr)->dgid); 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); av->network_type = ib_gid_to_network_type(sgid_attr->gid_type, sgid);
} }
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
#define RDMA_USER_RXE_H #define RDMA_USER_RXE_H
#include <linux/types.h> #include <linux/types.h>
#include <linux/socket.h>
#include <linux/in.h>
#include <linux/in6.h>
union rxe_gid { union rxe_gid {
__u8 raw[16]; __u8 raw[16];
...@@ -57,7 +60,6 @@ struct rxe_av { ...@@ -57,7 +60,6 @@ struct rxe_av {
__u8 network_type; __u8 network_type;
struct rxe_global_route grh; struct rxe_global_route grh;
union { union {
struct sockaddr _sockaddr;
struct sockaddr_in _sockaddr_in; struct sockaddr_in _sockaddr_in;
struct sockaddr_in6 _sockaddr_in6; struct sockaddr_in6 _sockaddr_in6;
} sgid_addr, dgid_addr; } sgid_addr, dgid_addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment