Thread (222 messages) 222 messages, 11 authors, 2017-01-19

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

From: Ferruh Yigit <hidden>
Date: 2017-01-12 19:13:13

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.

<...>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help