Re: [B.A.T.M.A.N.] [PATCH (maint?) 1/3] batamn-adv: fix elp packet data reservation

Sven Eckelmann
2016-08-21T06:47:28Z

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

On Sonntag, 21. August 2016 05:25:32 CEST Linus Lüssing wrote:
[...]
> @@ -334,8 +333,9 @@ int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface)
> goto out;
>
> skb_reserve(hard_iface->bat_v.elp_skb, ETH_HLEN + NET_IP_ALIGN);
> - elp_buff = skb_push(hard_iface->bat_v.elp_skb, BATADV_ELP_HLEN);
> - elp_packet = (struct batadv_elp_packet *)elp_buff;
> + skb_put(hard_iface->bat_v.elp_skb, BATADV_ELP_HLEN);
> + elp_packet = (struct batadv_elp_packet *)
> + hard_iface->bat_v.elp_skb->data;
> memset(elp_packet, 0, BATADV_ELP_HLEN);
>
> elp_packet->packet_type = BATADV_ELP;
>

I don't get right now why you did the of split the skb_put into two different
"ugly" lines (skb_put + the elp_packet assignment without elp_buff). I fear
that this weird (non)-alignment you've created will bite us when the patch is
submitted upstream.

Maybe you can tell us more about why this removal of elp_buff is necessary.

Btw. please use the prefix "batman-adv" in the subject and not "batamn-adv" ;)

And it is at the moment not important whether it goes into next or
maint. Both will be submitted by Simon to net.git because we are currently
completely off with our timing (compared to the upstream submissions).
I personally would go for maint.

Kind regards,
Sven

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