From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [RFC net-next 1/3] bonding: add infrastructure for an option API Date: Fri, 10 Jan 2014 11:19:14 -0800 Message-ID: <20140110111914.6b33b650@nehalam.linuxnetplumber.net> References: <1389359495-9700-1-git-send-email-nikolay@redhat.com> <1389359495-9700-2-git-send-email-nikolay@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: Nikolay Aleksandrov Return-path: Received: from mail-pa0-f52.google.com ([209.85.220.52]:64775 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258AbaAJTTR (ORCPT ); Fri, 10 Jan 2014 14:19:17 -0500 Received: by mail-pa0-f52.google.com with SMTP id kx10so1289212pab.11 for ; Fri, 10 Jan 2014 11:19:17 -0800 (PST) In-Reply-To: <1389359495-9700-2-git-send-email-nikolay@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 10 Jan 2014 14:11:33 +0100 Nikolay Aleksandrov wrote: > This patch adds the necessary basic infrastructure to support > centralized and unified option manipulation API for the bonding. The new > structure bond_option will be used to describe each option with its > dependencies on modes which will be checked automatically thus removing a > lot of duplicated code. Also automatic range checking is added for > non-string options. Currently the option setting function requires RTNL to > be acquired prior to calling it, since many options already rely on RTNL > it seemed like the best choice to protect all against common race > conditions. > In order to add an option the following steps need to be done: > 1. Add an entry BOND_OPT_