]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
net: libwx: wrap-around and reset qmprc counter
authorJiawen Wu <jiawenwu@trustnetic.com>
Tue, 7 Apr 2026 02:56:15 +0000 (10:56 +0800)
committerJakub Kicinski <kuba@kernel.org>
Sun, 12 Apr 2026 15:42:29 +0000 (08:42 -0700)
commit1dd9b0dafd21cfdac534b423b7e7ee980b3c535a
treecd39e2cb9b100dcdbb8d1e31cfad2ac0de383533
parentdc33e52b8ce6f2d42dce18da12dc47d6c21f2e8b
net: libwx: wrap-around and reset qmprc counter

The WX_PX_MPRC registers are not clear-on-read hardware counters. The
previous implementation directly read and accumulated these 32-bit values
into a 64-bit software counter. Now implement a rd32_wrap() helper
function to calculate the delta counter to correct the statistic.

Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
Link: https://patch.msgid.link/20260407025616.33652-9-jiawenwu@trustnetic.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/wangxun/libwx/wx_hw.c
drivers/net/ethernet/wangxun/libwx/wx_type.h