From: Daniel Machon <daniel.machon@microchip.com>
To: <netdev@vger.kernel.org>
Cc: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <lars.povlsen@microchip.com>,
<Steen.Hegelund@microchip.com>, <daniel.machon@microchip.com>,
<UNGLinuxDriver@microchip.com>, <joe@perches.com>,
<richardcochran@gmail.com>, <casper.casan@gmail.com>,
<horatiu.vultur@microchip.com>, <shangxiaojing@huawei.com>,
<rmk+kernel@armlinux.org.uk>, <nhuck@google.com>,
<error27@gmail.com>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>
Subject: [PATCH net-next 00/10] Add support for PSFP in Sparx5
Date: Thu, 2 Feb 2023 11:43:45 +0100 [thread overview]
Message-ID: <20230202104355.1612823-1-daniel.machon@microchip.com> (raw)
================================================================================
Add support for Per-Stream Filtering and Policing (802.1Q-2018, 8.6.5.1).
================================================================================
The VCAP CLM (VCAP IS0 ingress classifier) classifies streams,
identified by ISDX (Ingress Service Index, frame metadata), and maps
ISDX to streams.
Flow meters are also classified by ISDX, and implemented using service
policers (Service Dual Leacky Buckets, SDLB). Leacky buckets are linked
together in a leak chain of a leak group. Leak groups a preconfigured to serve
buckets within a certain rate interval.
Stream gates are time-based policers used by PSFP. Frames are dropped
based on the gate state (OPEN/ CLOSE), whose state will be altered based
on the Gate Control List (GCL) and current PTP time. Apart from
time-based policing, stream gates can alter egress queue selection for
the frames that pass through the Gate. This is done through Internal
Priority Selector (IPS). Stream gates are mapped from stream filters.
Support for tc actions gate and police, have been added to the VCAP IS0 set of
supported actions.
Examples:
// tc filter with gate action
$ tc filter add dev eth1 ingress chain 1100000 prio 1 handle 1001 protocol \
802.1q flower skip_sw vlan_id 100 action gate base-time 0 sched-entry open \
700000 7 8m sched-entry close 300000 action goto chain 1200000
// tc filter with police action
$ tc filter add dev eth1 ingress chain 1100000 prio 1 handle 1002 protocol \
802.1q flower skip_sw vlan_id 100 action police rate 1gbit burst 8096 \
conform-exceed drop action goto chain 1200000
================================================================================
Patches
================================================================================
Patch #1: Adds new register needed for PSFP.
Patch #2: Adds resource pools to control PSFP needed chip resources.
Patch #3: Adds support for SDLB's needed for flow-meters.
Patch #4: Adds support for service policers.
Patch #5: Adds support for PSFP flow-meters, using service policers.
Patch #6: Adds a new function to calculate basetime, required by flow-meters.
Patch #7: Adds support for PSFP stream gates.
Patch #8: Adds support for PSFP stream filters.
Patch #9: Adds a function to initialize flow-meters, stream gates and stream
filters.
Patch #10: Adds the required flower code to configure PSFP using the tc command.
Daniel Machon (10):
net: microchip: add registers needed for PSFP
net: microchip: sparx5: add resource pools
net: microchip: sparx5: add support for Service Dual Leacky Buckets
net: microchip: sparx5: add support for service policers
net: microchip: sparx5: add support for PSFP flow-meters
net: microchip: sparx5: add function for calculating PTP basetime
net: microchip: sparx5: add support for PSFP stream gates
net: microchip: sparx5: add support for PSFP stream filters
net: microchip: sparx5: initialize PSFP
sparx5: add support for configuring PSFP via tc
.../net/ethernet/microchip/sparx5/Makefile | 3 +-
.../ethernet/microchip/sparx5/sparx5_main.c | 5 +-
.../ethernet/microchip/sparx5/sparx5_main.h | 125 ++++
.../microchip/sparx5/sparx5_main_regs.h | 581 +++++++++++++++++-
.../ethernet/microchip/sparx5/sparx5_police.c | 53 ++
.../ethernet/microchip/sparx5/sparx5_pool.c | 81 +++
.../ethernet/microchip/sparx5/sparx5_psfp.c | 332 ++++++++++
.../ethernet/microchip/sparx5/sparx5_ptp.c | 3 +-
.../ethernet/microchip/sparx5/sparx5_qos.c | 59 ++
.../ethernet/microchip/sparx5/sparx5_sdlb.c | 335 ++++++++++
.../microchip/sparx5/sparx5_tc_flower.c | 238 ++++++-
.../net/ethernet/microchip/vcap/vcap_api.c | 3 +-
.../ethernet/microchip/vcap/vcap_api_client.h | 3 +
13 files changed, 1808 insertions(+), 13 deletions(-)
create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_police.c
create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_pool.c
create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_psfp.c
create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_sdlb.c
--
2.34.1
next reply other threads:[~2023-02-02 10:44 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 10:43 Daniel Machon [this message]
2023-02-02 10:43 ` [PATCH net-next 01/10] net: microchip: add registers needed for PSFP Daniel Machon
2023-02-04 12:47 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 02/10] net: microchip: sparx5: add resource pools Daniel Machon
2023-02-04 12:47 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 03/10] net: microchip: sparx5: add support for Service Dual Leacky Buckets Daniel Machon
2023-02-04 12:53 ` Simon Horman
2023-02-05 20:11 ` Daniel.Machon
2023-02-06 10:18 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 04/10] net: microchip: sparx5: add support for service policers Daniel Machon
2023-02-04 12:53 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 05/10] net: microchip: sparx5: add support for PSFP flow-meters Daniel Machon
2023-02-04 12:54 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 06/10] net: microchip: sparx5: add function for calculating PTP basetime Daniel Machon
2023-02-04 12:55 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 07/10] net: microchip: sparx5: add support for PSFP stream gates Daniel Machon
2023-02-04 12:56 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 08/10] net: microchip: sparx5: add support for PSFP stream filters Daniel Machon
2023-02-04 12:56 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 09/10] net: microchip: sparx5: initialize PSFP Daniel Machon
2023-02-04 12:46 ` Simon Horman
2023-02-02 10:43 ` [PATCH net-next 10/10] sparx5: add support for configuring PSFP via tc Daniel Machon
2023-02-04 12:57 ` Simon Horman
2023-02-06 8:50 ` [PATCH net-next 00/10] Add support for PSFP in Sparx5 patchwork-bot+netdevbpf
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=20230202104355.1612823-1-daniel.machon@microchip.com \
--to=daniel.machon@microchip.com \
--cc=Steen.Hegelund@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=casper.casan@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=error27@gmail.com \
--cc=horatiu.vultur@microchip.com \
--cc=joe@perches.com \
--cc=kuba@kernel.org \
--cc=lars.povlsen@microchip.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhuck@google.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=shangxiaojing@huawei.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).