net: hns3: extract macro to simplify ring stats update code
authorPeng Li <lipeng321@huawei.com>
Thu, 2 Dec 2021 08:35:55 +0000 (16:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:59:09 +0000 (11:59 +0100)
commit47868cb77f8ff81ab7235fb39eb9672a30a7607c
treefc0c477b8ebcfa3bbe93fbd2413ad2015936c7a2
parent7457c5a7761ad88b6a8452d5f875555aaf76e013
net: hns3: extract macro to simplify ring stats update code

[ Upstream commit e6d72f6ac2ad4965491354d74b48e35a60abf298 ]

As the code to update ring stats is alike for different ring stats
type, this patch extract macro to simplify ring stats update code.

Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 7d89b53cea1a ("net: hns3: fix miss L3E checking for rx packet")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3_enet.h