简体   繁体   English

USB驱动程序和网络子系统

[英]usbnet driver and network subsystem

I am working on a project "AVB" bridging. 我正在进行“ AVB”桥接项目。 We are doing audio-video streaming over the ethernet. 我们正在通过以太网进行音频视频流传输。 The packets streaming takes place through the USB. 数据包流通过USB进行。 Its like USB-ETH(MAC) chip, with USB connected to the host side. 就像USB-ETH(MAC)芯片,USB连接到主机端。 We are using "usbnet.c" driver. 我们正在使用“ usbnet.c”驱动程序。 And we have two applications(User space processes) : 我们有两个应用程序(用户空间进程):

1) A daemon providing synchronization. 1)提供同步的守护程序。

2) A talker program sending audio packets(1722). 2)发话程序发送音频分组(1722)。

There is function pointer implemented in usbnet called .ndo_start_xmit. 在usbnet中有一个名为.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. 但是,一旦我们从并行启动talker程序开始,对于守护程序中的某些数据包,就不会调用xmit函数。 The freq. 频率 of packets sending from talker program is much high compared to the packets sent by the daemon. 与守护程序发送的数据包相比,从talker程序发送的数据包的数量要高得多。 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. 现在假设我有两个应用程序通过同一个接口为eth6传输数据包。 According to the perceived knowledge we know that when there is a packet to be transmitted .ndo_start_xmit is called. 根据已知的知识,我们知道当有一个要发送的数据包时,将调用ndo_start_xmit。 But one of application has a requirement that the packet should be exactly be transmitted out of MAC within 125 msec. 但是,应用之一要求在125毫秒之内将数据包从MAC中准确发送出去。 When I run 1st application let us name it "A", the packets leave MAC at every calculated 125 msec. 当我运行第一个应用程序时,我们将其命名为“ A”,数据包以每计算的125毫秒离开MAC。 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. 但是,当我开始执行应用程序“ B”时,“ A”应用程序数据包不会每125毫秒从数据包中传输出去。 Because of application B sending packets at 8,000/sec.And "A" sending @ 8/sec. 由于应用程序B以8,000 /秒的速度发送数据包,而“ A”以8 /秒的速度发送数据。

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. 我认为子系统中对来自套接字的所有数据包进行排队的软件队列会将所有“ A”应用程序数据包与许多“ B”应用程序数据包一起堆积,然后为所有堆积的“ A”连续调用ndo_start_xmit应用数据包进行传输。 And thus we are not able to transmit packets at every 125 msec out of MAC. 因此,我们无法每125毫秒从MAC传输数据包。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用驱动程序来挂钩网络功能,概述吗? - Hooking network functions using a driver, a high-level overview? 内核网络驱动程序中的netdev_alloc和netdev_priv问题 - Problems with netdev_alloc and netdev_priv in kernel network driver 为什么需要在linux网络驱动程序中获取系统总线的时钟信息? - Why it is required to get clock information of system bus in linux Network driver? / SUBSYSTEM参数的意义-msdn - Significance of /SUBSYSTEM parameter - msdn 如何在 NDIS 6 过滤器驱动程序中启用 802.11 监控模式 (DOT11_OPERATION_MODE_NETWORK_MONITOR)? - How to enable 802.11 monitor mode (DOT11_OPERATION_MODE_NETWORK_MONITOR) in a NDIS 6 filter driver? 如何使用 GCC 和 Linux 子系统为 Windows 编译可执行文件? - How to compile executable for Windows with GCC with Linux Subsystem? 适用于Linux的Windows子系统上的CTRL + D问题 - Issue with CTRL+D on Windows Subsystem for Linux 如何使用输入子系统生成击键事件 - How to generate key strokes events with the Input Subsystem 什么是手表描述符呢? (Linux inotify子系统) - What are watch descriptors really ? (Linux inotify subsystem) 什么是分配子系统的有效堆实现? - What is an efficient heap implementation for an allocation subsystem?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM