aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-12-16 16:12:25 -0800
committerDavid S. Miller <davem@davemloft.net>2019-12-16 16:12:25 -0800
commit366c7bb0acf13791bef5127cf6e217386e75696d (patch)
treeb7d0adde654470e18d5d6f1bab523d9ffa78bfa5 /drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
parentipv6: Annotate ipv6_addr_is_* bitwise pointer casts (diff)
parentnet: hns3: do not schedule the periodic task when reset fail (diff)
downloadlinux-dev-366c7bb0acf13791bef5127cf6e217386e75696d.tar.xz
linux-dev-366c7bb0acf13791bef5127cf6e217386e75696d.zip
Merge branch 'hns3-next'
Huazhong Tan says: ==================== net: hns3: some optimizaions related to work task This series refactors the work task of the HNS3 ethernet driver. [patch 1/5] uses delayed workqueue to replace the timer for hclgevf_service task, make the code simpler. [patch 2/5] & [patch 3/5] unifies current mailbox, reset and service work into one. [patch 4/5] allocates a private work queue with WQ_MEM_RECLAIM for the HNS3 driver. [patch 5/5] adds a new flag to indicate whether reset fails, and prevent scheduling service task to handle periodic task when this flag has been set. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
index 2f4c81bf4169..003114f6db6c 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
@@ -142,12 +142,13 @@ enum hclgevf_states {
HCLGEVF_STATE_REMOVING,
HCLGEVF_STATE_NIC_REGISTERED,
/* task states */
- HCLGEVF_STATE_SERVICE_SCHED,
HCLGEVF_STATE_RST_SERVICE_SCHED,
HCLGEVF_STATE_RST_HANDLING,
HCLGEVF_STATE_MBX_SERVICE_SCHED,
HCLGEVF_STATE_MBX_HANDLING,
HCLGEVF_STATE_CMD_DISABLE,
+ HCLGEVF_STATE_LINK_UPDATING,
+ HCLGEVF_STATE_RST_FAIL,
};
struct hclgevf_mac {
@@ -283,12 +284,7 @@ struct hclgevf_dev {
struct hclgevf_mbx_resp_status mbx_resp; /* mailbox response */
struct hclgevf_mbx_arq_ring arq; /* mailbox async rx queue */
- struct timer_list service_timer;
- struct timer_list keep_alive_timer;
- struct work_struct service_task;
- struct work_struct keep_alive_task;
- struct work_struct rst_service_task;
- struct work_struct mbx_service_task;
+ struct delayed_work service_task;
struct hclgevf_tqp *htqp;
@@ -298,7 +294,8 @@ struct hclgevf_dev {
struct hnae3_client *nic_client;
struct hnae3_client *roce_client;
u32 flag;
- u32 stats_timer;
+ unsigned long serv_processed_cnt;
+ unsigned long last_serv_processed;
};
static inline bool hclgevf_is_reset_pending(struct hclgevf_dev *hdev)