[openbeosnetteam] Re: "No more B_KEEP_LOADED kernel modules" patch

David wrote:
> Just thinking it makes mroe sense to have 2 that are optimised...

For me, it's first one more driver code source to maintain, and 
many duplicate code to handling the basic driver kernel API.
Please, no.
 
> Yeah, but when you call /dev/net/stack for a socket that's OK and not
> strange at all :)

Okay, what about calling it /dev/net/stocket?
Or /dev/net/sacket ?
;-)

> I actually don't think having 2 devices is a bad idea :)

In fact, I was. 
The keep_loaded support was first using a second 
entry, called /dev/net/unload_stack, beside the so-debated 
/dev/net/stack one. 

But I find a better way to do the start/stop request support 
I was looking to have (being able to do it simply, from shell, with 
basic tool like "echo"):

The net_socket_cookie->socket field is set to NULL until libnet.so 
call (if ever) ioctl(fd, NET_SOCKET_CREATE, ...) on it. 
Instead of rejecting any read/write operations on not-a-socket-yet, 
I choose to support writing "start" or "stop" in the write() hook.
That way, no need to publish a second entry, it's one less entry to 
handle for devfs, vfs layer and kernel. 

I was thinking the simpler the better. 
KISS, to be short.

Okay, it's a trick, too, I agree.

> Oh I have lots of grass! Well, not a lot but enough...
> 
> http://www.hodgkinclose.net/albums/david/david3cb878fb9950a.jpg
> 
> My lodger sitting on my front grass making up a hanging basket for me!
> Yes,
> I even have plants and stuff.

You should be joking, right!?
:-)

-Philippe

Other related posts: