From owner-svn-src-stable-12@freebsd.org Mon Aug 24 07:55:48 2020 Return-Path: Delivered-To: svn-src-stable-12@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 3AE163B3B19; Mon, 24 Aug 2020 07:55:48 +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 4BZkvS0rhjz4HV3; Mon, 24 Aug 2020 07:55:48 +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 DA3E01542A; Mon, 24 Aug 2020 07:55:47 +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 07O7tlO5052044; Mon, 24 Aug 2020 07:55:47 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 07O7tkcw052038; Mon, 24 Aug 2020 07:55:46 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <202008240755.07O7tkcw052038@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 24 Aug 2020 07:55:46 +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: r364607 - 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: 364607 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-12@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Aug 2020 07:55:48 -0000 Author: tuexen Date: Mon Aug 24 07:55:46 2020 New Revision: 364607 URL: https://svnweb.freebsd.org/changeset/base/364607 Log: MFC r362106: More cleanups due to ifdef cleanup done upstream. Modified: stable/12/sys/netinet/sctp_constants.h stable/12/sys/netinet/sctp_input.c stable/12/sys/netinet/sctp_pcb.c stable/12/sys/netinet/sctp_pcb.h stable/12/sys/netinet/sctp_structs.h stable/12/sys/netinet/sctp_uio.h Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/sctp_constants.h ============================================================================== --- stable/12/sys/netinet/sctp_constants.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_constants.h Mon Aug 24 07:55:46 2020 (r364607) @@ -1012,7 +1012,7 @@ do { \ do { \ if (inp->sctp_flags & SCTP_PCB_FLAGS_DONT_WAKE) { \ inp->sctp_flags |= SCTP_PCB_FLAGS_WAKEINPUT; \ - SOCKBUF_UNLOCK(&((so)->so_rcv)); \ + SOCKBUF_UNLOCK(&((so)->so_rcv)); \ } else { \ sorwakeup_locked(so); \ } \ Modified: stable/12/sys/netinet/sctp_input.c ============================================================================== --- stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_input.c Mon Aug 24 07:55:46 2020 (r364607) @@ -5723,7 +5723,7 @@ out: return; } -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) extern int *sctp_cpuarry; #endif @@ -5735,7 +5735,7 @@ sctp_input(struct mbuf **mp, int *offp, int proto SCTP m = *mp; off = *offp; -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) if (mp_ncpus > 1) { struct ip *ip; struct sctphdr *sh; Modified: stable/12/sys/netinet/sctp_pcb.c ============================================================================== --- stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_pcb.c Mon Aug 24 07:55:46 2020 (r364607) @@ -5548,18 +5548,14 @@ sctp_del_local_addr_restricted(struct sctp_tcb *stcb, return; } -/* - * Temporarily remove for __APPLE__ until we use the Tiger equivalents - */ /* sysctl */ static int sctp_max_number_of_assoc = SCTP_MAX_NUM_OF_ASOC; static int sctp_scale_up_for_address = SCTP_SCALE_FOR_ADDR; - - -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) struct sctp_mcore_ctrl *sctp_mcore_workers = NULL; int *sctp_cpuarry = NULL; + void sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use) { @@ -5729,13 +5725,13 @@ sctp_pcb_init(void) #if defined(SCTP_LOCAL_TRACE_BUF) memset(&SCTP_BASE_SYSCTL(sctp_log), 0, sizeof(struct sctp_log)); #endif -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) SCTP_MALLOC(SCTP_BASE_STATS, struct sctpstat *, ((mp_maxid + 1) * sizeof(struct sctpstat)), SCTP_M_MCORE); #endif (void)SCTP_GETTIME_TIMEVAL(&tv); -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) memset(SCTP_BASE_STATS, 0, sizeof(struct sctpstat) * (mp_maxid + 1)); SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_sec = (uint32_t)tv.tv_sec; SCTP_BASE_STATS[PCPU_GET(cpuid)].sctps_discontinuitytime.tv_usec = (uint32_t)tv.tv_usec; @@ -5846,7 +5842,7 @@ sctp_pcb_init(void) } sctp_startup_iterator(); -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) sctp_startup_mcore_threads(); #endif @@ -6001,7 +5997,7 @@ retry: SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_strmoq)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf)); SCTP_ZONE_DESTROY(SCTP_BASE_INFO(ipi_zone_asconf_ack)); -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) SCTP_FREE(SCTP_BASE_STATS, SCTP_M_MCORE); #endif } Modified: stable/12/sys/netinet/sctp_pcb.h ============================================================================== --- stable/12/sys/netinet/sctp_pcb.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_pcb.h Mon Aug 24 07:55:46 2020 (r364607) @@ -246,7 +246,7 @@ struct sctp_base_info { * All static structures that anchor the system must be here. */ struct sctp_epinfo sctppcbinfo; -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) struct sctpstat *sctpstat; #else struct sctpstat sctpstat; @@ -478,7 +478,6 @@ struct sctp_tcb { #include -/* TODO where to put non-_KERNEL things for __Userspace__? */ #if defined(_KERNEL) || defined(__Userspace__) /* Attention Julian, this is the extern that @@ -646,7 +645,7 @@ sctp_initiate_iterator(inp_func inpf, end_func ef, struct sctp_inpcb *, uint8_t co_off); -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) void sctp_queue_to_mcore(struct mbuf *m, int off, int cpu_to_use); Modified: stable/12/sys/netinet/sctp_structs.h ============================================================================== --- stable/12/sys/netinet/sctp_structs.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_structs.h Mon Aug 24 07:55:46 2020 (r364607) @@ -109,7 +109,7 @@ typedef void (*asoc_func) (struct sctp_inpcb *, struct typedef int (*inp_func) (struct sctp_inpcb *, void *ptr, uint32_t val); typedef void (*end_func) (void *ptr, uint32_t val); -#if defined(__FreeBSD__) && defined(SCTP_MCORE_INPUT) && defined(SMP) +#if defined(SCTP_MCORE_INPUT) && defined(SMP) /* whats on the mcore control struct */ struct sctp_mcore_queue { TAILQ_ENTRY(sctp_mcore_queue) next; @@ -129,10 +129,7 @@ struct sctp_mcore_ctrl { int running; int cpuid; }; - - #endif - struct sctp_iterator { TAILQ_ENTRY(sctp_iterator) sctp_nxt_itr; Modified: stable/12/sys/netinet/sctp_uio.h ============================================================================== --- stable/12/sys/netinet/sctp_uio.h Mon Aug 24 07:53:14 2020 (r364606) +++ stable/12/sys/netinet/sctp_uio.h Mon Aug 24 07:55:46 2020 (r364607) @@ -1128,7 +1128,7 @@ struct sctpstat { #define SCTP_STAT_INCR(_x) SCTP_STAT_INCR_BY(_x,1) #define SCTP_STAT_DECR(_x) SCTP_STAT_DECR_BY(_x,1) -#if defined(__FreeBSD__) && defined(SMP) && defined(SCTP_USE_PERCPU_STAT) +#if defined(SMP) && defined(SCTP_USE_PERCPU_STAT) #define SCTP_STAT_INCR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x += _d) #define SCTP_STAT_DECR_BY(_x,_d) (SCTP_BASE_STATS[PCPU_GET(cpuid)]._x -= _d) #else