提交 f312cd00 编写于 作者: Y Yanling Song 提交者: Zheng Zengkai

net:spnic: Add the get_rxfh_indir_size in ethtool_ops structure.

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: NYanling Song <songyl@ramaxel.com>
Reviewed-by: Xu Yun<xuyun@ramaxel.com>
Acked-by: NXie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 4728ac82
...@@ -939,6 +939,7 @@ static const struct ethtool_ops spnic_ethtool_ops = { ...@@ -939,6 +939,7 @@ static const struct ethtool_ops spnic_ethtool_ops = {
.get_module_info = spnic_get_module_info, .get_module_info = spnic_get_module_info,
.get_module_eeprom = spnic_get_module_eeprom, .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_key_size = spnic_get_rxfh_key_size,
.get_rxfh = spnic_get_rxfh, .get_rxfh = spnic_get_rxfh,
.set_rxfh = spnic_set_rxfh, .set_rxfh = spnic_set_rxfh,
...@@ -972,6 +973,7 @@ static const struct ethtool_ops spnicvf_ethtool_ops = { ...@@ -972,6 +973,7 @@ static const struct ethtool_ops spnicvf_ethtool_ops = {
.get_channels = spnic_get_channels, .get_channels = spnic_get_channels,
.set_channels = spnic_set_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_key_size = spnic_get_rxfh_key_size,
.get_rxfh = spnic_get_rxfh, .get_rxfh = spnic_get_rxfh,
.set_rxfh = spnic_set_rxfh, .set_rxfh = spnic_set_rxfh,
......
...@@ -681,6 +681,11 @@ static int set_rss_rxfh(struct net_device *netdev, const u32 *indir, const u8 *k ...@@ -681,6 +681,11 @@ static int set_rss_rxfh(struct net_device *netdev, const u32 *indir, const u8 *k
return 0; 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) u32 spnic_get_rxfh_key_size(struct net_device *netdev)
{ {
return SPNIC_RSS_KEY_SIZE; return SPNIC_RSS_KEY_SIZE;
......
...@@ -39,6 +39,8 @@ void spnic_get_channels(struct net_device *netdev, struct ethtool_channels *chan ...@@ -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); 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); u32 spnic_get_rxfh_key_size(struct net_device *netdev);
int spnic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc); int spnic_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, u8 *hfunc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册