From owner-freebsd-net@freebsd.org Thu Feb 28 01:11:50 2019 Return-Path: Delivered-To: freebsd-net@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 DC07C150C006 for ; Thu, 28 Feb 2019 01:11:49 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from CAN01-QB1-obe.outbound.protection.outlook.com (mail-eopbgr660061.outbound.protection.outlook.com [40.107.66.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C6D06BFEC; Thu, 28 Feb 2019 01:11:46 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM (52.132.89.15) by QB1PR01MB2756.CANPRD01.PROD.OUTLOOK.COM (52.132.87.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1643.21; Thu, 28 Feb 2019 01:11:44 +0000 Received: from QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM ([fe80::609b:1ecd:c908:d44c]) by QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM ([fe80::609b:1ecd:c908:d44c%6]) with mapi id 15.20.1643.022; Thu, 28 Feb 2019 01:11:44 +0000 From: Rick Macklem To: FreeBSD Net CC: "Bjoern A. Zeeb" , "rgrimes@freebsd.org" Subject: use of #ifdef INET and #ifdef INET6 in the kernel sources Thread-Topic: use of #ifdef INET and #ifdef INET6 in the kernel sources Thread-Index: AQHUzwGwHmKnVmR//0yzd/zC2ycfBQ== Date: Thu, 28 Feb 2019 01:11:44 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3f05e774-6e32-476a-aea9-08d69d19b48e x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:QB1PR01MB2756; x-ms-traffictypediagnostic: QB1PR01MB2756: x-microsoft-exchange-diagnostics: =?iso-8859-1?Q?1; QB1PR01MB2756; 23:Yo7a81glokTDaH2sDvWLtdOhQIcPYdVOHCg/k1R?= =?iso-8859-1?Q?y+2w6xlheTE6RmYtjRc1BQpzZ8I5y7lWnLz9mxTfTdpStI/mYjA9lAwUGF?= =?iso-8859-1?Q?utYv9OVybUURlTGTS2H+QBDnjE0zvcPZJkr9JmMvkAny2/RP+H6e4jtCqx?= =?iso-8859-1?Q?dAmr10ET5mKUXQyqFXORM7EN/DbTOcYG73yk4OPZZPOdP/QIr/TnwxBEoH?= =?iso-8859-1?Q?MXyA0Vj4w0f5U7zOd3H1j6sbJXcFUjLa5yp2/x3y8xPM/MijDDl8Yt8AoW?= =?iso-8859-1?Q?Is3DOAEgudorK1Mp0L7brcjLxP+UQrbcvitpd4iQNIcgwHJazH39X8kHr5?= =?iso-8859-1?Q?qN0q4f8oAcCfLtqtLT6IaBUSaJB96EnEKbJ37+DtF5u7ogvAE19KZUBTgM?= =?iso-8859-1?Q?WNSAGEQGJitwOYgNugdEVFVa8I5eBf0gbvaLszVQX3Ion+k+3C7BwjnJju?= =?iso-8859-1?Q?tjFWryu96VVf0SvFkCm50oO30G78jp/65nXhyRRndEFlMgHhpFmRBzh/ks?= =?iso-8859-1?Q?JgsY/ODsWyhxDliIe/3CD4Rb7H3MPspjdhNHCn9o2VOKoy3YW6CNX0CSGn?= =?iso-8859-1?Q?4pCBNt45hg/eioHYGgspzdTeUAlk/sf7lxn7FcPQAcbVSkOBmBWHk+NCyj?= =?iso-8859-1?Q?Wt/+1KxhIUTQLkKunMb/6O/0+UtqFqlD1Lzn6Otc80bbAi5ux56HsDGei/?= =?iso-8859-1?Q?lO8GCJTHsX9gzrJvII1y/PhYz5lhzDmK6bnlFC/ApXAGJYpj7kXjgo/PAE?= =?iso-8859-1?Q?Wk4MdqipEtPU1D97l7j6617/csUQbAQs4tI3Gl2r1Q1bPJzQuVlydXOfS3?= =?iso-8859-1?Q?O/LGxxhEvE1OQSar5slEv/sPmaB+8oIgHqstI2SLRviyNjQG1CnoYPZtmX?= =?iso-8859-1?Q?jZ6dIYe+9cQeU6pdN1hIqVFSbBCQB/lO/zxWkqThqiG1DCm1V2UzYd81z6?= =?iso-8859-1?Q?9LP5isAZrRZPSnZQMV06VekMBqThCy5v4xnGTkOfwVOiM0DiW8k/WNQNR1?= =?iso-8859-1?Q?DqirZptTLmbHxa7dyRKiU9CrhG5xEML5170NY5mDRm9MBDMfq3jFhfgK8L?= =?iso-8859-1?Q?LCbzRc6UBsRdvL01IKJqQf+mtM6sFRAoKxIIWdHo8HyTgfKAlabJKwhhh/?= =?iso-8859-1?Q?6LKEIS5LTjVHXIsr6cAynbOTcow=3D=3D?= x-microsoft-antispam-prvs: x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(136003)(376002)(366004)(396003)(189003)(199004)(9686003)(6436002)(7696005)(256004)(74482002)(5660300002)(71190400001)(68736007)(33656002)(6506007)(46003)(4326008)(55016002)(97736004)(71200400001)(450100002)(86362001)(316002)(786003)(305945005)(25786009)(105586002)(106356001)(476003)(6916009)(486006)(53936002)(478600001)(8936002)(102836004)(14454004)(81166006)(8676002)(81156014)(2906002)(54906003)(99286004)(74316002)(186003)(4744005); DIR:OUT; SFP:1101; SCL:1; SRVR:QB1PR01MB2756; H:QB1PR01MB3537.CANPRD01.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: uoguelph.ca does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: quprNnhNfiroPyAuoa3shOGTG+/3wmfz+yjNJBECwtJvUcw7Jj2YuYiVQnblWHkn0Ch68m5Ubh1onpMDub/t17WKRArd6hDwrUp9NKHm/s8na7th/phQWoi49oBft63NnYJNfbcq1ELaCB7ZgSh4UeR+vnkFZ38pop6mr/EsgRa60lCFG3jyAzfpaXNvB0TUsWDmKfsYzbYY6bwDVIE7I+Zt4MBwhApkD+3hM658gjl0u3HYTilbL+WN1CvrdseenxW+gz4Dc0t5uAQrYPDngVxXUhPt5JUVhYV1Q8StCbBQXVLd0ViuFcHaLr7rkEIb/g3fV6bSswZH6c1gtFJi49v7b4SVvOivrq0anKJBhJePjf872+3C/aP7AgYHqcPlSAzIYrK+SgcdkUotxCQG7SqPaQnbo2nRoCdbG0+A3Ck= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: uoguelph.ca X-MS-Exchange-CrossTenant-Network-Message-Id: 3f05e774-6e32-476a-aea9-08d69d19b48e X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Feb 2019 01:11:44.7516 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: be62a12b-2cad-49a1-a5fa-85f4f3156a7d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: QB1PR01MB2756 X-Rspamd-Queue-Id: 3C6D06BFEC X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of rmacklem@uoguelph.ca designates 40.107.66.61 as permitted sender) smtp.mailfrom=rmacklem@uoguelph.ca X-Spamd-Result: default: False [-1.52 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.76)[-0.761,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:40.107.0.0/16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[uoguelph.ca]; NEURAL_HAM_LONG(-0.90)[-0.897,0]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.45)[0.449,0]; RCVD_COUNT_THREE(0.00)[3]; MX_GOOD(-0.01)[mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com,mx2.hc184-76.ca.iphmx.com,mx1.hc184-76.ca.iphmx.com]; RCVD_IN_DNSWL_NONE(0.00)[61.66.107.40.list.dnswl.org : 127.0.3.0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Feb 2019 01:11:50 -0000 I thought (can't remember when/how I was told) that it was no longer recommended to add #ifdef INET or #ifdef INET6 to the kernel sources. I'll admit I think #ifdef'ng code when it isn't necessary to get it to buil= d makes the code less readable and, as such, I prefer not to do this. So, is this still recommended for blocks of code that only execute for the = version of IP, but will build for kernels that do not have the particular "options = INET{6}" in the kernel config? If it is still recommended, I will do it, but I'll admit I don't understand= why it should be done? (All it does is reduce the size of the executable by a small amoun= t and that doesn't seem significant to me.) rick