[PATCH v2 03/18] net/r8169: add hardware registers access routines
Stephen Hemminger
stephen at networkplumber.org
Thu Oct 17 18:34:24 CEST 2024
On Thu, 17 Oct 2024 14:31:45 +0800
Howard Wang <howard_wang at realsil.com.cn> wrote:
> +u32
> +rtl_csi_read(struct rtl_hw *hw, u32 addr)
> +{
> + u32 cmd;
> + int i;
> + u32 value = 0;
> +
> + cmd = CSIAR_Read | CSIAR_ByteEn << CSIAR_ByteEn_shift |
> + (addr & CSIAR_Addr_Mask);
> +
> + RTL_W32(hw, CSIAR, cmd);
> +
> + for (i = 0; i < 10; i++) {
> + udelay(100);
With DPDK drivers, it is preferred to use rte_delay instead of usleep.
Usleep ends up being a system call (nanosleep) and that can take much
longer than you want. rte_delay_us() is a spin loop.
More information about the dev
mailing list