From owner-freebsd-net@FreeBSD.ORG Tue Sep 30 15:33:17 2014 Return-Path: Delivered-To: freebsd-net@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 616A9DB3 for ; Tue, 30 Sep 2014 15:33:17 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3B03ED12 for ; Tue, 30 Sep 2014 15:33:17 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F1A2CB93B; Tue, 30 Sep 2014 11:33:15 -0400 (EDT) From: John Baldwin To: freebsd-net@freebsd.org Subject: Re: Choice of private ioctl approach Date: Tue, 30 Sep 2014 11:31:31 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <54295246.6010502@solarflare.com> In-Reply-To: <54295246.6010502@solarflare.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201409301131.31309.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 30 Sep 2014 11:33:16 -0400 (EDT) Cc: Andrew Rybchenko X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Sep 2014 15:33:17 -0000 On Monday, September 29, 2014 8:36:22 am Andrew Rybchenko wrote: > Hello, > > we need to add private ioctl to the driver sfxge(4) to make FW update, > do internal diagnostics commands etc. > We see at least two approaches in other drivers: > 1. SIOCGPRIVATE_0/ SIOCGPRIVATE_1 on net device > 2. dedicated char device with its own ioctl's > > Is there any recommendations on which way is preferred? I would be inclined towards 2). It is more flexible if you need to add more custom ioctls in the future. -- John Baldwin