On Sat, 22 Feb 2025 15:22:32 +0800
Bingbin Chen <chen.bing...@zte.com.cn> wrote:

> Implement stat values clean operation by agent channel.
> 
> Signed-off-by: Bingbin Chen <chen.bing...@zte.com.cn>
> ---

The conversion to spinlock is good idea, but now the lock annotation
is catching a different issue.

It helps to have a cover letter on each patch series

-------------------------------BEGIN LOGS----------------------------
####################################################################################
#### [Begin job log] "ubuntu-22.04-clang-stdatomic" at step Build and test
####################################################################################
[2300/3227] Compiling C object 
drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_common.c.o
[2301/3227] Compiling C object 
drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_msg.c.o
[2302/3227] Compiling C object 
drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_queue.c.o
[2303/3227] Compiling C object drivers/libtmp_rte_net_xsc.a.p/net_xsc_xsc_tx.c.o
[2304/3227] Linking static target drivers/libtmp_rte_net_xsc.a
[2305/3227] Compiling C object 
drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_np.c.o
FAILED: drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_np.c.o 
ccache clang -Idrivers/libtmp_rte_net_zxdh.a.p -Idrivers -I../drivers 
-Idrivers/net/zxdh -I../drivers/net/zxdh -Ilib/ethdev -I../lib/ethdev -I. -I.. 
-Iconfig -I../config -Ilib/eal/include -I../lib/eal/include 
-Ilib/eal/linux/include -I../lib/eal/linux/include -Ilib/eal/x86/include 
-I../lib/eal/x86/include -I../kernel/linux -Ilib/eal/common -I../lib/eal/common 
-Ilib/eal -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log 
-Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net 
-I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool -Ilib/ring 
-I../lib/ring -Ilib/meter -I../lib/meter -Idrivers/bus/pci -I../drivers/bus/pci 
-I../drivers/bus/pci/linux -Ilib/pci -I../lib/pci -Idrivers/bus/vdev 
-I../drivers/bus/vdev -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 
-Wall -Winvalid-pch -Wextra -Werror -std=c11 -O2 -g -include rte_config.h -Wvla 
-Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security 
-Wmissing-declarations -W
 missing-prototypes -Wnested-externs -Wold-style-definition -Wpointer-arith 
-Wsign-compare -Wstrict-prototypes -Wundef -Wwrite-strings 
-Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -march=corei7 -mrtm 
-DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-address-of-packed-member 
-Wno-vla -DRTE_LOG_DEFAULT_LOGTYPE=pmd.net.zxdh -DRTE_ANNOTATE_LOCKS 
-Wthread-safety -MD -MQ drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_np.c.o 
-MF drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_np.c.o.d -o 
drivers/libtmp_rte_net_zxdh.a.p/net_zxdh_zxdh_np.c.o -c 
../drivers/net/zxdh/zxdh_np.c
../drivers/net/zxdh/zxdh_np.c:621:1: error: mutex 'p_spinlock->spinlock' is 
still held at the end of function [-Werror,-Wthread-safety-analysis]
}
^
../drivers/net/zxdh/zxdh_np.c:620:2: note: mutex acquired here
        rte_spinlock_lock(&p_spinlock->spinlock);
        ^
../drivers/net/zxdh/zxdh_np.c:626:2: error: releasing spinlock 
'p_spinlock->spinlock' that was not held [-Werror,-Wthread-safety-analysis]
        rte_spinlock_unlock(&p_spinlock->spinlock);
        ^
2 errors generated.

Reply via email to