From: Steen Hegelund <steen.hegelund@microchip.com>
To: "David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Steen Hegelund <steen.hegelund@microchip.com>,
<UNGLinuxDriver@microchip.com>, <linux-kernel@vger.kernel.org>,
<netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,
"Steen Hegelund" <Steen.Hegelund@microchip.com>,
Daniel Machon <daniel.machon@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Lars Povlsen <lars.povlsen@microchip.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
Randy Dunlap <rdunlap@infradead.org>,
"Casper Andersson" <casper.casan@gmail.com>,
Nathan Huckleberry <nhuck@google.com>,
Dan Carpenter <error27@gmail.com>,
Michael Walle <michael@walle.cc>,
"Wan Jiabing" <wanjiabing@vivo.com>,
Qiheng Lin <linqiheng@huawei.com>,
"Shang XiaoJing" <shangxiaojing@huawei.com>,
Simon Horman <simon.horman@corigine.com>
Subject: [PATCH net-next 0/5] Add support for TC flower templates in Sparx5
Date: Tue, 7 Mar 2023 14:40:58 +0100 [thread overview]
Message-ID: <20230307134103.2042975-1-steen.hegelund@microchip.com> (raw)
This adds support for the TC template mechanism in the Sparx5 flower filter
implementation.
Templates are as such handled by the TC framework, but when a template is
created (using a chain id) there are by definition no filters on this
chain (an error will be returned if there are any).
If the templates chain id is one that is represented by a VCAP lookup, then
when the template is created, we know that it is safe to use the keys
provided in the template to change the keyset configuration for the (port,
lookup) combination, if this is needed to improve the match on the
template.
The original port keyset configuration is captured in the template state
information which is kept per port, so that when the template is deleted
the port keyset configuration can be restored to its previous setting.
The template also provides the protocol parameter which is the basic
information that is used to find out which port keyset configuration needs
to be changed.
The VCAPs and lookups are slightly different when it comes to which keys,
keysets and protocol are supported and used for selection, so in some
cases a bit of tweaking is needed to find a useful match. This is done by
e.g. removing a key that prevents the best matching keyset from being
selected.
The debugfs output that is provided for a port allows inspection of the
currently used keyset in each of the VCAPs lookups. So when a template has
been created the debugfs output allows you to verify if the keyset
configuration has been changed successfully.
Steen Hegelund (5):
net: microchip: sparx5: Correct the spelling of the keysets in debugfs
net: microchip: sparx5: Provide rule count, key removal and keyset
select
net: microchip: sparx5: Add TC template list to a port
net: microchip: sparx5: Add port keyset changing functionality
net: microchip: sparx5: Add TC template support
.../ethernet/microchip/sparx5/sparx5_main.c | 1 +
.../ethernet/microchip/sparx5/sparx5_main.h | 1 +
.../microchip/sparx5/sparx5_tc_flower.c | 209 +++++++++++++-
.../microchip/sparx5/sparx5_vcap_debugfs.c | 2 +-
.../microchip/sparx5/sparx5_vcap_impl.c | 270 ++++++++++++++++++
.../microchip/sparx5/sparx5_vcap_impl.h | 6 +
.../net/ethernet/microchip/vcap/vcap_api.c | 61 ++++
.../ethernet/microchip/vcap/vcap_api_client.h | 11 +
8 files changed, 553 insertions(+), 8 deletions(-)
--
2.39.2
next reply other threads:[~2023-03-07 13:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 13:40 Steen Hegelund [this message]
2023-03-07 13:40 ` [PATCH net-next 1/5] net: microchip: sparx5: Correct the spelling of the keysets in debugfs Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 2/5] net: microchip: sparx5: Provide rule count, key removal and keyset select Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 3/5] net: microchip: sparx5: Add TC template list to a port Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 4/5] net: microchip: sparx5: Add port keyset changing functionality Steen Hegelund
2023-03-07 13:41 ` [PATCH net-next 5/5] net: microchip: sparx5: Add TC template support Steen Hegelund
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=20230307134103.2042975-1-steen.hegelund@microchip.com \
--to=steen.hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=casper.casan@gmail.com \
--cc=daniel.machon@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=linqiheng@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michael@walle.cc \
--cc=netdev@vger.kernel.org \
--cc=nhuck@google.com \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=rmk+kernel@armlinux.org.uk \
--cc=shangxiaojing@huawei.com \
--cc=simon.horman@corigine.com \
--cc=wanjiabing@vivo.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
all inboxes | Powered by JetHome®