Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3879209ybi; Tue, 18 Jun 2019 07:57:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHKvSpAy6od8BFkwdLqFwgAGc71ieu3JjtVHRiuWhsftMXuOCZZ3KymIhBccxyT2oz8WQI X-Received: by 2002:a65:63cd:: with SMTP id n13mr3079102pgv.153.1560869864718; Tue, 18 Jun 2019 07:57:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560869864; cv=none; d=google.com; s=arc-20160816; b=RUU/JWuQ+aDGj+2iAwJ1m7pKIBEE/Zp3ktPWpdTTH7dLIo++uhDFjOmN/oAMfFo/Px iWdLJ35+lw31jyF9fWAduj9ZSWOu5bRawsksm1c/ldssKjUjLpnSvm4VYhIE7rdb+cyx 0TxwYlVEneSY9YhAkFGJEZJ8bzguOEaO7gtZ3QCb8rbrErR+lfmEyk6cCip8Sd7JMwXd sNXkgX8dOxin7TraYxkwJ1Pd07hMQIgVI0Gqy+Cm/M11NG/xEJEbO+jddRZUd//lUO/S ZRJDMW+EmrgFz63xnR07tPVMCUA6FPBrXX2z3ieoeL8kYoh38dgB7UTAVYRDFOt6B+s+ awGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=q/4NRmJVVhTpgup3RpMR5hpZK3P0/Mlp8USAUaiI6WU=; b=09dim+CQaEkGHuXVJuF9HJuVbwiYA56WBUMw6oBFC+Mpyootg5/tVMzRoMT5o6J8rL Xy1zWNJtgsHn1FONdpG8miLgZrBfA9EQitVQrJGweJPl07Nf55nIkofUwchsr1KGNUN4 uYKRr004HcZdq77huVTRqXu8jrW1sEIhrRaGO0mTsaI3g6H+k2PcPEOoV6aa5buiCXSv IrzspMTKNOIkc4mhxKgtV1kLiqnWLCjBR6VgFmaoU5P8jw5Amu3q/gO0hjljP8PeN6ro KP0iRm1FoldZ7bJKqDNpnPXsBFaAOYfP5bb+fI18fR5yFOeDakZB/VUKMEHhD/PsknZq uEog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j36si13301389plb.77.2019.06.18.07.57.29; Tue, 18 Jun 2019 07:57:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729337AbfFROz2 (ORCPT + 99 others); Tue, 18 Jun 2019 10:55:28 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:47215 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728881AbfFROz2 (ORCPT ); Tue, 18 Jun 2019 10:55:28 -0400 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 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, mw@semihalf.com, linux-arm-kernel@lists.infradead.org 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 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.20.1