summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
Commit message (Collapse)AuthorAgeFilesLines
* net: ethernet: mtk_eth_soc: always mtk_get_ib1_pkt_typeDaniel Golle2023-07-191-1/+1
| | | | | | | | | | | | | entries and bind debugfs files would display wrong data on NETSYS_V2 and later because instead of using mtk_get_ib1_pkt_type the driver would use MTK_FOE_IB1_PACKET_TYPE which corresponds to NETSYS_V1(.x) SoCs. Use mtk_get_ib1_pkt_type so entries and bind records display correctly. Fixes: 03a3180e5c09e ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986") Signed-off-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Link: https://lore.kernel.org/r/c0ae03d0182f4d27b874cbdf0059bc972c317f3c.1689727134.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: ethernet: mtk_eth_soc: use be32 type to store be32 valuesSimon Horman2023-04-101-1/+1
| | | | | | | | | | | | | | | | | | n_addr is used to store be32 values, so a sparse-friendly array of be32 to store these values. Flagged by sparse: .../mtk_ppe_debugfs.c:59:27: warning: incorrect type in assignment (different base types) .../mtk_ppe_debugfs.c:59:27: expected unsigned int .../mtk_ppe_debugfs.c:59:27: got restricted __be32 [usertype] .../mtk_ppe_debugfs.c:161:46: warning: cast to restricted __be16 No functional changes intended. Compile tested only. Signed-off-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/20230401-mtk_eth_soc-sparse-v2-1-963becba3cb7@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: ethernet: mtk_eth_soc: ppe: add support for flow accountingDaniel Golle2023-03-201-2/+7
| | | | | | | | | | | The PPE units found in MT7622 and newer support packet and byte accounting of hw-offloaded flows. Add support for reading those counters as found in MediaTek's SDK[1]. [1]: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/bc6a6a375c800dc2b80e1a325a2c732d1737df92 Tested-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: ethernet: mtk_eth_soc: use DEFINE_SHOW_ATTRIBUTE to simplify codeLiu Shixin2022-09-291-30/+6
| | | | | | | | | Use DEFINE_SHOW_ATTRIBUTE helper macro to simplify the code. No functional change. Signed-off-by: Liu Shixin <liushixin2@huawei.com> Link: https://lore.kernel.org/r/20220927111925.2424100-1-liushixin2@huawei.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
* net: ethernet: mtk_eth_soc: add foe_entry_size to mtk_eth_socLorenzo Bianconi2022-09-221-1/+1
| | | | | | | | | Introduce foe_entry_size to mtk_eth_soc data structure since mt7986 relies on a bigger mtk_foe_entry data structure. Tested-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
* net: ethernet: mtk_eth_soc: add the capability to run multiple ppeLorenzo Bianconi2022-09-221-4/+4
| | | | | | | | | | | | | mt7986 chipset support multiple packet engines for wlan <-> eth packet forwarding. Tested-by: Daniel Golle <daniel@makrotopia.org> Co-developed-by: Bo Jiao <Bo.Jiao@mediatek.com> Signed-off-by: Bo Jiao <Bo.Jiao@mediatek.com> Co-developed-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Sujuan Chen <sujuan.chen@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
* net: ethernet: mtk_eth_soc: remove bridge flow offload type entry supportFelix Fietkau2022-04-061-1/+0
| | | | | | | According to MediaTek, this feature is not supported in current hardware Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: mtk_eth_soc: delete some dead codeDan Carpenter2021-12-171-3/+0
| | | | | | | | | | The debugfs_create_dir() function never returns NULL. It does return error pointers but in normal situations like this there is no need to check for errors. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20211217071037.GE26548@kili Signed-off-by: Jakub Kicinski <kuba@kernel.org>
* net: ethernet: mtk_eth_soc: remove unused variable 'count'Qiheng Lin2021-03-251-2/+2
| | | | | | | | | | | | | | | | GCC reports the following warning with W=1: drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c:80:9: warning: variable 'count' set but not used [-Wunused-but-set-variable] 80 | int i, count; | ^~~~~ This variable is not used in function , this commit remove it to fix the warning. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Qiheng Lin <linqiheng@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: ethernet: mtk_eth_soc: add support for initializing the PPEFelix Fietkau2021-03-241-0/+217
The PPE (packet processing engine) is used to offload NAT/routed or even bridged flows. This patch brings up the PPE and uses it to get a packet hash. It also contains some functionality that will be used to bring up flow offloading. Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>