netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Jouni Malinen <jouni@codeaurora.org>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] bridge: Add support for IEEE 802.11 Proxy ARP for IPv6
Date: Fri, 24 Feb 2017 11:55:37 -0800	[thread overview]
Message-ID: <20170224115537.160609db@xeon-e3> (raw)
In-Reply-To: <1487961581-20683-1-git-send-email-jouni@codeaurora.org>

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?

  reply	other threads:[~2017-02-24 19:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-24 18:39 [PATCH] bridge: Add support for IEEE 802.11 Proxy ARP for IPv6 Jouni Malinen
2017-02-24 19:55 ` Stephen Hemminger [this message]
2017-03-06 17:05   ` Jouni Malinen
2017-02-24 22:47 ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170224115537.160609db@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=jouni@codeaurora.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).