From owner-svn-src-head@freebsd.org Fri Jun 8 17:37:52 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79D6A10201C2; Fri, 8 Jun 2018 17:37:52 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AF9486C317; Fri, 8 Jun 2018 17:37:50 +0000 (UTC) (envelope-from mmacy@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 DF15B122E0; Fri, 8 Jun 2018 17:37:49 +0000 (UTC) (envelope-from mmacy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w58Hbn4D094582; Fri, 8 Jun 2018 17:37:49 GMT (envelope-from mmacy@FreeBSD.org) Received: (from mmacy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w58HbnWv094580; Fri, 8 Jun 2018 17:37:49 GMT (envelope-from mmacy@FreeBSD.org) Message-Id: <201806081737.w58HbnWv094580@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mmacy set sender to mmacy@FreeBSD.org using -f From: Matt Macy Date: Fri, 8 Jun 2018 17:37:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334843 - head/sys/netinet X-SVN-Group: head X-SVN-Commit-Author: mmacy X-SVN-Commit-Paths: head/sys/netinet X-SVN-Commit-Revision: 334843 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 17:37:52 -0000 Author: mmacy Date: Fri Jun 8 17:37:49 2018 New Revision: 334843 URL: https://svnweb.freebsd.org/changeset/base/334843 Log: avoid 'tcp_outflags defined but not used' Modified: head/sys/netinet/tcp_fsm.h head/sys/netinet/tcp_output.c Modified: head/sys/netinet/tcp_fsm.h ============================================================================== --- head/sys/netinet/tcp_fsm.h Fri Jun 8 17:37:43 2018 (r334842) +++ head/sys/netinet/tcp_fsm.h Fri Jun 8 17:37:49 2018 (r334843) @@ -78,27 +78,8 @@ #define TCPS_HAVERCVDFIN(s) \ ((s) == TCPS_CLOSE_WAIT || ((s) >= TCPS_CLOSING && (s) != TCPS_FIN_WAIT_2)) -#ifdef TCPOUTFLAGS -/* - * Flags used when sending segments in tcp_output. Basic flags (TH_RST, - * TH_ACK,TH_SYN,TH_FIN) are totally determined by state, with the proviso - * that TH_FIN is sent only if all data queued for output is included in the - * segment. - */ -static u_char tcp_outflags[TCP_NSTATES] = { - TH_RST|TH_ACK, /* 0, CLOSED */ - 0, /* 1, LISTEN */ - TH_SYN, /* 2, SYN_SENT */ - TH_SYN|TH_ACK, /* 3, SYN_RECEIVED */ - TH_ACK, /* 4, ESTABLISHED */ - TH_ACK, /* 5, CLOSE_WAIT */ - TH_FIN|TH_ACK, /* 6, FIN_WAIT_1 */ - TH_FIN|TH_ACK, /* 7, CLOSING */ - TH_FIN|TH_ACK, /* 8, LAST_ACK */ - TH_ACK, /* 9, FIN_WAIT_2 */ - TH_ACK, /* 10, TIME_WAIT */ -}; -#endif + +extern u_char tcp_outflags[TCP_NSTATES]; #ifdef KPROF int tcp_acounts[TCP_NSTATES][PRU_NREQ]; Modified: head/sys/netinet/tcp_output.c ============================================================================== --- head/sys/netinet/tcp_output.c Fri Jun 8 17:37:43 2018 (r334842) +++ head/sys/netinet/tcp_output.c Fri Jun 8 17:37:49 2018 (r334843) @@ -169,6 +169,26 @@ hhook_run_tcp_est_out(struct tcpcb *tp, struct tcphdr #endif /* + * Flags used when sending segments in tcp_output. Basic flags (TH_RST, + * TH_ACK,TH_SYN,TH_FIN) are totally determined by state, with the proviso + * that TH_FIN is sent only if all data queued for output is included in the + * segment. + */ +u_char tcp_outflags[TCP_NSTATES] = { + TH_RST|TH_ACK, /* 0, CLOSED */ + 0, /* 1, LISTEN */ + TH_SYN, /* 2, SYN_SENT */ + TH_SYN|TH_ACK, /* 3, SYN_RECEIVED */ + TH_ACK, /* 4, ESTABLISHED */ + TH_ACK, /* 5, CLOSE_WAIT */ + TH_FIN|TH_ACK, /* 6, FIN_WAIT_1 */ + TH_FIN|TH_ACK, /* 7, CLOSING */ + TH_FIN|TH_ACK, /* 8, LAST_ACK */ + TH_ACK, /* 9, FIN_WAIT_2 */ + TH_ACK, /* 10, TIME_WAIT */ +}; + +/* * CC wrapper hook functions */ static void inline