]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: hns3: add cond_resched() to hns3 ring buffer init process
authorJie Wang <wangjie125@huawei.com>
Wed, 5 Jun 2024 07:20:58 +0000 (15:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Jun 2024 11:20:28 +0000 (12:20 +0100)
commit968fde83841a8c23558dfbd0a0c69d636db52b55
tree48d34b4cbc01bf25c0ed72ca619ec151d05e0cae
parent12cda920212a49fa22d9e8b9492ac4ea013310a4
net: hns3: add cond_resched() to hns3 ring buffer init process

Currently hns3 ring buffer init process would hold cpu too long with big
Tx/Rx ring depth. This could cause soft lockup.

So this patch adds cond_resched() to the process. Then cpu can break to
run other tasks instead of busy looping.

Fixes: a723fb8efe29 ("net: hns3: refine for set ring parameters")
Signed-off-by: Jie Wang <wangjie125@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h