From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Julius Volz" Subject: Re: [PATCH 00/26] IPVS: Add first IPv6 support to IPVS. Date: Mon, 30 Jun 2008 14:01:02 +0200 Message-ID: References: <485126BD.7030109@trash.net> <485144DF.3030102@trash.net> <20080613062621.GA10474@verge.net.au> <48528EED.7090307@trash.net> <485652EA.2020004@trash.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Simon Horman" , "Vince Busam" , "Ben Greear" , lvs-devel@vger.kernel.org, netdev@vger.kernel.org To: "Patrick McHardy" Return-path: In-Reply-To: <485652EA.2020004@trash.net> Content-Disposition: inline Sender: lvs-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Mon, Jun 16, 2008, Patrick McHardy wrote: > b) or c) both look fine. You could save a few operations (ADD/EDIT > can be combined) by making use of nlmsg_flags though: > > The semantics of the flags is: > > - NLM_F_CREATE|NLM_F_EXCL: create if non-existant > - NLM_F_REPLACE: change existing > - NLM_F_CREATE|NLM_F_REPLACE: create if non-existing, replace otherwise > - NLM_F_EXCL: test existance I just noticed that this doesn't work with genetlink. genl_rcv_msg() treats all commands as GET requests instead of NEW requests, in which the same flag bits mean different things (NLM_F_ROOT, NLM_F_MATCH and so on). Specifically, it checks for NLM_F_DUMP, which overlaps with the other interpretations of the bits. So I think I'll just have separate commands for ADD and EDIT, similar to what net/wireless/nl80211.c has. Julius -- Google Switzerland GmbH