Re: [B.A.T.M.A.N.] [RFC] batman-adv: always assume 2-byte packet alignment

Sven Eckelmann
2018-02-03T08:40:53Z

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

On Mittwoch, 24. Januar 2018 14:40:03 CET Sven Eckelmann wrote:
[...]
> I know your intentions and I understand the problem. But there is the chance
> that David Miller will reject this patch - like he did it some years ago
> with a similar (not the same) patch:
>
> "I'm not applying this, please try work to implement this more
> acceptably first." [1]
>
> But maybe he has now some other opinion because the unaligned problem is
> caused by the encapsulation in VXLAN or maybe he has a better idea. At
> least VXLAN encap stuff should affect a lot more net code than batman-adv.
[...]

Looks like we have to assume that David has nothing against the patch and we
should get the patch integrated.

Affected are any kind of access to the 32 bit values:

* &batadv_ogm_packet->seqno
* &batadv_ogm2_packet->seqno
* &batadv_ogm2_packet->throughput
* &batadv_elp_packet->seqno
* &batadv_elp_packet->elp_interval
* &batadv_icmp_tp_packet->seqno
* &batadv_icmp_tp_packet->timestamp
* &batadv_tvlv_gateway_data->bandwidth_down
* &batadv_tvlv_gateway_data->bandwidth_up
* &batadv_tvlv_tt_vlan_data->crc

I personally would love to hear that there is a better way to fix this
problem. But either this or something like the (out of tree) hacks from
OpenWrt [1] seem to be required to work around this problem.

Kind regards,
Sven

[1] https://github.com/openwrt/openwrt/blob/master/target/linux/ar71xx/patches-4.9/910-unaligned_access_hacks.patch