From owner-freebsd-bugs@freebsd.org Fri Jun 30 08:39:49 2017 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2F89D8BE81 for ; Fri, 30 Jun 2017 08:39:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EA4389C for ; Fri, 30 Jun 2017 08:39:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v5U8dnq5093273 for ; Fri, 30 Jun 2017 08:39:49 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 220380] [ofed] Cannot bind to the same port after rdma_destroy_id and rdma_create_id Date: Fri, 30 Jun 2017 08:39:49 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: bartosz.sobczak@intel.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2017 08:39:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220380 Bug ID: 220380 Summary: [ofed] Cannot bind to the same port after rdma_destroy_id and rdma_create_id Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: misc Assignee: freebsd-bugs@FreeBSD.org Reporter: bartosz.sobczak@intel.com In case when the addr and port is bound, but the rdma_destroy_id is called instead of connection establishment, there is no possibility of binding to = this port anymore. Reproduce procedure: 1. cm_id =3D rdma_create_id( cma_event_handler, cb, ...); 2. rdma_bind_addr(cm_id, (struct sockaddr *)addr); 3. rdma_listen(cm_id, backlog); 4. rdma_destroy_id(cm_id); 5. cm_id =3D rdma_create_id( cma_event_handler, cb, ...); 6. rdma_bind_addr(cm_id, (struct sockaddr *)addr); //bind unsuccessfull It seems the issue comes from the fact, that in cma_release_port from sys/ofed/drivers/infiniband/core/cma.c a sock_release call has been moved to iw_destroy_cm_id from iwcm.c file. It does work for normal operation, but t= he function is never reached when no connection is established. (compare rdma_destroy_id function in cma.c) --=20 You are receiving this mail because: You are the assignee for the bug.=