diff options
author | Xue Chaojing <xuechaojing@huawei.com> | 2019-06-18 06:20:53 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-18 21:52:27 -0400 |
commit | 4fdc51bb4e92e1d7d55be2699eaf17c9c11d4004 (patch) | |
tree | 9170d87e563fb7623e60fc7aa307b9e4f3fe8a4c /drivers/net/ethernet/huawei/hinic/hinic_port.h | |
parent | hinic: move ethtool code into hinic_ethtool (diff) | |
download | linux-dev-4fdc51bb4e92e1d7d55be2699eaf17c9c11d4004.tar.xz linux-dev-4fdc51bb4e92e1d7d55be2699eaf17c9c11d4004.zip |
hinic: add support for rss parameters with ethtool
This patch adds support rss parameters with ethtool,
user can change hash key, hash indirection table, hash
function by ethtool -X, and show rss parameters by ethtool -x.
Signed-off-by: Xue Chaojing <xuechaojing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/huawei/hinic/hinic_port.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/drivers/net/ethernet/huawei/hinic/hinic_port.h b/drivers/net/ethernet/huawei/hinic/hinic_port.h index a7cc164684ea..826f0677be87 100644 --- a/drivers/net/ethernet/huawei/hinic/hinic_port.h +++ b/drivers/net/ethernet/huawei/hinic/hinic_port.h @@ -233,6 +233,17 @@ struct hinic_rss_template_mgmt { u8 rsvd1[4]; }; +struct hinic_rss_template_key { + u8 status; + u8 version; + u8 rsvd0[6]; + + u16 func_id; + u8 template_id; + u8 rsvd1; + u8 key[HINIC_RSS_KEY_SIZE]; +}; + struct hinic_rss_context_tbl { u32 group_index; u32 offset; @@ -241,6 +252,17 @@ struct hinic_rss_context_tbl { u32 ctx; }; +struct hinic_rss_context_table { + u8 status; + u8 version; + u8 rsvd0[6]; + + u16 func_id; + u8 template_id; + u8 rsvd1; + u32 context; +}; + struct hinic_rss_indirect_tbl { u32 group_index; u32 offset; @@ -249,6 +271,17 @@ struct hinic_rss_indirect_tbl { u8 entry[HINIC_RSS_INDIR_SIZE]; }; +struct hinic_rss_indir_table { + u8 status; + u8 version; + u8 rsvd0[6]; + + u16 func_id; + u8 template_id; + u8 rsvd1; + u8 indir[HINIC_RSS_INDIR_SIZE]; +}; + struct hinic_rss_key { u8 status; u8 version; @@ -339,4 +372,16 @@ int hinic_rss_template_alloc(struct hinic_dev *nic_dev, u8 *tmpl_idx); int hinic_rss_template_free(struct hinic_dev *nic_dev, u8 tmpl_idx); void hinic_set_ethtool_ops(struct net_device *netdev); + +int hinic_get_rss_type(struct hinic_dev *nic_dev, u32 tmpl_idx, + struct hinic_rss_type *rss_type); + +int hinic_rss_get_indir_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx, + u32 *indir_table); + +int hinic_rss_get_template_tbl(struct hinic_dev *nic_dev, u32 tmpl_idx, + u8 *temp); + +int hinic_rss_get_hash_engine(struct hinic_dev *nic_dev, u8 tmpl_idx, + u8 *type); #endif |