From patchwork Wed Mar 27 08:44:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 1066717 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=bootlin.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 44ThQ00JHJz9sT4 for ; Wed, 27 Mar 2019 19:44:40 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732157AbfC0Ioi (ORCPT ); Wed, 27 Mar 2019 04:44:38 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:51819 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725786AbfC0Ioh (ORCPT ); Wed, 27 Mar 2019 04:44:37 -0400 X-Originating-IP: 90.88.32.136 Received: from mc-bl-xps13.lan (aaubervilliers-681-1-91-136.w90-88.abo.wanadoo.fr [90.88.32.136]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 4E35140003; Wed, 27 Mar 2019 08:44:33 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Cc: Maxime Chevallier , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Antoine Tenart , thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, miquel.raynal@bootlin.com, nadavh@marvell.com, stefanc@marvell.com, ymarkman@marvell.com, mw@semihalf.com, Russell King , linux-arm-kernel@lists.infradead.org Subject: [PATCH net-next 00/18] net: mvpp2: Classifier updates and cleanups Date: Wed, 27 Mar 2019 09:44:04 +0100 Message-Id: <20190327084422.4209-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi all, In preparation for the future addition of classification offload support, this series cleans-up the current code dealing with the classification engines. As of today, the classification code only deals with RSS, which is a very narrow use-case when considering all of the classifier's features. This lead to design and naming decisions that don't really stand when considering using more classification features. This series therefore includes quite a lot a renaming of functions and macros, and tries to make the naming schemes more consistent and the code more readable. The debugfs interface that allows reading the various Parsing and Classification engines has been cleaned-up and made more generic, allowing to read the Flow Table and C2 engine hit counters on a per-entry basis. The Classifier itself has been made more robust by introducing the lu_type field in classification lookups, that prevents false-positive matches in the future. We also initialise the various engine in a more extensive and less error-prone way by assining default values to all entries in the C2 and Flow table. This is a pretty big series considering it's mostly cleanup, but my goal is to make the future series that will contain new big features easier to review, focusing on the real logic. Besides the debugfs interface, this series doesn't intend to introduce any new features or change in behaviours. Maxime Chevallier (18): net: mvpp2: Don't use an int to store netdev_features_t net: mvpp2: cls: Add missing MAC_DA field extraction net: mvpp2: cls: Start cls flow entries from beginning of table net: mvpp2: cls: use Lookup Type in classification engines net: mvpp2: cls: Rename MVPP2_N_FLOWS to MVPP2_N_PRS_FLOWS net: mvpp2: cls: Make the flow definitions const net: mvpp2: debugfs: Store debugfs entries data in mvpp2 struct net: mvpp2: debugfs: Allow reading the flow table from debugfs net: mvpp2: debugfs: Allow reading the C2 engine table from debugfs net: mvpp2: cls: Use iterators to go through the cls_table net: mvpp2: cls: Write C2 TCAM data last when writing a C2 entry net: mvpp2: cls: Move C2 read/write helpers around net: mvpp2: cls: Rename classifer per-port functions net: mvpp2: cls: Don't use the sequence attribute for classification net: mvpp2: cls: Rename the flow table macros net: mvpp2: cls: Invalidate all C2 entries except the ones we use net: mvpp2: cls: Initialize lookup priorities for all entries in the flow net: mvpp2: cls: Rework C2 engine macros drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 10 + .../net/ethernet/marvell/mvpp2/mvpp2_cls.c | 212 ++++++++------- .../net/ethernet/marvell/mvpp2/mvpp2_cls.h | 92 ++++--- .../ethernet/marvell/mvpp2/mvpp2_debugfs.c | 253 +++++++++++------- .../net/ethernet/marvell/mvpp2/mvpp2_main.c | 8 +- 5 files changed, 341 insertions(+), 234 deletions(-)