Subject: Re: [PATCH] bridge: Add support for IEEE 802.11 Proxy ARP for IPv6

From: Stephen Hemminger <[email-masked]>
Date: Fri, 24 Feb 2017 11:55:37 -0800

The concept is fine.

Please add some comments to the code about what is happening and why.
The proposed patch is too sparse and has no comments.

> +	skb = alloc_skb(hlen + sizeof(struct ipv6hdr) + sizeof(*msg) +
> +			ndisc_opt_addr_space(dev,
> +					     NDISC_NEIGHBOUR_ADVERTISEMENT) +
> +			tlen, GFP_ATOMIC);
> +	if (!skb)
> +		return;

Why not netdev_alloc_skb which takes care of padding and setting skb->dev? 

Rather than doing copy/paste of the code to generate a ND message, it would
be better to have one function in IPv6 code that handles that. That would keep
from having to fix code in two places in the future. Is there some way
to extend ndisc_send_na?