From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: [PATCH] Virtual ethernet device (tunnel) Date: Wed, 02 May 2007 07:40:31 -0600 Message-ID: References: <46386DFB.7090109@sw.ru> <46388562.9050305@trash.net> <1178110192.4074.55.camel@localhost> <46388B19.70300@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: hadi@cyberus.ca, Pavel Emelianov , David Miller , Ben Greear , Linux Netdev List , Linux Containers , Kirill Korotaev , Alexey Kuznetsov , devel@openvz.org, Stephen Hemminger To: Patrick McHardy Return-path: Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:35001 "EHLO ebiederm.dsl.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2993196AbXEBNws (ORCPT ); Wed, 2 May 2007 09:52:48 -0400 In-Reply-To: <46388B19.70300@trash.net> (Patrick McHardy's message of "Wed, 02 May 2007 14:59:05 +0200") Sender: netdev-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Patrick McHardy writes: > jamal wrote: >> On Wed, 2007-02-05 at 14:34 +0200, Patrick McHardy wrote: >> >> >>>Thats a lot better than using sysfs, but I think it would be >>>preferrable to use rtnetlink instead of genetlink for network >>>configuration. >> >> >> or you can just hold rtnl while using genl. >> I do agree it would be easier to just use rtnetlink ... > > > The rtnl needs to be held in either case, but using a different > netlink family introduces races in message processing. For example > a simple: > > ip link add dev veth0 > ip route add 10.0.0.0/8 dev veth0 > > might fail because we have two different input queues and the routing > message might get processed before the link message. The consensus from the last thread was pretty much that we need to implement RTM_NEWLINK and RTM_DELLINK, if it is at all possible. So that we can get code reuse between different virtual devices. Although I suspect we will need some per type attribute parsing. Eric