diff options
author | np <np@FreeBSD.org> | 2016-01-22 23:33:34 +0000 |
---|---|---|
committer | np <np@FreeBSD.org> | 2016-01-22 23:33:34 +0000 |
commit | 057d736604eed731d9aa730e87220c4caa227ae3 (patch) | |
tree | 2bc6c60b6ab83ffb2aa3364ef3759bd23b93757e /sys/ofed/include | |
parent | 9a3b34d7631b1ef522add470e0131f1a802f4968 (diff) | |
download | FreeBSD-src-057d736604eed731d9aa730e87220c4caa227ae3.zip FreeBSD-src-057d736604eed731d9aa730e87220c4caa227ae3.tar.gz |
Fix for iWARP servers that listen on INADDR_ANY.
The iWARP Connection Manager (CM) on FreeBSD creates a TCP socket to
represent an iWARP endpoint when the connection is over TCP. For
servers the current approach is to invoke create_listen callback for
each iWARP RNIC registered with the CM. This doesn't work too well for
INADDR_ANY because a listen on any TCP socket already notifies all
hardware TOEs/RNICs of the new listener. This patch fixes the server
side of things for FreeBSD. We've tried to keep all these modifications
in the iWARP/TCP specific parts of the OFED infrastructure as much as
possible.
Submitted by: Krishnamraju Eraparaju @ Chelsio (with design inputs from Steve Wise)
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4801
Diffstat (limited to 'sys/ofed/include')
-rw-r--r-- | sys/ofed/include/rdma/iw_cm.h | 8 | ||||
-rw-r--r-- | sys/ofed/include/rdma/rdma_cm.h | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/sys/ofed/include/rdma/iw_cm.h b/sys/ofed/include/rdma/iw_cm.h index 271c2f8..a246e61 100644 --- a/sys/ofed/include/rdma/iw_cm.h +++ b/sys/ofed/include/rdma/iw_cm.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2005 Network Appliance, Inc. All rights reserved. * Copyright (c) 2005 Open Grid Computing, Inc. All rights reserved. + * Copyright (c) 2016 Chelsio Communications. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -120,10 +121,13 @@ struct iw_cm_verbs { int (*reject)(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len); - int (*create_listen)(struct iw_cm_id *cm_id, + int (*create_listen_ep)(struct iw_cm_id *cm_id, int backlog); - int (*destroy_listen)(struct iw_cm_id *cm_id); + void (*destroy_listen_ep)(struct iw_cm_id *cm_id); + + void (*newconn)(struct iw_cm_id *parent_cm_id, + struct socket *so); }; /** diff --git a/sys/ofed/include/rdma/rdma_cm.h b/sys/ofed/include/rdma/rdma_cm.h index d699261..33be957 100644 --- a/sys/ofed/include/rdma/rdma_cm.h +++ b/sys/ofed/include/rdma/rdma_cm.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2005 Voltaire Inc. All rights reserved. * Copyright (c) 2005 Intel Corporation. All rights reserved. + * Copyright (c) 2016 Chelsio Communications. All rights reserved. * * This software is available to you under a choice of one of two * licenses. You may choose to be licensed under the terms of the GNU @@ -400,5 +401,7 @@ int rdma_set_afonly(struct rdma_cm_id *id, int afonly); * @timeout: QP timeout */ void rdma_set_timeout(struct rdma_cm_id *id, int timeout); - +int rdma_cma_any_addr(struct sockaddr *addr); +int rdma_find_cmid_laddr(struct sockaddr_in *local_addr, + unsigned short dev_type, void **cm_id); #endif /* RDMA_CM_H */ |