From owner-svn-src-all@freebsd.org Sat Oct 29 00:16:44 2016 Return-Path: Delivered-To: svn-src-all@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 D5434C2452D; Sat, 29 Oct 2016 00:16:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (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 7F6F42B6; Sat, 29 Oct 2016 00:16:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9T0GhKT002174; Sat, 29 Oct 2016 00:16:43 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9T0GhfO002173; Sat, 29 Oct 2016 00:16:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201610290016.u9T0GhfO002173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Sat, 29 Oct 2016 00:16:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r308071 - stable/10/sys/dev/cxgbe/tom X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Oct 2016 00:16:44 -0000 Author: jhb Date: Sat Oct 29 00:16:43 2016 New Revision: 308071 URL: https://svnweb.freebsd.org/changeset/base/308071 Log: MFC 272079,272080: cxgbe/tom: Update for syncache_add locking changes. 272079: cxgbe/tom: Catch up with r271119, syncache_add doesn't need tcbinfo lock. 272080: Update comment (missed this bit in r272079). Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_listen.c ============================================================================== --- stable/10/sys/dev/cxgbe/tom/t4_listen.c Fri Oct 28 23:53:37 2016 (r308070) +++ stable/10/sys/dev/cxgbe/tom/t4_listen.c Sat Oct 29 00:16:43 2016 (r308071) @@ -1311,7 +1311,7 @@ do_pass_accept_req(struct sge_iq *iq, co REJECT_PASS_ACCEPT(); rpl = wrtod(wr); - INP_INFO_WLOCK(&V_tcbinfo); /* for 4-tuple check, syncache_add */ + INP_INFO_WLOCK(&V_tcbinfo); /* for 4-tuple check */ /* Don't offload if the 4-tuple is already in use */ if (toe_4tuple_check(&inc, &th, ifp) != 0) { @@ -1319,6 +1319,7 @@ do_pass_accept_req(struct sge_iq *iq, co free(wr, M_CXGBE); REJECT_PASS_ACCEPT(); } + INP_INFO_WUNLOCK(&V_tcbinfo); inp = lctx->inp; /* listening socket, not owned by TOE */ INP_WLOCK(inp); @@ -1331,7 +1332,6 @@ do_pass_accept_req(struct sge_iq *iq, co * resources tied to this listen context. */ INP_WUNLOCK(inp); - INP_INFO_WUNLOCK(&V_tcbinfo); free(wr, M_CXGBE); REJECT_PASS_ACCEPT(); } @@ -1378,12 +1378,10 @@ do_pass_accept_req(struct sge_iq *iq, co /* * If all goes well t4_syncache_respond will get called during - * syncache_add. Also note that syncache_add releases both pcbinfo and - * pcb locks. + * syncache_add. Note that syncache_add releases the pcb lock. */ toe_syncache_add(&inc, &to, &th, inp, tod, synqe); INP_UNLOCK_ASSERT(inp); /* ok to assert, we have a ref on the inp */ - INP_INFO_UNLOCK_ASSERT(&V_tcbinfo); /* * If we replied during syncache_add (synqe->wr has been consumed),