Подключил цветную камеру 1.3Мпикс через Gigabit Ethernet (RTL8111 на PCIe). Наблюдаю потери UDP-пакетов порядка 60-70% при приеме.
Что показывает
iperf (PC-->iMX6)
iperf -c 192.168.221.89 -t 3 -i 1 -u -b 1G
------------------------------------------------------------
Client connecting to 192.168.221.89, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size: 208 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.221.99 port 37338 connected with 192.168.221.89 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 96.7 MBytes 811 Mbits/sec
[ 3] 1.0- 2.0 sec 97.0 MBytes 814 Mbits/sec
[ 3] 2.0- 3.0 sec 96.4 MBytes 809 Mbits/sec
[ 3] 0.0- 3.0 sec 290 MBytes 811 Mbits/sec
[ 3] Sent 206994 datagrams
[ 3] Server Report:
[ 3] 0.0- 3.1 sec 188 MBytes 506 Mbits/sec 0.128 ms 72605/206993 (35%)
[ 3] 0.0- 3.1 sec 1 datagrams received out-of-order
iperf (iMX6-->PC)
iperf -c 192.168.221.99 -t 3 -i 1 -u -b 1G
------------------------------------------------------------
Client connecting to 192.168.221.99, UDP port 5001
Sending 1470 byte datagrams, IPG target: 11.76 us (kalman adjust)
UDP buffer size: 160 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.221.89 port 40154 connected with 192.168.221.99 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 1.0 sec 75.7 MBytes 635 Mbits/sec
[ 3] 1.0- 2.0 sec 81.4 MBytes 683 Mbits/sec
[ 3] 0.0- 3.0 sec 239 MBytes 667 Mbits/sec
[ 3] Sent 170200 datagrams
[ 3] Server Report:
[ 3] 0.0- 3.0 sec 239 MBytes 667 Mbits/sec 0.034 ms 0/170200 (0%)
Вот статистика ifconfig: (5.5 Мбайт/с вместо ожидаемых 12 Мбайт/с на небольшом разрешении и FPS)
Every 1s: ifconfig eth1 1970-01-01 00:26:00
eth1 Link encap:Ethernet HWaddr E4:FA:1D:0A:1F:29
inet addr:192.168.221.89 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2975909 errors:0 dropped:0 overruns:0 frame:0
TX packets:2533947 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4159005874 (3.8 GiB) TX bytes:3824093058 (3.5 GiB)
Every 1s: ifconfig eth1 1970-01-01 00:26:01
eth1 Link encap:Ethernet HWaddr E4:FA:1D:0A:1F:29
inet addr:192.168.221.89 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2979557 errors:0 dropped:0 overruns:0 frame:0
TX packets:2533947 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4164515470 (3.8 GiB) TX bytes:3824093058 (3.5 GiB)
Every 1s: ifconfig eth1 1970-01-01 00:26:02
eth1 Link encap:Ethernet HWaddr E4:FA:1D:0A:1F:29
inet addr:192.168.221.89 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2983501 errors:0 dropped:0 overruns:0 frame:0
TX packets:2533948 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4170470328 (3.8 GiB) TX bytes:3824093118 (3.5 GiB)
Вставил мигание светодиодом до и после recfrom():
В общем не получается реализовать прием с цветной гигабитной камеры
Если есть возможность, покажите ваши результаты
iperf на гигабитном канале.
Может у кого есть идеи?