netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Lezcano <dlezcano@fr.ibm.com>
To: Daniel Lezcano <dlezcano@fr.ibm.com>
Cc: "Denis V. Lunev" <den@openvz.org>,
	davem@davemloft.net, netdev@vger.kernel.org,
	containers@lists.osdl.org, devel@openvz.org
Subject: Re: [PATCH 6/17 net-2.6.26] [NETNS]: Default arp parameters lookup.
Date: Tue, 19 Feb 2008 16:16:43 +0100	[thread overview]
Message-ID: <47BAF2DB.9060600@fr.ibm.com> (raw)
In-Reply-To: <47BAADEB.3080005@fr.ibm.com>

Daniel Lezcano wrote:
> Denis V. Lunev wrote:
>> On Tue, 2008-02-19 at 10:51 +0100, Daniel Lezcano wrote:
>>> Denis V. Lunev wrote:
>>>> On Tue, 2008-02-19 at 10:14 +0100, Daniel Lezcano wrote:
>>>>> Denis V. Lunev wrote:
>>>>>> Default ARP parameters should be findable regardless of the context.
>>>>>> Required to make inetdev_event working.
>>>>>>
>>>>>> Signed-off-by: Denis V. Lunev <den@openvz.org>
>>>>>> ---
>>>>>>  net/core/neighbour.c |    4 +---
>>>>>>  1 files changed, 1 insertions(+), 3 deletions(-)
>>>>>>
>>>>>> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
>>>>>> index c895ad4..45ed620 100644
>>>>>> --- a/net/core/neighbour.c
>>>>>> +++ b/net/core/neighbour.c
>>>>>> @@ -1275,9 +1275,7 @@ static inline struct neigh_parms 
>>>>>> *lookup_neigh_params(struct neigh_table *tbl,
>>>>>>      struct neigh_parms *p;
>>>>>>
>>>>>>      for (p = &tbl->parms; p; p = p->next) {
>>>>>> -        if (p->net != net)
>>>>>> -            continue;
>>>>>> -        if ((p->dev && p->dev->ifindex == ifindex) ||
>>>>>> +        if ((p->dev && p->dev->ifindex == ifindex && p->net == 
>>>>>> net) ||
>>>>>>              (!p->dev && !ifindex))
>>>>>>              return p;
>>>>>>      }
>>>>> If the values are:
>>>>>     p->dev == NULL
>>>>>     ifindex == 0
>>>>>     p->net != net
>>>>>
>>>>> The parms should not be taken into account and the looping must 
>>>>> continue. But with this modification it is not the case, if we 
>>>>> specify parms ifindex == 0, the first parms with the dev field set 
>>>>> to NULL will be taken belonging or not to the right net.
>>>> They should be taken. In the other case inetdev_event will fail for 
>>>> sure
>>>> in the middle. You could check.
>>>>
>>>> These are ARP defaults and I do not see a problem for now to get them.
>>> Because there is a parms default per namespace. So several instances 
>>> of them per nd table. That was the initial approach with Eric's 
>>> patchset.
>>>
>>
>> These changes are not in mainstream and I do not want to touch ARP as
>> this is not a simple thing. In reality ARP will be needed only when
>> we'll have a real device inside a namespace.
>>
>> Right now I prefer to have minimal set of working changes to finish IP
>> and upper layers.
> 
> core/neighbour.c is a common part between several protocols, especially 
> ipv4 and ipv6. If you modify this function just to fit your need in the 
> arp that will block me for ipv6 until you make parms default per 
> namespace. So please, find another way to do that, perhaps just add a 
> helper function.
> 
> I suggest you do parms default per namespace first, it is quite small 
> and easy :)
> 
> Just let me the time to send the copy-parms-default function.

Ok, so after a long discussion with Denis about this patch, I will 
change the ipv6 code to share the neigh->parms. It is not a problem.
Having the behavior of the neighbour subsystem per namespace is not a 
must-have.

Acked-by: Daniel Lezcano <dlezcano@fr.ibm.com>

  reply	other threads:[~2008-02-19 15:25 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-19  7:28 [PATCH 0/17] Finish IPv4 infrastructure namespacing Denis V. Lunev
2008-02-19  7:31 ` [PATCH 1/17 net-2.6.26] [IPV4]: Remove ifa != NULL check Denis V. Lunev
2008-02-19  7:31 ` [PATCH 2/17 net-2.6.26] [IPV4]: Remove check for ifa->ifa_dev != NULL Denis V. Lunev
2008-02-19  7:31 ` [PATCH 3/17 net-2.6.26] [NETFILTER]: Consolidate masq_inet_event and masq_device_event Denis V. Lunev
2008-02-19 14:10   ` Patrick McHardy
2008-02-19  7:31 ` [PATCH 4/17 net-2.6.26] [NETNS]: Disable inetaddr notifiers in namespaces other than initial Denis V. Lunev
2008-02-19  7:31 ` [PATCH 5/17 net-2.6.26] [NETNS]: Register neighbour table parameters in the correct namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 6/17 net-2.6.26] [NETNS]: Default arp parameters lookup Denis V. Lunev
2008-02-19  9:14   ` Daniel Lezcano
2008-02-19  9:39     ` Denis V. Lunev
2008-02-19  9:51       ` Daniel Lezcano
2008-02-19 10:05         ` Denis V. Lunev
2008-02-19 10:22           ` Daniel Lezcano
2008-02-19 15:16             ` Daniel Lezcano [this message]
2008-02-19  7:31 ` [PATCH 7/17 net-2.6.26] [NETNS]: Disable multicaststing configuration inside non-initial namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 8/17 net-2.6.26] [NETNS]: Enable inetdev_event notifier Denis V. Lunev
2008-02-19  7:31 ` [PATCH 9/17 net-2.6.26] [NETNS]: DST cleanup routines should be called inside namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 10/17 net-2.6.26] [NETNS]: Process ip_rt_redirect in the correct namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 11/17 net-2.6.26] [IPV4]: rt_cache_get_next should take rt_genid into account Denis V. Lunev
2008-02-19  7:31 ` [PATCH 12/17 net-2.6.26] [NETNS]: Process /proc/net/rt_cache inside a namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 13/17 net-2.6.26] [NETNS]: Register /proc/net/rt_cache for each namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 14/17 net-2.6.26] [NETNS]: Process devinet ioctl in the correct namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 15/17 net-2.6.26] [NETNS]: Enable all routing manipulation via netlink inside namespace Denis V. Lunev
2008-02-19  7:31 ` [PATCH 16/17 net-2.6.26] [NETNS]: Enable IPv4 address manipulations " Denis V. Lunev
2008-02-19  7:31 ` [PATCH 17/17 net-2.6.26] [NETNS]: Process inet_select_addr inside a namespace Denis V. Lunev
2008-02-29  4:53 ` [PATCH 0/17] Finish IPv4 infrastructure namespacing 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=47BAF2DB.9060600@fr.ibm.com \
    --to=dlezcano@fr.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=davem@davemloft.net \
    --cc=den@openvz.org \
    --cc=devel@openvz.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).