From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751757AbcGOR5Q (ORCPT ); Fri, 15 Jul 2016 13:57:16 -0400 Received: from mail-wm0-f43.google.com ([74.125.82.43]:38107 "EHLO mail-wm0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751415AbcGOR5O (ORCPT ); Fri, 15 Jul 2016 13:57:14 -0400 Reply-To: nicolas.dichtel@6wind.com Subject: Re: [PATCH 01/14] resource limits: foundation for resource highwater tracking References: <1468578983-28229-1-git-send-email-toiwoton@gmail.com> <1468578983-28229-2-git-send-email-toiwoton@gmail.com> <5788DBE4.50406@6wind.com> To: Topi Miettinen , linux-kernel@vger.kernel.org Cc: Jonathan Corbet , Ingo Molnar , Peter Zijlstra , Balbir Singh , "David S. Miller" , Markus Elfring , Thomas Gleixner , Rik van Riel , "open list:DOCUMENTATION" From: Nicolas Dichtel Organization: 6WIND Message-ID: <578923F6.1070606@6wind.com> Date: Fri, 15 Jul 2016 19:57:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 15/07/2016 18:27, Topi Miettinen a écrit : [snip] >> Why playing with version number? It complexifies the (userland) code and >> existing applications break when the kernel is updated. >> Goal of netlink is to be easily extensible. By adding a new attribute, existing >> userspace tools won't break. > > I just followed this text in taskstats.h. Does that give wrong advice? > > * The struct is versioned. Newer versions should only add fields to > * the bottom of the struct to maintain backward compatibility. > * > * > * To add new fields > * a) bump up TASKSTATS_VERSION > * b) add comment indicating new version number at end of struct > * c) add new fields after version comment; maintain 64-bit alignment I don't know taskstats well, but that is not how netlink works. There is no need to manage a version with netlink, just add new attributes. Regards, Nicolas