net/thunderx: use new API to save cycles on aarch64

Use the new API to wait in low power state instead of continuous
polling to save CPU cycles and power.

Signed-off-by: Gavin Hu <gavin.hu@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
Gavin Hu 2019-11-07 22:35:27 +01:00 committed by David Marchand
parent b13a21890a
commit 52c8620022
3 changed files with 3 additions and 2 deletions

View File

@ -10,6 +10,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_pmd_thunderx_nicvf.a
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -DALLOW_EXPERIMENTAL_API
LDLIBS += -lm
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring

View File

@ -4,6 +4,7 @@
subdir('base')
objs = [base_objs]
allow_experimental_apis = true
sources = files('nicvf_rxtx.c',
'nicvf_ethdev.c',
'nicvf_svf.c'

View File

@ -385,8 +385,7 @@ nicvf_fill_rbdr(struct nicvf_rxq *rxq, int to_fill)
ltail++;
}
while (__atomic_load_n(&rbdr->tail, __ATOMIC_RELAXED) != next_tail)
rte_pause();
rte_wait_until_equal_32(&rbdr->tail, next_tail, __ATOMIC_RELAXED);
__atomic_store_n(&rbdr->tail, ltail, __ATOMIC_RELEASE);
nicvf_addr_write(door, to_fill);