[dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update on aarch64

Stephen Hemminger stephen at networkplumber.org
Wed Apr 28 19:17:14 CEST 2021


On Sun, 25 Apr 2021 05:56:53 +0000
Ruifeng Wang <ruifeng.wang at arm.com> wrote:

> Instead of polling for tail to be updated, use wfe instruction.
> 
> Signed-off-by: Gavin Hu <gavin.hu at arm.com>
> Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> Reviewed-by: Steve Capper <steve.capper at arm.com>
> Reviewed-by: Ola Liljedahl <ola.liljedahl at arm.com>
> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> Acked-by: Konstantin Ananyev <konstantin.ananyev at intel.com>

Looks ok to me, but it does raise an interesting question.
Shouldn't the original code have been using atomic load to look at ht->tail.

This another place where "volatile considered harmful" applies.


More information about the dev mailing list