From owner-freebsd-net@FreeBSD.ORG Wed Mar 14 12:50:14 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 89A4716A400 for ; Wed, 14 Mar 2007 12:50:14 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29]) by mx1.freebsd.org (Postfix) with ESMTP id 61FE513C483 for ; Wed, 14 Mar 2007 12:50:14 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 0F07C1F7F4E; Wed, 14 Mar 2007 08:50:14 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by out1.internal (MEProxy); Wed, 14 Mar 2007 08:50:14 -0400 X-Sasl-enc: xTP0CENA3KYZtHAhP5xZIPF8eSlWem4Xs9wRrPXFquns 1173876614 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id CF219BD3B; Wed, 14 Mar 2007 08:50:13 -0400 (EDT) Message-ID: <45F7EF84.5070700@FreeBSD.org> Date: Wed, 14 Mar 2007 12:50:12 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.9 (X11/20070125) MIME-Version: 1.0 To: Yar Tikhiy References: <20070314102023.GB1766@comp.chem.msu.su> In-Reply-To: <20070314102023.GB1766@comp.chem.msu.su> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: Generic ioctl and ether_ioctl don't agree X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2007 12:50:14 -0000 Yar Tikhiy wrote: > Hi folks, > > Quite a while ago I noticed that our ioctl handlers get the ioctl > command via u_long, but ether_ioctl()'s command argument is int. > This disarray dates back to 1998, when ioctl functions started to > take u_long as the command, but ether_ioctl() was never fixed. > Fortunately, our ioctl command coding still fits in 32 bits, or > else we would've got problems on 64-bit arch'es already. I'd like > to fix this long-standing bug some day after RELENG_7 is branched. > Of course, this will break ABI to network modules on all 64-bit > arch'es. BTW, the same applies to other L2 layers, such as firewire, > which seems to have been cloned from if_ethersubr.c. > This is one of those annoying things which breaks compatibility with external modules. I'm not sure about this, though. I was getting sign extension warnings on amd64 last week when I was testing the IGMPv3 aware mtest(8). Perhaps if we're fixing these ABIs, we should commit to an explicit C99 type with known bit width, i.e. uint32_t. I would be much happier if we began using C99 types in the code. Just my 2c. BMS