From: MD Danish Anwar <danishanwar@ti.com>
To: Jan Kiszka <jan.kiszka@siemens.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Andrew Lunn <andrew@lunn.ch>,
Vignesh Raghavendra <vigneshr@ti.com>,
Javier Carrasco <javier.carrasco.cruz@gmail.com>,
Diogo Ivo <diogo.ivo@siemens.com>,
Jacob Keller <jacob.e.keller@intel.com>,
Simon Horman <horms@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>, <srk@ti.com>,
Roger Quadros <rogerq@kernel.org>
Subject: [PATCH net-next 0/6] Introduce HSR offload support for ICSSG
Date: Thu, 8 Aug 2024 16:37:54 +0530 [thread overview]
Message-ID: <20240808110800.1281716-1-danishanwar@ti.com> (raw)
Hi All,
This series introduces HSR offload support for ICSSG driver. To support HSR
offload to hardware, ICSSG HSR firmware is used.
This series introduces,
1. HSR frame offload support for ICSSG driver.
2. HSR Tx Packet duplication offload
3. HSR Tx Tag and Rx Tag offload
4. Multicast filtering support in HSR offload mode.
5. Dependencies related to IEP.
HSR Test Setup:
--------------
___________ ___________ ___________
| | Link AB | | Link BC | |
__| AM64* |_________| AM64 |_________| AM64* |___
| | Station A | | Station B | | Station C | |
| |___________| |___________| |___________| |
| |
|______________________________________________________________|
Link CA
*Could be any device that supports two ethernet interfaces.
Steps to switch to HSR frame forward offload mode:
-------------------------------------------------
Example assuming eth1, eth2 ports of ICSSG1 on AM64-EVM
1) Enable HSR offload for both interfaces
ethtool -K eth1 hsr-fwd-offload on
ethtool -K eth1 hsr-dup-offload on
ethtool -K eth1 hsr-tag-ins-offload on
ethtool -K eth1 hsr-tag-rm-offload on
ethtool -K eth2 hsr-fwd-offload on
ethtool -K eth2 hsr-dup-offload on
ethtool -K eth2 hsr-tag-ins-offload on
ethtool -K eth2 hsr-tag-rm-offload on
2) Create HSR interface and add slave interfaces to it
ip link add name hsr0 type hsr slave1 eth1 slave2 eth2 \
supervision 45 version 1
3) Add IP address to the HSR interface
ip addr add <IP_ADDR>/24 dev hsr0
4) Bring up the HSR interface
ip link set hsr0 up
Switching back to Dual EMAC mode:
--------------------------------
1) Delete HSR interface
ip link delete hsr0
2) Disable HSR port-to-port offloading mode, packet duplication
ethtool -K eth1 hsr-fwd-offload off
ethtool -K eth1 hsr-dup-offload off
ethtool -K eth1 hsr-tag-ins-offload off
ethtool -K eth1 hsr-tag-rm-offload off
ethtool -K eth2 hsr-fwd-offload off
ethtool -K eth2 hsr-dup-offload off
ethtool -K eth2 hsr-tag-ins-offload off
ethtool -K eth2 hsr-tag-rm-offload off
Testing the port-to-port frame forward offload feature:
-----------------------------------------------------
1) Connect the LAN cables as shown in the test setup.
2) Configure Station A and Station C in HSR non-offload mode.
3) Configure Station B is HSR offload mode.
4) Since HSR is a redundancy protocol, disconnect cable "Link CA",
to ensure frames from Station A reach Station C only through
Station B.
5) Run iperf3 Server on Station C and client on station A.
7) Check the CPU usage on Station B.
CPU usage report on Station B using mpstat when running UDP iperf3:
-------------------------------------------------------------------
1) Non-Offload case
-------------------
CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
all 0.00 0.00 0.50 0.00 3.52 29.15 0.00 0.00 66.83
0 0.00 0.00 0.00 0.00 7.00 58.00 0.00 0.00 35.00
1 0.00 0.00 0.99 0.00 0.99 0.00 0.00 0.00 98.02
2) Offload case
---------------
CPU %usr %nice %sys %iowait %irq %soft %steal %guest %idle
all 0.00 0.00 0.00 0.00 0.50 0.00 0.00 0.00 99.50
0 0.00 0.00 0.99 0.00 0.00 0.00 0.00 0.00 99.01
1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
Note:
1) At the very least, hsr-fwd-offload must be enabled.
Without offloading the port-to-port offload, other
HSR offloads cannot be enabled.
2) Inorder to enable hsr-tag-ins-offload, hsr-dup-offload
must also be enabled as these are tightly coupled in
the firmware implementation.
MD Danish Anwar (4):
net: ti: icssg-prueth: Enable IEP1
net: ti: icssg-prueth: Add support for HSR frame forward offload
net: ti: icssg-prueth: Add multicast filtering support in HSR mode
net: ti: icss-iep: Move icss_iep structure
Ravi Gunasekaran (2):
net: ti: icssg-prueth: Enable HSR Tx Packet duplication offload
net: ti: icssg-prueth: Enable HSR Tx Tag and Rx Tag offload
drivers/net/ethernet/ti/icssg/icss_iep.c | 72 -------
drivers/net/ethernet/ti/icssg/icss_iep.h | 74 ++++++-
.../net/ethernet/ti/icssg/icssg_classifier.c | 1 +
drivers/net/ethernet/ti/icssg/icssg_common.c | 16 +-
drivers/net/ethernet/ti/icssg/icssg_config.c | 10 +-
drivers/net/ethernet/ti/icssg/icssg_config.h | 2 +
drivers/net/ethernet/ti/icssg/icssg_prueth.c | 189 ++++++++++++++++--
drivers/net/ethernet/ti/icssg/icssg_prueth.h | 9 +
8 files changed, 277 insertions(+), 96 deletions(-)
base-commit: 222a3380f92b8791d4eeedf7cd750513ff428adf
--
2.34.1
next reply other threads:[~2024-08-08 11:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-08 11:07 MD Danish Anwar [this message]
2024-08-08 11:07 ` [PATCH net-next 1/6] net: ti: icssg-prueth: Enable IEP1 MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 2/6] net: ti: icssg-prueth: Add support for HSR frame forward offload MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 3/6] net: ti: icssg-prueth: Enable HSR Tx Packet duplication offload MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 4/6] net: ti: icssg-prueth: Add multicast filtering support in HSR mode MD Danish Anwar
2024-08-08 11:07 ` [PATCH net-next 5/6] net: ti: icss-iep: Move icss_iep structure MD Danish Anwar
2024-08-09 20:10 ` Dan Carpenter
2024-08-12 5:41 ` MD Danish Anwar
2024-08-12 6:48 ` Dan Carpenter
2024-08-08 11:08 ` [PATCH net-next 6/6] net: ti: icssg-prueth: Enable HSR Tx Tag and Rx Tag offload MD Danish Anwar
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=20240808110800.1281716-1-danishanwar@ti.com \
--to=danishanwar@ti.com \
--cc=andrew@lunn.ch \
--cc=dan.carpenter@linaro.org \
--cc=davem@davemloft.net \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jan.kiszka@siemens.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rogerq@kernel.org \
--cc=srk@ti.com \
--cc=vigneshr@ti.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®