Changeset View
Changeset View
Standalone View
Standalone View
sys/ofed/drivers/infiniband/core/ib_cma.c
Show First 20 Lines • Show All 444 Lines • ▼ Show 20 Lines | static inline void sdp_set_ip_ver(struct sdp_hh *hh, u8 ip_ver) | ||||
hh->ipv_cap = (ip_ver << 4) | (hh->ipv_cap & 0xF); | hh->ipv_cap = (ip_ver << 4) | (hh->ipv_cap & 0xF); | ||||
} | } | ||||
static int cma_igmp_send(struct net_device *ndev, const union ib_gid *mgid, bool join) | static int cma_igmp_send(struct net_device *ndev, const union ib_gid *mgid, bool join) | ||||
{ | { | ||||
int retval; | int retval; | ||||
if (ndev) { | if (ndev) { | ||||
union { | union rdma_sockaddr addr; | ||||
struct sockaddr sock; | |||||
struct sockaddr_storage storage; | |||||
} addr; | |||||
rdma_gid2ip(&addr.sock, mgid); | rdma_gid2ip(&addr._sockaddr, mgid); | ||||
CURVNET_SET_QUIET(ndev->if_vnet); | CURVNET_SET_QUIET(ndev->if_vnet); | ||||
if (join) | if (join) | ||||
retval = -if_addmulti(ndev, &addr.sock, NULL); | retval = -if_addmulti(ndev, &addr._sockaddr, NULL); | ||||
else | else | ||||
retval = -if_delmulti(ndev, &addr.sock); | retval = -if_delmulti(ndev, &addr._sockaddr); | ||||
CURVNET_RESTORE(); | CURVNET_RESTORE(); | ||||
} else { | } else { | ||||
retval = -ENODEV; | retval = -ENODEV; | ||||
} | } | ||||
return retval; | return retval; | ||||
} | } | ||||
static void _cma_attach_to_dev(struct rdma_id_private *id_priv, | static void _cma_attach_to_dev(struct rdma_id_private *id_priv, | ||||
▲ Show 20 Lines • Show All 4,151 Lines • Show Last 20 Lines |