简体   繁体   中英

usbnet driver and network subsystem

I am working on a project "AVB" bridging. We are doing audio-video streaming over the ethernet. The packets streaming takes place through the USB. Its like USB-ETH(MAC) chip, with USB connected to the host side. We are using "usbnet.c" driver. And we have two applications(User space processes) :

1) A daemon providing synchronization.

2) A talker program sending audio packets(1722).

There is function pointer implemented in usbnet called .ndo_start_xmit. And we have registered our function using this function pointer so that our implemented function gets called whenever there is a packet to be transmitted from the upper layer. When we run the daemon alone, the system is working pretty much fine. But as soon as we start with the talker program in parallel, for some packets from the daemon, xmit function doesnt get called. The freq. of packets sending from talker program is much high compared to the packets sent by the daemon. So its like the talker program which is also sending packet through the same interface is affecting the behavior of daemon due to this effect. But still in dilemma whether how to resolve this issue...

Let me clear more.

Now suppose I have two applications transmitting packets through the same interface for eg eth6. According to the perceived knowledge we know that when there is a packet to be transmitted .ndo_start_xmit is called. But one of application has a requirement that the packet should be exactly be transmitted out of MAC within 125 msec. When I run 1st application let us name it "A", the packets leave MAC at every calculated 125 msec. THis timing is controlled by application itself. But when I start executing application "B", the "A" application packets doesnt get transmitted out of packet every 125 msec. Because of application B sending packets at 8,000/sec.And "A" sending @ 8/sec.

I think that the software queue in the subsystem that queues all the packets coming from the socket piles up all the "A" application packets along with many "B" application packets and then calls ndo_start_xmit in a row for all the piled up "A" app packets for transmission. And thus we are not able to transmit packets at every 125 msec out of MAC.

我认为您正在寻找的是Linux Hardware Multiqueue API。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM