Skip to content

Commit 1a7be66

Browse files
Jijie ShaoPaolo Abeni
authored andcommitted
net: hns3: fix fail to delete tc flower rules during reset issue
Firmware does not respond driver commands during reset Therefore, rule will fail to delete while the firmware is resetting So, if failed to delete rule, set rule state to TO_DEL, and the rule will be deleted when periodic task being scheduled. Fixes: 0205ec0 ("net: hns3: add support for hw tc offload of tc flower") Signed-off-by: Jijie Shao <shaojijie@huawei.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent f2ed304 commit 1a7be66

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7348,6 +7348,12 @@ static int hclge_del_cls_flower(struct hnae3_handle *handle,
73487348
ret = hclge_fd_tcam_config(hdev, HCLGE_FD_STAGE_1, true, rule->location,
73497349
NULL, false);
73507350
if (ret) {
7351+
/* if tcam config fail, set rule state to TO_DEL,
7352+
* so the rule will be deleted when periodic
7353+
* task being scheduled.
7354+
*/
7355+
hclge_update_fd_list(hdev, HCLGE_FD_TO_DEL, rule->location, NULL);
7356+
set_bit(HCLGE_STATE_FD_TBL_CHANGED, &hdev->state);
73517357
spin_unlock_bh(&hdev->fd_rule_lock);
73527358
return ret;
73537359
}

0 commit comments

Comments
 (0)