On Tue, 2004-07-20 at 11:02, Neil Horman wrote: > Paul Jones wrote: > > Hi, > > > > ... > > In the case of a NIC that provides different queues and a scheduler for > > QoS at level 2, how could I a device driver be built to allow the linux > > networking code to tell in which queue should a packet be enqueued? > > > > ... > > Thanks in advance, > > > > Paul > > > > I'd have the driver interrogate the QOS or TOS bits of the packet header > to make that determination, you can then use user space tools to define > your QOS/TOS priorities (see man 7 rtnetlink for the CLASS messages, or > the ip utility for details). You could even export a proc sysctl value > to enable or disable QOS/TOS interrogation if you like. > > HTH > Neil > Hi, Funny you should mention this, since its the exact reason I just signed up to this list. I'm working on a 802.15.3a UWB network driver and I'm looking for a simple way to handle both setting QoS parameters and receiving Asynchronous notification back from the driver. As far as setting QoS parameters, I'm currently doing the following: Define a private ioctl() in the driver with which the user-space app can set QoS parms. The app passes its socket file descriptor to the ioctl since I can't find another way to get the socket pointer that the ioctl acted upon. The ioctl then looks up the socket pointer with sockfd_lookup() and stores it in a list of currently configured 'streams', along with the current process info(for sending signals). In the hard_start_xmit() function, I see if the sk_buff->sk->sk_socket pointer is in the list, and if so, place the data into the appropriate queue. If not, it goes in the asynchronous queue. The biggest problem is that there are asynchronous events coming back from the MAC that may need to be passed to the application, such as the far end closing down the 'stream'. I had intended on using signals to indicate this, but realized I can't pass data with them, so I'd have to have the signal handler call back down to the driver to see what happened. The end goal is to come up with a solution that fits well with existing networking apps with as little modification as possible. Thanks, Jason Gaiser www.pulse-link.net - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html