Re: [B.A.T.M.A.N.] High latency with batman-adv on ethernet

Sven Eckelmann
2016-10-21T15:53:23Z

[-- Attachment #1: Type: text/plain, Size: 2728 bytes --]

On Freitag, 21. Oktober 2016 23:29:26 CEST johnzeng wrote:
> [root@alarmpi ~]# batctl -v
> batctl 2016.2 [batman-adv: 2016.3]

seems to be recent enough. You can compare my batman-adv settings
by just grepping /sys/class/net/bat0/mesh/*

$ grep '' /sys/class/net/bat0/mesh/*
/sys/class/net/bat0/mesh/aggregated_ogms:enabled
/sys/class/net/bat0/mesh/ap_isolation:disabled
/sys/class/net/bat0/mesh/bonding:disabled
/sys/class/net/bat0/mesh/bridge_loop_avoidance:enabled
/sys/class/net/bat0/mesh/distributed_arp_table:enabled
/sys/class/net/bat0/mesh/fragmentation:enabled
/sys/class/net/bat0/mesh/gw_bandwidth:10.0/2.0 MBit
/sys/class/net/bat0/mesh/gw_mode:off
/sys/class/net/bat0/mesh/gw_sel_class:20
/sys/class/net/bat0/mesh/hop_penalty:30
/sys/class/net/bat0/mesh/isolation_mark:0x00000000/0x00000000
/sys/class/net/bat0/mesh/multicast_mode:enabled
/sys/class/net/bat0/mesh/network_coding:disabled
/sys/class/net/bat0/mesh/orig_interval:1000
/sys/class/net/bat0/mesh/routing_algo:BATMAN_IV

Btw. there are also other things I've mentioned/asked in my first reply.

[...]
> tcpdump from hostA 10.10.130.88
>
>
> [root@alarmpi ~]# tcpdump -i bat0

I said wireshark 2.x and eth0. You maybe can use these dumps to
find out if your hardware delays/drops the packets which batman-adv
encapsulates. Btw. I can not debug your hardware/driver from remote
(when this is a hardware/driver problem).

Anyway, please also read my comment at the end.

You could also dump eth0 and bat0 at the same time to check that the incoming
batadv+icmp-request packet comes out of bat0 as icmp-request packet with
nearly no extra delay. And then you can check that the icmp-reply transmitted
via the bat0 interface is transmitted with nearly no extra delay via the eth0
interface as batadv+icmp-reply.

> from hostB 10.10.130.1 ping hostA 10.10.130.88
[...]
> tcpdump from hostA 10.10.130.88
>
>
> [root@alarmpi ~]# tcpdump -i bat0
> 15:26:17.498686 IP bogon > bogon: ICMP echo request, id 626, seq 1,
> 15:26:18.522626 IP bogon > bogon: ICMP echo reply, id 626, seq 1, length 64
> 15:26:18.523618 IP bogon > bogon: ICMP echo request, id 626, seq 2,
> 15:26:19.244386 IP bogon > bogon: ICMP echo reply, id 626, seq 2, length 64

Are you sure that you are dumping on the system which receives the ping
requests and has to reply to the ping requests? Because then you problem seems
to be above batman-adv. The request was given upwards "15:26:17.498686" from
bat0 (so batman-adv isn't responsible for the packet anymore) and the reply
for it was given to bat0 at "15:26:18.522626". So over 1 second delay caused
by something above the batman-adv layer.

Kind regards,
Sven

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 801 bytes --]