[dpdk-dev] [PATCH v3 18/29] net/cxgbe: use eal I/O device memory read/write API

Ferruh Yigit ferruh.yigit at intel.com
Thu Jan 12 20:12:33 CET 2017


On 1/12/2017 9:17 AM, Jerin Jacob wrote:
<...>

>  
> -#define CXGBE_PCI_REG_WRITE(reg, value) ({ \
> -	CXGBE_PCI_REG((reg)) = (value); })
> +#define CXGBE_PCI_REG_WRITE(reg, value) rte_write32((value), (reg))

Almost all (if not all) PMD write macros' argument order is like
write(address, value), but rte_writeX has rte_writex(value, address)

What is the common usage for this kind of function?
What do you think reverting argument order?

As a similar example, dpdk ether_addr_copy(src, dst) function argument
order is revers according common usage, and keeps confusing people.

<...>



More information about the dev mailing list