Re: Communication to device drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Jones wrote:
Hi,

I was studying the linux network code and I think that I could understand most of its code. But one doubt remains and I think that maybe somebody could help me on this issue.

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?

For example, suppose the NIC provides 3 queues and performs some kind of scheduling. This is all done in the NICs hardware. Well, whenever a packet is transmited, it is done by sending an sk_buff to the device driver through the hard_start_xmit function. But how could I tell the device driver to put this packet in the queue number 1, 2 or 3? How could this interface be done? Is there any implementation that already do this for any kind of hardware? This could be useful for example for 802.11e devices, that will present multiple queues and the networking code should somehow be able to tell to which queue a packet should go... How could this be done?

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


-- /*************************************************** *Neil Horman *Software Engineer *Red Hat, Inc. *nhorman@redhat.com *gpg keyid: 1024D / 0x92A74FA1 *http://pgp.mit.edu ***************************************************/ - : 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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux