mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
net: hns3: fix fail to delete tc flower rules during reset issue
[ Upstream commit1a7be66e46] 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:0205ec041e("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
d3f7af41de
commit
b1b85b3d76
@@ -7454,6 +7454,12 @@ static int hclge_del_cls_flower(struct hnae3_handle *handle,
|
|||||||
ret = hclge_fd_tcam_config(hdev, HCLGE_FD_STAGE_1, true, rule->location,
|
ret = hclge_fd_tcam_config(hdev, HCLGE_FD_STAGE_1, true, rule->location,
|
||||||
NULL, false);
|
NULL, false);
|
||||||
if (ret) {
|
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);
|
spin_unlock_bh(&hdev->fd_rule_lock);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user