From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: davem@davemloft.net
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Antoine Tenart <antoine.tenart@bootlin.com>,
thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com,
miquel.raynal@bootlin.com, nadavh@marvell.com,
stefanc@marvell.com, mw@semihalf.com,
Russell King <linux@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Saeed Mahameed <saeedm@mellanox.com>,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH net-next 0/4] net: mvpp2: cls: Add classification
Date: Tue, 30 Apr 2019 15:14:25 +0200 [thread overview]
Message-ID: <20190430131429.19361-1-maxime.chevallier@bootlin.com> (raw)
Hi everyone,
This series is a rework of the previously standalone patch adding
classification support for mvpp2 :
https://lore.kernel.org/netdev/20190423075031.26074-1-maxime.chevallier@bootlin.com/
This patch has been reworked according to Saeed's review, to make sure
that the location of the rule is always respected and serves as a way to
prioritize rules between each other. This the 3rd iteration of this
submission, but since it's now a series, I reset the revision numbering.
This series implements that in a limited configuration for now, since we
limit the total number of rules per port to 4.
The main factors for this limitation are that :
- We share the classification tables between all ports (4 max, although
one is only used for internal loopback), hence we have to perform a
logical separation between rules, which is done today by dedicated
ranges for each port in each table
- The "Flow table", which dictates which lookups operations are
performed for an ingress packet, in subdivided into 22 "sub flows",
each corresponding to a traffic type based on the L3 proto, L4
proto, the presence or not of a VLAN tag and the L3 fragmentation.
This makes so that when adding a rule, it has to be added into each
of these subflows, introducing duplications of entries and limiting
our max number of entries.
These limitations can be overcomed in several ways, but for readability
sake, I'd rather submit basic classification offload support for now,
and improve it gradually.
This series also adds a small cosmetic cleanup patch (1), and also adds
support for the "Drop" action compared to the first submission of this
feature. It is simple enough to be added with this basic support.
Compared to the first submissions, the NETIF_F_NTUPLE flag was also
removed, following Saeed's comment.
Thanks,
Maxime
Maxime Chevallier (4):
net: mvpp2: cls: Remove extra whitespace in mvpp2_cls_flow_write
net: mvpp2: cls: Use a bitfield to represent the flow_type
net: mvpp2: cls: Add Classification offload support
net: mvpp2: cls: Allow dropping packets with classification offload
drivers/net/ethernet/marvell/mvpp2/mvpp2.h | 42 ++
.../net/ethernet/marvell/mvpp2/mvpp2_cls.c | 497 +++++++++++++++---
.../net/ethernet/marvell/mvpp2/mvpp2_cls.h | 70 ++-
.../net/ethernet/marvell/mvpp2/mvpp2_main.c | 20 +-
4 files changed, 545 insertions(+), 84 deletions(-)
--
2.20.1
next reply other threads:[~2019-04-30 13:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-30 13:14 Maxime Chevallier [this message]
2019-04-30 13:14 ` [PATCH net-next 1/4] net: mvpp2: cls: Remove extra whitespace in mvpp2_cls_flow_write Maxime Chevallier
2019-04-30 13:14 ` [PATCH net-next 2/4] net: mvpp2: cls: Use a bitfield to represent the flow_type Maxime Chevallier
2019-04-30 13:14 ` [PATCH net-next 3/4] net: mvpp2: cls: Add Classification offload support Maxime Chevallier
2019-04-30 13:14 ` [PATCH net-next 4/4] net: mvpp2: cls: Allow dropping packets with classification offload Maxime Chevallier
2019-05-01 21:13 ` [PATCH net-next 0/4] net: mvpp2: cls: Add classification David Miller
2019-05-04 6:53 ` Jakub Kicinski
2019-05-06 8:00 ` Maxime Chevallier
2019-05-06 17:54 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190430131429.19361-1-maxime.chevallier@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=antoine.tenart@bootlin.com \
--cc=davem@davemloft.net \
--cc=gregory.clement@bootlin.com \
--cc=jakub.kicinski@netronome.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=miquel.raynal@bootlin.com \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=stefanc@marvell.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).