From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: Re: [PATCH net-next 0/5] net: dsa: bcm_sf2: Store rules in lists Date: Tue, 6 Nov 2018 15:09:04 -0800 Message-ID: References: <20181106205841.14308-1-f.fainelli@gmail.com> <20181106.150619.2176282733992923198.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, pablo@netfilter.org To: David Miller Return-path: Received: from mail-wm1-f68.google.com ([209.85.128.68]:52331 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726394AbeKGIgw (ORCPT ); Wed, 7 Nov 2018 03:36:52 -0500 Received: by mail-wm1-f68.google.com with SMTP id l66-v6so6189131wml.2 for ; Tue, 06 Nov 2018 15:09:15 -0800 (PST) In-Reply-To: <20181106.150619.2176282733992923198.davem@davemloft.net> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/6/18 3:06 PM, David Miller wrote: > From: Florian Fainelli > Date: Tue, 6 Nov 2018 12:58:36 -0800 > >> Hi all, >> >> This patch series changes the bcm-sf2 driver to keep a copy of the >> inserted rules as opposed to using the HW as a storage area for a number >> of reasons: >> >> - this helps us with doing duplicate rule detection in a faster way, it >> would have required a full rule read before >> >> - this helps with Pablo's on-going work to convert ethtool_rx_flow_spec >> to a more generic flow rule structure by having fewer code paths to >> convert to the new structure/helpers >> >> - we need to cache copies to restore them during drive resumption, >> because depending on the low power mode the system has entered, the >> switch may have lost all of its context > > Looks good to me, series applied and build testing right now. > > I will say that the ethtool flow spec comparison should probably > eventually be broken out into a helper function places somewhere > common. It's very likely this approach, and thus the helper, can > be used by other drivers in a similar situation. Sure, that could be done, I will check with Pablo how he wants to approach that as well since he is reworking how flow rules are represented. Thanks! -- Florian