DRIVE OS Version: 7.2.5
Error String: N/A
Issue Description: When Velodyne Lidar sends data to multicast IP address the Drive AGX Thor seemingly needs a host-route added to force the interface “binding” selection
Platform
- Drive AGX Thor (thor-a / thor-b), DriveOS / DriveWorks 7.2.x
- Multi-homed: Core LAN
eqos_0(e.g.192.168.1.x) and Data14mgbe0_0(e.g.192.168.14.x) - Velodyne VLS128 / VLP32C on Data14, configrured host address set to an admin-scoped multicast group (e.g.
239.14.1.128:2368)
Goal
Share one Velodyne UDP stream with more than one SoC by aiming the sensor host address at a multicast group and opening lidar.socket with multicast-ip= on each node (as confirmed earlier in prior thread that multicast is supported).
What sample_sensors_info shows
lidar.socket ? ip=X.X.X.X[,dip=X.X.X.X,hres=XXXX],port=XXXX,
device={… VELO_VLP32C, VELO_VLS128, …},scan-frequency=XX.X
[…,multicast-ip=X.X.X.X,decoder=…,time-smoothing=false,secondary=false]
[,output-timestamp=…]
There is a multicast-ip key. There is no documented key for the local interface (or local IP) used for IP_ADD_MEMBERSHIP / IP_ADD_SOURCE_MEMBERSHIP.
dip= is logged as applying only to Ouster / Hesai, not Velodyne.
Observed join behavior
With the sensor sending to 239.14.1.128:2368 and:
device=VELO_VLS128,ip=<sensor-ip>,port=2368,scan-frequency=20,multicast-ip=239.14.1.128
strace shows DW binding the data socket to the multicast address and then:
setsockopt(..., IP_ADD_SOURCE_MEMBERSHIP,
multiaddr=239.14.1.128, interface=0.0.0.0, source=<sensor-ip>) = 0
With imr_interface = INADDR_ANY, the kernel picks the default multicast route. On these Thors that is Core LAN:
$ ip route get 239.14.1.128
multicast 239.14.1.128 dev eqos_0 src 192.168.1.x …
Result: LidarSocket::checkDeviceData, <sensor-ip>:2368 is not connected, even though promiscuous tcpdump -i mgbe0_0 sees the group on Data14.
A userspace ASM join that names the Data14 address works:
IP_ADD_MEMBERSHIP(multiaddr=239.14.1.128, interface=192.168.14.103) → packets received
IP_ADD_SOURCE_MEMBERSHIP(..., interface=0.0.0.0, ...) → 0 packets
Tried (no effect on interface selection; still fails without a Data14 route):
dip=<data14-ip>, dip=<mcast>, iface=, interface=, bind-ip=, multicast-iface=, subscriber=, secondary=true.
Workaround that works
Pin the group to Data14 before opening the sensor on each Thor:
sudo ip route replace 239.14.1.128/32 dev mgbe0_0
After that, ip route get 239.14.1.128 shows dev mgbe0_0, and the same lidar.socket / multicast-ip= string connects on both Thors (including two lidars on two distinct groups, four concurrent opens).
Question
Is there a lidar.socket parameter (or other supported mechanism) to specify the multicast receive interface / local IP used for membership, so multi-homed targets do not depend on a host route workaround?
If not, can that be added (or documented), given multi-SoC sharing via multicast is exactly the use case discussed earlier?