From owner-svn-src-all@freebsd.org Mon Apr 18 16:56:35 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 6377EB1323A; Mon, 18 Apr 2016 16:56:35 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from drew.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2FB7C1D5B; Mon, 18 Apr 2016 16:56:35 +0000 (UTC) (envelope-from tuexen@freebsd.org) Received: from [192.168.1.102] (p508F0542.dip0.t-ipconnect.de [80.143.5.66]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTPSA id 21EB0721E280E; Mon, 18 Apr 2016 18:56:30 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: svn commit: r298187 - head/sys/netinet From: Michael Tuexen In-Reply-To: <1460992087.52955.47.camel@freebsd.org> Date: Mon, 18 Apr 2016 18:56:29 +0200 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <0BC0F7D1-9523-4FE6-A6ED-57372CC80206@freebsd.org> References: <201604180638.u3I6cs5P043229@repo.freebsd.org> <1460992087.52955.47.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.3124) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 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: Mon, 18 Apr 2016 16:56:35 -0000 > On 18 Apr 2016, at 17:08, Ian Lepore wrote: > > On Mon, 2016-04-18 at 06:38 +0000, Michael Tuexen wrote: >> Author: tuexen >> Date: Mon Apr 18 06:38:53 2016 >> New Revision: 298187 >> URL: https://svnweb.freebsd.org/changeset/base/298187 >> >> Log: >> Don't use anonymous unions. >> > > Why not? This is one of those commit messages that really needs to say Because the same code is used in a userland SCTP stack and that uses C99. Anonymous unions are introduced in C11. That's why. > WHY the change is happening more than WHAT is happening. Will try to provide better commit messages. Best regards Michael > > -- Ian > >> Modified: >> head/sys/netinet/sctp_header.h >> head/sys/netinet/sctp_indata.c >> head/sys/netinet/sctp_output.c >> >> Modified: head/sys/netinet/sctp_header.h >> ===================================================================== >> ========= >> --- head/sys/netinet/sctp_header.h Mon Apr 18 06:32:24 2016 >> (r298186) >> +++ head/sys/netinet/sctp_header.h Mon Apr 18 06:38:53 2016 >> (r298187) >> @@ -160,7 +160,7 @@ struct sctp_idata { >> union { >> uint32_t protocol_id; >> uint32_t fsn; /* Fragment Sequence Number */ >> - }; >> + } ppid_fsn; >> /* user data follows */ >> } SCTP_PACKED; >> >> >> Modified: head/sys/netinet/sctp_indata.c >> ===================================================================== >> ========= >> --- head/sys/netinet/sctp_indata.c Mon Apr 18 06:32:24 2016 >> (r298186) >> +++ head/sys/netinet/sctp_indata.c Mon Apr 18 06:38:53 2016 >> (r298187) >> @@ -1558,7 +1558,7 @@ sctp_process_a_data_chunk(struct sctp_tc >> if (ch->ch.chunk_flags & SCTP_DATA_FIRST_FRAG) >> fsn = 0; >> else >> - fsn = ntohl(nch->dp.fsn); >> + fsn = ntohl(nch->dp.ppid_fsn.fsn); >> old_data = 0; >> } else { >> ch = (struct sctp_data_chunk *)sctp_m_getptr(*m, >> offset, >> >> Modified: head/sys/netinet/sctp_output.c >> ===================================================================== >> ========= >> --- head/sys/netinet/sctp_output.c Mon Apr 18 06:32:24 2016 >> (r298186) >> +++ head/sys/netinet/sctp_output.c Mon Apr 18 06:38:53 2016 >> (r298187) >> @@ -7641,9 +7641,9 @@ dont_do_it: >> ndchkh->dp.reserved = htons(0); >> ndchkh->dp.msg_id = htonl(sp->msg_id); >> if (sp->fsn == 0) >> - ndchkh->dp.protocol_id = chk >> ->rec.data.payloadtype; >> + ndchkh->dp.ppid_fsn.protocol_id = chk >> ->rec.data.payloadtype; >> else >> - ndchkh->dp.fsn = htonl(sp->fsn); >> + ndchkh->dp.ppid_fsn.fsn = htonl(sp->fsn); >> sp->fsn++; >> ndchkh->ch.chunk_length = htons(chk->send_size); >> } >>