From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933119AbcECMHM (ORCPT ); Tue, 3 May 2016 08:07:12 -0400 Received: from mail-wm0-f45.google.com ([74.125.82.45]:35203 "EHLO mail-wm0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932756AbcECMHH (ORCPT ); Tue, 3 May 2016 08:07:07 -0400 Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH net-next v2] block/drbd: use nla_put_u64_64bit() References: <57286F49.8050107@6wind.com> <1462268358-19044-1-git-send-email-nicolas.dichtel@6wind.com> <20160503100644.GE16459@soda.linbit> To: netdev@vger.kernel.org, davem@davemloft.net, philipp.reisner@linbit.com, drbd-dev@lists.linbit.com, linux-kernel@vger.kernel.org From: Nicolas Dichtel Organization: 6WIND Message-ID: <57289468.5090401@6wind.com> Date: Tue, 3 May 2016 14:07:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <20160503100644.GE16459@soda.linbit> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 03/05/2016 12:06, Lars Ellenberg a écrit : > On Tue, May 03, 2016 at 11:39:18AM +0200, Nicolas Dichtel wrote: >> Two new handlers have been defined in genl_magic_ headers: >> - __field2: the corresponding nla_put() function (nla_put_flag()) takes >> only two args >> - __field4: the corresponding nla_put() function (nla_put_u64_64bit()) >> takes four args >> >> __field2 allows us to define __unspec_field for padding attribute. >> __field4 allows us to update the definition of __u64_field: the pad >> attribute should now be specified. > > Please just NOT use an additional "field", > but always use 0 to pad. > > Patch is much shorter as well, see below. I don't think that the goal is to make the shortest patch... But frankly, I don't care. The goal was to use the new interface in a proper way, like every other subsystem. > > Attribute type "0" is not used, > and will never be of semantic value, > but always be ignored in the DRBD netlink family. > > Whereas using some arbitrary value will be wrong, > and will needlessly break userland. An application should always ignore unknown attribute, this is a golden rule. Now if you know that this patch will break applications (which one exactly?), we can use your proposal. Regards, Nicolas