From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752669AbbG2S2r (ORCPT ); Wed, 29 Jul 2015 14:28:47 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:33110 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750871AbbG2S2p (ORCPT ); Wed, 29 Jul 2015 14:28:45 -0400 Date: Wed, 29 Jul 2015 11:28:42 -0700 (PDT) Message-Id: <20150729.112842.1871916445536378243.davem@davemloft.net> To: sfeldma@gmail.com Cc: vivien.didelot@savoirfairelinux.com, netdev@vger.kernel.org, jiri@resnulli.us, f.fainelli@gmail.com, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com Subject: Re: [PATCH] net: switchdev: restrict vid range abstraction From: David Miller In-Reply-To: References: <1437954348-11859-1-git-send-email-vivien.didelot@savoirfairelinux.com> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Wed, 29 Jul 2015 11:28:45 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Scott Feldman Date: Wed, 29 Jul 2015 00:31:44 -0700 > Since the netlink request (for example vlan add) includes the range, > I'm not seeing how we can response with success for the satisfied > vlans in the range, and also respond with an error for the unsatisfied > vlans in the range. In other words, from the netlink msgs > perspective, we need to treat a vlan range as all-or-nothing. So in > your example, if hw can't add vlan 2, we fail the entire request to > add range 2-5. This is where the prepare phase checks to make sure > the entire request can be satisfied before committing to hw. This was my concern with the change as well. The user asked for the range to be installed, so if any portion of it cannot be done we must not make any changes to the HW configuration and fail the entire request.