{
struct rtable *rt;
struct flowi fl;
- u32 dst_ip = dst_in->sin_addr.s_addr;
+ __be32 dst_ip = dst_in->sin_addr.s_addr;
memset(&fl, 0, sizeof fl);
fl.nl_u.ip4_u.daddr = dst_ip;
struct sockaddr_in *dst_in,
struct rdma_dev_addr *addr)
{
- u32 src_ip = src_in->sin_addr.s_addr;
- u32 dst_ip = dst_in->sin_addr.s_addr;
+ __be32 src_ip = src_in->sin_addr.s_addr;
+ __be32 dst_ip = dst_in->sin_addr.s_addr;
struct flowi fl;
struct rtable *rt;
struct neighbour *neigh;
struct rdma_dev_addr *addr)
{
struct net_device *dev;
- u32 src_ip = src_in->sin_addr.s_addr;
+ __be32 src_ip = src_in->sin_addr.s_addr;
__be32 dst_ip = dst_in->sin_addr.s_addr;
int ret;
union cma_ip_addr {
struct in6_addr ip6;
struct {
- __u32 pad[3];
- __u32 addr;
+ __be32 pad[3];
+ __be32 addr;
} ip4;
};
struct cma_hdr {
u8 cma_version;
u8 ip_version; /* IP version: 7:4 */
- __u16 port;
+ __be16 port;
union cma_ip_addr src_addr;
union cma_ip_addr dst_addr;
};
u8 sdp_version; /* Major version: 7:4 */
u8 ip_version; /* IP version: 7:4 */
u8 sdp_specific1[10];
- __u16 port;
- __u16 sdp_specific2;
+ __be16 port;
+ __be16 sdp_specific2;
union cma_ip_addr src_addr;
union cma_ip_addr dst_addr;
};
}
static int cma_get_net_info(void *hdr, enum rdma_port_space ps,
- u8 *ip_ver, __u16 *port,
+ u8 *ip_ver, __be16 *port,
union cma_ip_addr **src, union cma_ip_addr **dst)
{
switch (ps) {
static void cma_save_net_info(struct rdma_addr *addr,
struct rdma_addr *listen_addr,
- u8 ip_ver, __u16 port,
+ u8 ip_ver, __be16 port,
union cma_ip_addr *src, union cma_ip_addr *dst)
{
struct sockaddr_in *listen4, *ip4;
struct rdma_cm_id *id;
struct rdma_route *rt;
union cma_ip_addr *src, *dst;
- __u16 port;
+ __be16 port;
u8 ip_ver;
if (cma_get_net_info(ib_event->private_data, listen_id->ps,
struct rdma_id_private *id_priv;
struct rdma_cm_id *id;
union cma_ip_addr *src, *dst;
- __u16 port;
+ __be16 port;
u8 ip_ver;
int ret;
{
struct cma_hdr *cma_data, *cma_mask;
struct sdp_hh *sdp_data, *sdp_mask;
- __u32 ip4_addr;
+ __be32 ip4_addr;
struct in6_addr ip6_addr;
memset(compare, 0, sizeof *compare);
sdp_set_ip_ver(sdp_data, 4);
sdp_set_ip_ver(sdp_mask, 0xF);
sdp_data->dst_addr.ip4.addr = ip4_addr;
- sdp_mask->dst_addr.ip4.addr = ~0;
+ sdp_mask->dst_addr.ip4.addr = htonl(~0);
} else {
cma_set_ip_ver(cma_data, 4);
cma_set_ip_ver(cma_mask, 0xF);
cma_data->dst_addr.ip4.addr = ip4_addr;
- cma_mask->dst_addr.ip4.addr = ~0;
+ cma_mask->dst_addr.ip4.addr = htonl(~0);
}
break;
case AF_INET6: