On Mon, Apr 20, 2015 at 12:03:37PM +0300, Haggai Eran wrote: > From: Guy Shapiro <gu...@mellanox.com> > > When receiving a connection request, ib_cm needs to associate the request with > a network namespace. To do this, it needs to know the request's destination > IP. For this the RDMA IP CM packet formatting functionality needs to be > exposed to ib_cm. >
[snip] > + > +int cm_save_net_info(struct sockaddr *src_addr, > + struct sockaddr *dst_addr, > + struct ib_cm_event *ib_event) > +{ > + struct cm_work *work = container_of(ib_event, struct cm_work, cm_event); > + > + if ((rdma_port_get_link_layer(work->port->cm_dev->ib_device, > + work->port->port_num) == > + IB_LINK_LAYER_INFINIBAND) && > + (ib_event->event == IB_CM_REQ_RECEIVED)) { The original code in the RDMA CM had a check for AF_IB. Isn't that needed here as well? Ira > + cm_save_ib_info(src_addr, dst_addr, > + ib_event->param.req_rcvd.primary_path); > + return 0; > + } > + > + return cm_save_ip_info(src_addr, dst_addr, work); > +} > +EXPORT_SYMBOL(cm_save_net_info); > + > struct ib_cm_id *ib_create_cm_id(struct ib_device *device, > ib_cm_handler cm_handler, > void *context) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html