net: ti: icssg-prueth: Enable HSR Tx duplication, Tx Tag and Rx Tag offload
authorRavi Gunasekaran <r-gunasekaran@ti.com>
Wed, 11 Sep 2024 08:16:02 +0000 (13:46 +0530)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Sep 2024 22:14:07 +0000 (15:14 -0700)
commit56375086d093478d67366bdbafee4db657b9d1b1
treeaedaeb0fcabf9fdbea2eb6b7de3ed4dc98fc42d4
parent95540ad6747c09225e21800d9ce325921645dda2
net: ti: icssg-prueth: Enable HSR Tx duplication, Tx Tag and Rx Tag offload

The HSR stack allows to offload its Tx packet duplication functionality to
the hardware. Enable this offloading feature for ICSSG driver. Add support
to offload HSR Tx Tag Insertion and Rx Tag Removal and duplicate discard.

hsr tag insertion offload and hsr dup offload are tightly coupled in
firmware implementation. Both these features need to be enabled / disabled
together.

Duplicate discard is done as part of RX tag removal and it is
done by the firmware. When driver sends the r30 command
ICSSG_EMAC_HSR_RX_OFFLOAD_ENABLE, firmware does RX tag removal as well as
duplicate discard.

Signed-off-by: Ravi Gunasekaran <r-gunasekaran@ti.com>
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Link: https://patch.msgid.link/20240911081603.2521729-5-danishanwar@ti.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/ti/icssg/icssg_common.c
drivers/net/ethernet/ti/icssg/icssg_config.c
drivers/net/ethernet/ti/icssg/icssg_config.h
drivers/net/ethernet/ti/icssg/icssg_prueth.c
drivers/net/ethernet/ti/icssg/icssg_prueth.h