Skip to content

Commit

Permalink
Merge branch 'hinic-add-rss-support-and-rss-parameters-configuration'
Browse files Browse the repository at this point in the history
Xue Chaojing says:

====================
hinic: add rss support and rss parameters configuration

This series add rss support for HINIC driver and implement the ethtool
interface related to rss parameter configuration. user can use ethtool
configure rss parameters or show rss parameters.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jun 19, 2019
2 parents 760f1dc + 4fdc51b commit d75d5f9
Show file tree
Hide file tree
Showing 9 changed files with 1,186 additions and 142 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/huawei/hinic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ obj-$(CONFIG_HINIC) += hinic.o
hinic-y := hinic_main.o hinic_tx.o hinic_rx.o hinic_port.o hinic_hw_dev.o \
hinic_hw_io.o hinic_hw_qp.o hinic_hw_cmdq.o hinic_hw_wq.o \
hinic_hw_mgmt.o hinic_hw_api_cmd.o hinic_hw_eqs.o hinic_hw_if.o \
hinic_common.o
hinic_common.o hinic_ethtool.o
28 changes: 28 additions & 0 deletions drivers/net/ethernet/huawei/hinic/hinic_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,40 @@
enum hinic_flags {
HINIC_LINK_UP = BIT(0),
HINIC_INTF_UP = BIT(1),
HINIC_RSS_ENABLE = BIT(2),
};

struct hinic_rx_mode_work {
struct work_struct work;
u32 rx_mode;
};

struct hinic_rss_type {
u8 tcp_ipv6_ext;
u8 ipv6_ext;
u8 tcp_ipv6;
u8 ipv6;
u8 tcp_ipv4;
u8 ipv4;
u8 udp_ipv6;
u8 udp_ipv4;
};

enum hinic_rss_hash_type {
HINIC_RSS_HASH_ENGINE_TYPE_XOR,
HINIC_RSS_HASH_ENGINE_TYPE_TOEP,
HINIC_RSS_HASH_ENGINE_TYPE_MAX,
};

struct hinic_dev {
struct net_device *netdev;
struct hinic_hwdev *hwdev;

u32 msg_enable;
unsigned int tx_weight;
unsigned int rx_weight;
u16 num_qps;
u16 max_qps;

unsigned int flags;

Expand All @@ -50,6 +70,14 @@ struct hinic_dev {

struct hinic_txq_stats tx_stats;
struct hinic_rxq_stats rx_stats;

u8 rss_tmpl_idx;
u8 rss_hash_engine;
u16 num_rss;
u16 rss_limit;
struct hinic_rss_type rss_type;
u8 *rss_hkey_user;
s32 *rss_indir_user;
};

#endif
Loading

0 comments on commit d75d5f9

Please sign in to comment.