Commit 1a7be66e authored by Jijie Shao's avatar Jijie Shao Committed by Paolo Abeni

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: 0205ec04 ("net: hns3: add support for hw tc offload of tc flower")
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent f2ed3049
......@@ -7348,6 +7348,12 @@ static int hclge_del_cls_flower(struct hnae3_handle *handle,
ret = hclge_fd_tcam_config(hdev, HCLGE_FD_STAGE_1, true, rule->location,
NULL, false);
if (ret) {
/* if tcam config fail, set rule state to TO_DEL,
* so the rule will be deleted when periodic
* task being scheduled.
*/
hclge_update_fd_list(hdev, HCLGE_FD_TO_DEL, rule->location, NULL);
set_bit(HCLGE_STATE_FD_TBL_CHANGED, &hdev->state);
spin_unlock_bh(&hdev->fd_rule_lock);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment