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
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to