]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: flower: refine the use of circular buffer
authorYinjun Zhang <yinjun.zhang@corigine.com>
Thu, 16 Dec 2021 01:37:01 +0000 (20:37 -0500)
committerJakub Kicinski <kuba@kernel.org>
Fri, 17 Dec 2021 04:25:56 +0000 (20:25 -0800)
commitf06593c612fbd1019cc83f6dfb820a4b260f3d7a
tree68d29ace60b637f8c27fc8a04388cc3d3c180037
parent595c6282a92390897c695b013feddcbc46d7ab44
nfp: flower: refine the use of circular buffer

The current use of circular buffer to manage stats_context_id is
very obscure, and it will cause problem if its element size is
not power of two. So change the use more straightforward and
scalable, and also change that for mask_id to keep consistency.

Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/1639618621-5857-1-git-send-email-yinjun.zhang@corigine.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/flower/metadata.c