Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Oct 2014 15:30:37 +0400
From:      Andrew Rybchenko <arybchenko@solarflare.com>
To:        John Baldwin <jhb@freebsd.org>, <freebsd-net@freebsd.org>
Subject:   Re: Choice of private ioctl approach
Message-ID:  <54327D5D.6010904@solarflare.com>
In-Reply-To: <201409301131.31309.jhb@freebsd.org>
References:  <54295246.6010502@solarflare.com> <201409301131.31309.jhb@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello John,

On 09/30/2014 07:31 PM, John Baldwin wrote:
> 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 m=
ore
> custom ioctls in the future.

Thanks a lot for your reply. It looks like there are no any strong
opinions on the topic.
The problem with 2) is that it adds one more entity and we'd like to
avoid it.
We need more than one request semantically, so we'll have multiplexing
by internal
opcode inside SIOCGPRIVATE_0. I think it is flexible enough.

Best regards,
Andrew.
The information contained in this message is confidential and is intended f=
or the addressee(s) only. If you have received this message in error, pleas=
e notify the sender immediately and delete the message. Unless you are an a=
ddressee (or authorized to receive for an addressee), you may not use, copy=
 or disclose to anyone this message or any information contained in this me=
ssage. The unauthorized use, disclosure, copying or alteration of this mess=
age is strictly prohibited.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?54327D5D.6010904>