From patchwork Tue Jun 18 14:55:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Chevallier X-Patchwork-Id: 11001951 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1641014B6 for ; Tue, 18 Jun 2019 14:56:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0442926253 for ; Tue, 18 Jun 2019 14:56:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EBF2128B17; Tue, 18 Jun 2019 14:56:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A526D26253 for ; Tue, 18 Jun 2019 14:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=8EijlZefi3WIrND+2W7UnMnB+KzxPER/qRC/cUS8iT8=; b=rI87q8Bkw5ge6x dGL9eb4medACm8yYlNcnpAWYimhCx00RLbPTR8gnwHp0NykzlI6V9FCS9jZK47UVaootd9MCWapNw 9PqxwrS1rKgvoGlFSHQZ39ysf7dZRslZm47zf0UgvCNCVyCO/x7izWrvQEkVmHV1237N0ixuaBZ03 AK3nsFSXYoYg6QKtEiObPExD5XFodH3EJhUu3RuWQ6fHQSaYHMGmsEEauN+hgpR1dl3YdDWfa5zQz HoTen3Zm8yj+3drRqYXUVQ5hbG4YuFViv+iT4tMYQ6U3Wmo1A9cyLWBfnLxRWXEPx1IbbP4WK02S8 L78XIlGkg25qDesWNuWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdFWs-0007bm-8i; Tue, 18 Jun 2019 14:56:10 +0000 Received: from relay2-d.mail.gandi.net ([217.70.183.194]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdFWG-00076b-Ub for linux-arm-kernel@lists.infradead.org; Tue, 18 Jun 2019 14:55:35 +0000 X-Originating-IP: 90.88.23.150 Received: from mc-bl-xps13.lan (aaubervilliers-681-1-81-150.w90-88.abo.wanadoo.fr [90.88.23.150]) (Authenticated sender: maxime.chevallier@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 08E8F40002; Tue, 18 Jun 2019 14:55:10 +0000 (UTC) From: Maxime Chevallier To: davem@davemloft.net Subject: [PATCH net-next 0/4] net: mvpp2: cls: Allow steering based on vlan tag Date: Tue, 18 Jun 2019 16:55:15 +0200 Message-Id: <20190618145519.27705-1-maxime.chevallier@bootlin.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_075533_170864_70808F09 X-CRM114-Status: UNSURE ( 7.19 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antoine Tenart , netdev@vger.kernel.org, gregory.clement@bootlin.com, linux-kernel@vger.kernel.org, Maxime Chevallier , nadavh@marvell.com, thomas.petazzoni@bootlin.com, miquel.raynal@bootlin.com, stefanc@marvell.com, mw@semihalf.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The PPv2 classifier can perform flow steering based on keys extracted from the VLAN tag. This series adds support for using the vlan id and the vlan prio as keys, using the ethtool interface. Patch 1 is a preparatory patch that prevent false-positive matches, using a dedicated lookup id for the RSS C2 lookup. Patch 2 allows to separate the flows based on the header fields they contain. The main goal is to be able to separate tagged traffic from untagged traffic for flow steering, just as we already do for RSS. Patch 3 solves an issue we have when extracting fields that aren't full bytes, such as the vlan tag which is 12 bits wide, or the priority which is 3 bits wide. Finally, patch 4 adds support for steering based on both vlan id and priority, extracted from the outermost tag. Maxime Chevallier (4): net: mvpp2: cls: Use a dedicated lu_type for the RSS lookup net: mvpp2: cls: Only select applicable flows of classification offload net: mvpp2: cls: right-justify the C2 TCAM keys net: mvpp2: cls: Add steering based on vlan Id and priority. .../net/ethernet/marvell/mvpp2/mvpp2_cls.c | 118 +++++++++++++----- .../net/ethernet/marvell/mvpp2/mvpp2_cls.h | 28 +++-- 2 files changed, 103 insertions(+), 43 deletions(-)