From owner-svn-src-stable@freebsd.org Sun Aug 23 22:04:03 2020 Return-Path: Delivered-To: svn-src-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB6DA3CCCCD; Sun, 23 Aug 2020 22:04:03 +0000 (UTC) (envelope-from tuexen@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BZTmg4W2lz4cJ3; Sun, 23 Aug 2020 22:04:03 +0000 (UTC) (envelope-from tuexen@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7DFDDE0E8; Sun, 23 Aug 2020 22:04:03 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 07NM43IA085653; Sun, 23 Aug 2020 22:04:03 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07NM42Fo085648; Sun, 23 Aug 2020 22:04:02 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008232204.07NM42Fo085648@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 23 Aug 2020 22:04:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r364562 - stable/12/sys/netinet X-SVN-Group: stable-12 X-SVN-Commit-Author: tuexen X-SVN-Commit-Paths: stable/12/sys/netinet X-SVN-Commit-Revision: 364562 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2020 22:04:03 -0000 Author: tuexen Date: Sun Aug 23 22:04:02 2020 New Revision: 364562 URL: https://svnweb.freebsd.org/changeset/base/364562 Log: MFC r359195: More timer cleanups, no functional change. Modified: stable/12/sys/netinet/sctp_asconf.c stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_timer.c stable/12/sys/netinet/sctp_timer.h stable/12/sys/netinet/sctputil.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_asconf.c ============================================================================== --- stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_asconf.c Sun Aug 23 22:04:02 2020 (r364562) @@ -585,8 +585,7 @@ sctp_process_asconf_set_primary(struct sockaddr *src, sctp_move_chunks_from_net(stcb, stcb->asoc.deleted_primary); } - sctp_delete_prim_timer(stcb->sctp_ep, stcb, - stcb->asoc.deleted_primary); + sctp_delete_prim_timer(stcb->sctp_ep, stcb); } } else { /* couldn't set the requested primary address! */ Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_input.c Sun Aug 23 22:04:02 2020 (r364562) @@ -703,8 +703,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk sctp_move_chunks_from_net(stcb, stcb->asoc.deleted_primary); } - sctp_delete_prim_timer(stcb->sctp_ep, stcb, - stcb->asoc.deleted_primary); + sctp_delete_prim_timer(stcb->sctp_ep, stcb); } } } Modified: stable/12/sys/netinet/sctp_timer.c ============================================================================== --- stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_timer.c Sun Aug 23 22:04:02 2020 (r364562) @@ -1264,8 +1264,7 @@ sctp_asconf_timer(struct sctp_inpcb *inp, struct sctp_ /* Mobility adaptation */ void -sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb, - struct sctp_nets *net SCTP_UNUSED) +sctp_delete_prim_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { if (stcb->asoc.deleted_primary == NULL) { SCTPDBG(SCTP_DEBUG_ASCONF1, "delete_prim_timer: deleted_primary is not stored...\n"); @@ -1521,9 +1520,7 @@ sctp_pathmtu_timer(struct sctp_inpcb *inp, } void -sctp_autoclose_timer(struct sctp_inpcb *inp, - struct sctp_tcb *stcb, - struct sctp_nets *net) +sctp_autoclose_timer(struct sctp_inpcb *inp, struct sctp_tcb *stcb) { struct timeval tn, *tim_touse; struct sctp_association *asoc; @@ -1562,7 +1559,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, */ if (SCTP_GET_STATE(stcb) != SCTP_STATE_SHUTDOWN_SENT) { /* only send SHUTDOWN 1st time thru */ - struct sctp_nets *netp; + struct sctp_nets *net; if ((SCTP_GET_STATE(stcb) == SCTP_STATE_OPEN) || (SCTP_GET_STATE(stcb) == SCTP_STATE_SHUTDOWN_RECEIVED)) { @@ -1571,17 +1568,15 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, SCTP_SET_STATE(stcb, SCTP_STATE_SHUTDOWN_SENT); sctp_stop_timers_for_shutdown(stcb); if (stcb->asoc.alternate) { - netp = stcb->asoc.alternate; + net = stcb->asoc.alternate; } else { - netp = stcb->asoc.primary_destination; + net = stcb->asoc.primary_destination; } - sctp_send_shutdown(stcb, netp); + sctp_send_shutdown(stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWN, - stcb->sctp_ep, stcb, - netp); + stcb->sctp_ep, stcb, net); sctp_timer_start(SCTP_TIMER_TYPE_SHUTDOWNGUARD, - stcb->sctp_ep, stcb, - netp); + stcb->sctp_ep, stcb, NULL); } } } else { @@ -1594,8 +1589,7 @@ sctp_autoclose_timer(struct sctp_inpcb *inp, /* fool the timer startup to use the time left */ tmp = asoc->sctp_autoclose_ticks; asoc->sctp_autoclose_ticks -= ticks_gone_by; - sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, - net); + sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL); /* restore the real tick value */ asoc->sctp_autoclose_ticks = tmp; } Modified: stable/12/sys/netinet/sctp_timer.h ============================================================================== --- stable/12/sys/netinet/sctp_timer.h Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctp_timer.h Sun Aug 23 22:04:02 2020 (r364562) @@ -43,9 +43,7 @@ __FBSDID("$FreeBSD$"); #define SCTP_RTT_SHIFT 3 #define SCTP_RTT_VAR_SHIFT 2 -struct sctp_nets * -sctp_find_alternate_net(struct sctp_tcb *, - struct sctp_nets *, int mode); +struct sctp_nets *sctp_find_alternate_net(struct sctp_tcb *, struct sctp_nets *, int); int sctp_t3rxt_timer(struct sctp_inpcb *, struct sctp_tcb *, @@ -82,12 +80,10 @@ sctp_asconf_timer(struct sctp_inpcb *, struct sctp_tcb struct sctp_nets *); void -sctp_delete_prim_timer(struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *); + sctp_delete_prim_timer(struct sctp_inpcb *, struct sctp_tcb *); void -sctp_autoclose_timer(struct sctp_inpcb *, struct sctp_tcb *, - struct sctp_nets *net); + sctp_autoclose_timer(struct sctp_inpcb *, struct sctp_tcb *); void sctp_audit_retranmission_queue(struct sctp_association *); Modified: stable/12/sys/netinet/sctputil.c ============================================================================== --- stable/12/sys/netinet/sctputil.c Sun Aug 23 22:02:19 2020 (r364561) +++ stable/12/sys/netinet/sctputil.c Sun Aug 23 22:04:02 2020 (r364562) @@ -1927,7 +1927,7 @@ sctp_timeout_handler(void *t) break; } SCTP_STAT_INCR(sctps_timoautoclose); - sctp_autoclose_timer(inp, stcb, net); + sctp_autoclose_timer(inp, stcb); sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_AUTOCLOSE_TMR, SCTP_SO_NOT_LOCKED); did_output = 0; break; @@ -1993,7 +1993,7 @@ sctp_timeout_handler(void *t) if ((stcb == NULL) || (inp == NULL)) { break; } - sctp_delete_prim_timer(inp, stcb, net); + sctp_delete_prim_timer(inp, stcb); SCTP_STAT_INCR(sctps_timodelprim); break; default: