From nobody Sun May 15 10:11:31 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 09AE31AD5C00; Sun, 15 May 2022 10:11:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L1J7l6t9mz3mZm; Sun, 15 May 2022 10:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652609492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJqFIKGVzlsf90izReF9LSAeiKAda9RyMeJ3qoXuRk8=; b=IRsNFxPAbk2cbf0GWjg8E7FCnJNuxzNW2ivWdsn8TXENafX2ToXNCOw/p3GioccfvGKFVx 8H9wXM3PFKm+7rWSrmoiGA27xAMoh9eKiBe7diZiWi4xi6xZpxgW/WZh6tHsjVF2W5fj2Y fdAG8FnEVAb+6unZ2AKYtlcgzCa2BwhRd5Aj8oLAT+3vIp0ANEp7XEEsLoGx+SS+2x79he Y0ijtCU4MvIl458MG69zZDN+4vkP1IrSX2+Miu108zLlghzuR0DE4ZiypY0SUCRufIP4Ce Y/dseR/I1a7PTSXkuU9NfHmUmippujJ/FIzQAk1+vkytab+mhLUi9yUfOgbNOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCB051A1B; Sun, 15 May 2022 10:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24FABVmC032639; Sun, 15 May 2022 10:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24FABVgv032638; Sun, 15 May 2022 10:11:31 GMT (envelope-from git) Date: Sun, 15 May 2022 10:11:31 GMT Message-Id: <202205151011.24FABVgv032638@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: f210e4fbc54a - main - sctp: cleanup, no functional change intended List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f210e4fbc54ab78711bd5197b7097002ff3ae891 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652609492; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KJqFIKGVzlsf90izReF9LSAeiKAda9RyMeJ3qoXuRk8=; b=S/BEswqfl4YhOBZSq4K2mklf94lUVVGf3HY5L9PVtezAHf4ykbVS58QowxwZl6E1ziqNQJ qGQVgCAUU+daTUItIZlr2P1G9tyv1s0Fk174N0Ymun8qiSuXktURer2gjsFwD3iNSBNSNN PMuYt2pO95v2clRkgszuuLmDwhXCfbPBs78GP/70wH685oJ8LkWFKhghkIXAMcYr5jxs7m XxqVqNzWf/46RkEbiN2lwWFVZT6h2aynpwOQeKl4F9PgFI7KzIV/F0ZQbfN1EUzGgKOLlh TmaNSFJdReI5Qeeioa87NnVhDNycYIKsk9B31oXXxwyi2cT5+6+Rwovu8qrLDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652609492; a=rsa-sha256; cv=none; b=u6HUBwtxmodY0DrXbmkuncxj6nErOAxYqVof+Li5vDq4DVgVsmJVuaq7o4YYtj42RNW3PP Wu+gw2OrOk5l/fCybwy7Ky5djCwMEi2S5EfSqXtCzFqzHWG1jSB2bMG9Dh7DWb+pxEgnU0 iKU+G2aQx93LIh18C2mMtp4OpWPGdtfaSM+Li5ryfvnB3jvxg1m3ZmGm7YxQM2Y9Zohex2 MbmC6NrYpTrG1kIhP3QUtQ/h6/XY+jJJ9cmWe+IpGoHSRRh0MfbAUCJn1aWn2dlPYNTpNO Sn4Yo0W1bb8zgjJiUNHpPB7gI+NsUCF3o+3AlM9NXKQL2KqYgC0tkQEexI+cbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=f210e4fbc54ab78711bd5197b7097002ff3ae891 commit f210e4fbc54ab78711bd5197b7097002ff3ae891 Author: Michael Tuexen AuthorDate: 2022-05-14 06:30:41 +0000 Commit: Michael Tuexen CommitDate: 2022-05-14 06:30:41 +0000 sctp: cleanup, no functional change intended MFC after: 3 days --- sys/netinet/sctp_input.c | 2 +- sys/netinet/sctp_usrreq.c | 8 ++------ sys/netinet/sctputil.c | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 2823a38a000f..ff16654968d5 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -992,7 +992,7 @@ sctp_handle_shutdown_ack(struct sctp_shutdown_ack_chunk *cp SCTP_UNUSED, if (stcb->sctp_socket) { if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) || (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL)) { - stcb->sctp_socket->so_snd.sb_cc = 0; + SCTP_SB_CLEAR(stcb->sctp_socket->so_snd); } sctp_ulp_notify(SCTP_NOTIFY_ASSOC_DOWN, stcb, 0, NULL, SCTP_SO_NOT_LOCKED); } diff --git a/sys/netinet/sctp_usrreq.c b/sys/netinet/sctp_usrreq.c index 02075d79e1aa..98102722c53e 100644 --- a/sys/netinet/sctp_usrreq.c +++ b/sys/netinet/sctp_usrreq.c @@ -846,18 +846,14 @@ sctp_flush(struct socket *so, int how) inp->sctp_flags |= SCTP_PCB_FLAGS_SOCKET_CANT_READ; SCTP_INP_READ_UNLOCK(inp); SCTP_INP_WUNLOCK(inp); - so->so_rcv.sb_cc = 0; - so->so_rcv.sb_mbcnt = 0; - so->so_rcv.sb_mb = NULL; + SCTP_SB_CLEAR(so->so_rcv); } if ((how == PRU_FLUSH_WR) || (how == PRU_FLUSH_RDWR)) { /* * First make sure the sb will be happy, we don't use these * except maybe the count */ - so->so_snd.sb_cc = 0; - so->so_snd.sb_mbcnt = 0; - so->so_snd.sb_mb = NULL; + SCTP_SB_CLEAR(so->so_snd); } return (0); } diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index 1f0b52a205fa..8ec934e83cfc 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -5674,7 +5674,7 @@ restart_nosblocks: #ifdef INVARIANTS panic("Huh, its non zero and nothing on control?"); #endif - so->so_rcv.sb_cc = 0; + SCTP_SB_CLEAR(so->so_rcv); } SCTP_INP_READ_UNLOCK(inp); hold_rlock = 0;