From: Yanling Song songyl@ramaxel.com
Ramaxel inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4J0GH CVE: NA
--------------------------------------------
1.Solve the problem that the indirection table cannot be obtained by ethtool - x ethx command. 2.Solve the system oops problem caused by ethtool - x ethx default command.
Signed-off-by: Yanling Song songyl@ramaxel.com Reviewed-by: Xu Yunxuyun@ramaxel.com Acked-by: Xie XiuQi xiexiuqi@huawei.com Signed-off-by: Zheng Zengkai zhengzengkai@huawei.com --- drivers/net/ethernet/ramaxel/spnic/spnic_ethtool.c | 2 ++ drivers/net/ethernet/ramaxel/spnic/spnic_rss.c | 5 +++++ drivers/net/ethernet/ramaxel/spnic/spnic_rss.h | 2 ++ 3 files changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/ramaxel/spnic/spnic_ethtool.c b/drivers/net/ethernet/ramaxel/spnic/spnic_ethtool.c index 3f6f69b4cb34..dc49395c47d5 100644 --- a/drivers/net/ethernet/ramaxel/spnic/spnic_ethtool.c +++ b/drivers/net/ethernet/ramaxel/spnic/spnic_ethtool.c @@ -939,6 +939,7 @@ static const struct ethtool_ops spnic_ethtool_ops = { .get_module_info = spnic_get_module_info, .get_module_eeprom = spnic_get_module_eeprom,
+ .get_rxfh_indir_size = spnic_get_rxfh_indir_size, .get_rxfh_key_size = spnic_get_rxfh_key_size, .get_rxfh = spnic_get_rxfh, .set_rxfh = spnic_set_rxfh, @@ -972,6 +973,7 @@ static const struct ethtool_ops spnicvf_ethtool_ops = { .get_channels = spnic_get_channels, .set_channels = spnic_set_channels,
+ .get_rxfh_indir_size = spnic_get_rxfh_indir_size, .get_rxfh_key_size = spnic_get_rxfh_key_size, .get_rxfh = spnic_get_rxfh, .set_rxfh = spnic_set_rxfh, diff --git a/drivers/net/ethernet/ramaxel/spnic/spnic_rss.c b/drivers/net/ethernet/ramaxel/spnic/spnic_rss.c index a0dcc1519262..86f6f92f669b 100644 --- a/drivers/net/ethernet/ramaxel/spnic/spnic_rss.c +++ b/drivers/net/ethernet/ramaxel/spnic/spnic_rss.c @@ -681,6 +681,11 @@ static int set_rss_rxfh(struct net_device *netdev, const u32 *indir, const u8 *k return 0; }
+u32 spnic_get_rxfh_indir_size(struct net_device *netdev) +{ + return SPNIC_RSS_INDIR_SIZE; +} + u32 spnic_get_rxfh_key_size(struct net_device *netdev) { return SPNIC_RSS_KEY_SIZE; diff --git a/drivers/net/ethernet/ramaxel/spnic/spnic_rss.h b/drivers/net/ethernet/ramaxel/spnic/spnic_rss.h index 15c930a271be..e64a4dcf39dd 100644 --- a/drivers/net/ethernet/ramaxel/spnic/spnic_rss.h +++ b/drivers/net/ethernet/ramaxel/spnic/spnic_rss.h @@ -39,6 +39,8 @@ void spnic_get_channels(struct net_device *netdev, struct ethtool_channels *chan
int spnic_set_channels(struct net_device *netdev, struct ethtool_channels *channels);
+u32 spnic_get_rxfh_indir_size(struct net_device *netdev); + u32 spnic_get_rxfh_key_size(struct net_device *netdev);
int spnic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc);