From owner-svn-src-head@FreeBSD.ORG Sun Nov 9 22:38:08 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA844A72; Sun, 9 Nov 2014 22:38:08 +0000 (UTC) Received: from mail106.syd.optusnet.com.au (mail106.syd.optusnet.com.au [211.29.132.42]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6D3CD5; Sun, 9 Nov 2014 22:38:08 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail106.syd.optusnet.com.au (Postfix) with ESMTPS id BC5BD3C2D5A; Mon, 10 Nov 2014 09:38:00 +1100 (AEDT) Date: Mon, 10 Nov 2014 09:38:00 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Konstantin Belousov Subject: Re: svn commit: r274315 - in head/sys/netpfil: ipfw pf In-Reply-To: <20141109170737.GB53947@kib.kiev.ua> Message-ID: <20141110092221.E903@besplex.bde.org> References: <201411091615.sA9GFTL6052510@svn.freebsd.org> <20141109162927.GA53947@kib.kiev.ua> <545F9D90.1000901@FreeBSD.org> <20141109170737.GB53947@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=BdjhjNd2 c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=Zd1L08CrHkzd07uKUEUA:9 a=CjuIK1q_8ugA:10 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, "Alexander V. Chernikov" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 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: Sun, 09 Nov 2014 22:38:09 -0000 On Sun, 9 Nov 2014, Konstantin Belousov wrote: > On Sun, Nov 09, 2014 at 09:00:00PM +0400, Alexander V. Chernikov wrote: >> On 09.11.2014 20:29, Konstantin Belousov wrote: >>> On Sun, Nov 09, 2014 at 04:15:29PM +0000, Alexander V. Chernikov wrote: >>>> Author: melifaro >>>> Date: Sun Nov 9 16:15:28 2014 >>>> New Revision: 274315 >>>> URL: https://svnweb.freebsd.org/changeset/base/274315 >>>> >>>> Log: >>>> Remove unused 'struct route' fields. >>>> >>>> Modified: >>>> head/sys/netpfil/ipfw/ip_fw_private.h >>>> head/sys/netpfil/pf/pf.c >>>> >>>> Modified: head/sys/netpfil/ipfw/ip_fw_private.h >>>> ============================================================================== >>>> --- head/sys/netpfil/ipfw/ip_fw_private.h Sun Nov 9 15:53:29 2014 (r274314) >>>> +++ head/sys/netpfil/ipfw/ip_fw_private.h Sun Nov 9 16:15:28 2014 (r274315) >>>> @@ -66,14 +66,12 @@ enum { >>>> */ >>>> struct _ip6dn_args { >>>> struct ip6_pktopts *opt_or; >>>> - struct route_in6 ro_or; >>>> int flags_or; >>>> struct ip6_moptions *im6o_or; >>>> struct ifnet *origifp_or; >>>> struct ifnet *ifp_or; >>>> struct sockaddr_in6 dst_or; >>>> u_long mtu_or; >>>> - struct route_in6 ro_pmtu_or; >>>> }; >>>> >>>> >>>> >>>> Modified: head/sys/netpfil/pf/pf.c >>>> ============================================================================== >>>> --- head/sys/netpfil/pf/pf.c Sun Nov 9 15:53:29 2014 (r274314) >>>> +++ head/sys/netpfil/pf/pf.c Sun Nov 9 16:15:28 2014 (r274315) >>>> @@ -140,14 +140,12 @@ struct pf_send_entry { >>>> PFSE_ICMP6, >>>> } pfse_type; >>>> union { >>>> - struct route ro; >>>> struct { >>>> int type; >>>> int code; >>>> int mtu; >>>> } icmpopts; >>>> } u; >>> There is a single member of union u now. Is the union needed still ? >> No. Fixed in r274320, thank you! > Well, next question is why icmpopts is struct, instead of using > directly members of the containing structure. It made sense when icmpopts > was overlapped with ro, but for what it is kept around now ? > >>> >>>> -#define pfse_ro u.ro >>>> #define pfse_icmp_type u.icmpopts.type >>>> #define pfse_icmp_code u.icmpopts.code >>>> #define pfse_icmp_mtu u.icmpopts.mtu Question after the next is why the struct member names and indentation are so bad. The short names (without unique prefixes) made some sense for nested struct/union member names. Full, excessively verbose prefixes were used in the #defined values. Now, no prefixes are used for the replacements. Bruce