diff options
author | Birger Koblitz <git@birger-koblitz.de> | 2021-09-07 15:30:29 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2021-10-09 08:25:05 +0200 |
commit | 54805fc91186228eec0ce14f7c5a6b4149b0a244 (patch) | |
tree | e95ce211176a8492785ad6353c2fbb26c26014fb /target/linux/realtek/files-5.10/drivers/net/ethernet | |
parent | a6678accbd3da00a002158618125af155cc27b37 (diff) | |
download | upstream-54805fc91186228eec0ce14f7c5a6b4149b0a244.tar.gz upstream-54805fc91186228eec0ce14f7c5a6b4149b0a244.tar.bz2 upstream-54805fc91186228eec0ce14f7c5a6b4149b0a244.zip |
realtek: Add driver support for TC offloading
This adds support for offloading TC flower by using the Packet Inspection Engine
of the RTL-SoCs. Basic infrastructure support is provide with callbacks to the
tc subsystem and support for HW packet counters.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Diffstat (limited to 'target/linux/realtek/files-5.10/drivers/net/ethernet')
-rw-r--r-- | target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c | 3 | ||||
-rw-r--r-- | target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.h | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c index 0d9ced9b6c..c966746f02 100644 --- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c +++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c @@ -1927,6 +1927,7 @@ static const struct net_device_ops rtl838x_eth_netdev_ops = { .ndo_tx_timeout = rtl838x_eth_tx_timeout, .ndo_set_features = rtl83xx_set_features, .ndo_fix_features = rtl838x_fix_features, + .ndo_setup_tc = rtl83xx_setup_tc, }; static const struct net_device_ops rtl839x_eth_netdev_ops = { @@ -1940,6 +1941,7 @@ static const struct net_device_ops rtl839x_eth_netdev_ops = { .ndo_tx_timeout = rtl838x_eth_tx_timeout, .ndo_set_features = rtl83xx_set_features, .ndo_fix_features = rtl838x_fix_features, + .ndo_setup_tc = rtl83xx_setup_tc, }; static const struct net_device_ops rtl930x_eth_netdev_ops = { @@ -1953,6 +1955,7 @@ static const struct net_device_ops rtl930x_eth_netdev_ops = { .ndo_tx_timeout = rtl838x_eth_tx_timeout, .ndo_set_features = rtl93xx_set_features, .ndo_fix_features = rtl838x_fix_features, + .ndo_setup_tc = rtl83xx_setup_tc, }; static const struct net_device_ops rtl931x_eth_netdev_ops = { diff --git a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.h index c7e97057b3..d2691bfaf5 100644 --- a/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.h +++ b/target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.h @@ -424,6 +424,6 @@ int rtl930x_write_phy(u32 port, u32 page, u32 reg, u32 val); int rtl930x_read_phy(u32 port, u32 page, u32 reg, u32 *val); int rtl931x_write_phy(u32 port, u32 page, u32 reg, u32 val); int rtl931x_read_phy(u32 port, u32 page, u32 reg, u32 *val); -void rtl9300_sds_power(int sds_num, int val); +int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data); #endif /* _RTL838X_ETH_H */ |