Skip to content

Commit 4701073

Browse files
Wei Fangkuba-moo
Wei Fang
authored andcommitted
net: enetc: add initial netc-lib driver to support NTMP
Some NETC functionality is controlled using control messages sent to the hardware using BD ring interface with 32B descriptor similar to transmit BD ring used on ENETC. This BD ring interface is referred to as command BD ring. It is used to configure functionality where the underlying resources may be shared between different entities or being too large to configure using direct registers. Therefore, a messaging protocol called NETC Table Management Protocol (NTMP) is provided for exchanging configuration and management information between the software and the hardware using the command BD ring interface. For the management protocol of LS1028A has been retroactively named NTMP 1.0, and its implementation is in enetc_cbdr.c and enetc_qos.c. However, NTMP of i.MX95 has been upgraded to version 2.0, which is incompatible with LS1028A, because the message formats have been changed. Therefore, add the netc-lib driver to support NTMP 2.0 to operate various tables. Note that, only MAC address filter table and RSS table are supported at the moment. More tables will be supported in subsequent patches. It is worth mentioning that the purpose of the netc-lib driver is to provide some NTMP-based generic interfaces for ENETC and NETC Switch drivers. Currently, it only supports the configurations of some tables. Interfaces such as tc flower and debugfs will be added in the future. Signed-off-by: Wei Fang <[email protected]> Reviewed-by: Vladimir Oltean <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent d97e263 commit 4701073

File tree

6 files changed

+698
-0
lines changed

6 files changed

+698
-0
lines changed

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9378,6 +9378,7 @@ F: Documentation/devicetree/bindings/net/nxp,netc-blk-ctrl.yaml
93789378
F: drivers/net/ethernet/freescale/enetc/
93799379
F: include/linux/fsl/enetc_mdio.h
93809380
F: include/linux/fsl/netc_global.h
9381+
F: include/linux/fsl/ntmp.h
93819382

93829383
FREESCALE eTSEC ETHERNET DRIVER (GIANFAR)
93839384
M: Claudiu Manoil <[email protected]>

drivers/net/ethernet/freescale/enetc/Kconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ config NXP_ENETC_PF_COMMON
1515

1616
If compiled as module (M), the module name is nxp-enetc-pf-common.
1717

18+
config NXP_NETC_LIB
19+
tristate
20+
help
21+
This module provides common functionalities for both ENETC and NETC
22+
Switch, such as NETC Table Management Protocol (NTMP) 2.0, common tc
23+
flower and debugfs interfaces and so on.
24+
1825
config FSL_ENETC
1926
tristate "ENETC PF driver"
2027
depends on PCI_MSI
@@ -40,6 +47,7 @@ config NXP_ENETC4
4047
select FSL_ENETC_CORE
4148
select FSL_ENETC_MDIO
4249
select NXP_ENETC_PF_COMMON
50+
select NXP_NETC_LIB
4351
select PHYLINK
4452
select DIMLIB
4553
help

drivers/net/ethernet/freescale/enetc/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ fsl-enetc-core-y := enetc.o enetc_cbdr.o enetc_ethtool.o
66
obj-$(CONFIG_NXP_ENETC_PF_COMMON) += nxp-enetc-pf-common.o
77
nxp-enetc-pf-common-y := enetc_pf_common.o
88

9+
obj-$(CONFIG_NXP_NETC_LIB) += nxp-netc-lib.o
10+
nxp-netc-lib-y := ntmp.o
11+
912
obj-$(CONFIG_FSL_ENETC) += fsl-enetc.o
1013
fsl-enetc-y := enetc_pf.o
1114
fsl-enetc-$(CONFIG_PCI_IOV) += enetc_msg.o

0 commit comments

Comments
 (0)