netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, jes@trained-monkey.org
Subject: Re: [patch net-next] neigh: use NEIGH_VAR_INIT in ndo_neigh_setup functions.
Date: Thu, 16 Jan 2014 08:15:19 +0100	[thread overview]
Message-ID: <20140116071519.GA2815@minipsycho.orion> (raw)
In-Reply-To: <20140113.113538.1561843824076418241.davem@davemloft.net>

Mon, Jan 13, 2014 at 08:35:38PM CET, davem@davemloft.net wrote:
>From: Jiri Pirko <jiri@resnulli.us>
>Date: Thu,  9 Jan 2014 14:13:47 +0100
>
>> When ndo_neigh_setup is called, the bitfield used by NEIGH_VAR_SET is
>> not initialized yet. This might cause confusion for the people who use
>> NEIGH_VAR_SET in ndo_neigh_setup. So rather introduce NEIGH_VAR_INIT for
>> usage in ndo_neigh_setup.
>> 
>> Signed-off-by: Jiri Pirko <jiri@resnulli.us>
>
>Wouldn't it be better to move the neigh_parms_data_state_cleanall() call
>before we invoke ->ndo_neigh_setup()?  It seems that this code intended
>to work that way, no?

Even moving neigh_parms_data_state_cleanall before ndo_neigh_setup
would not solve this. In ndo_neigh_setup the original default value is
changed. If it is changed by NEIGH_VAR_SET, it touches data_state bit
and it looks as if it was changed by user. That is not desired because
default value change would be ignored for this device. Therefore there
is need for NEIGH_VAR_INIT which does not touch data_state bit.

  reply	other threads:[~2014-01-16  7:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 13:13 [patch net-next] neigh: use NEIGH_VAR_INIT in ndo_neigh_setup functions Jiri Pirko
2014-01-13 19:35 ` David Miller
2014-01-16  7:15   ` Jiri Pirko [this message]
2014-01-16 19:37     ` David Miller
2014-01-15 20:09 ` David Miller

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=20140116071519.GA2815@minipsycho.orion \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=jes@trained-monkey.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).