Skip to contentSkip to conversation

pmd: use byte ordering functions from dpdk

PATCH In review Thomas Monjalon 2 participants 3 messages Sep 30, 2013 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pmd: use byte ordering functions from dpdk

CPU should always use little endian on Intel
but it is more consistent to use DPDK macros.

---
 pmd/vmx_user.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
pmd/vmx_user.h +7 -7
index 4a1a95c..7181a3b 100644
@@ -1,5 +1,5 @@
 /*
- * Copyright 6WIND 2012-2013, All rights reserved.
+ * Copyright 2012-2013 6WIND S.A.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -40,12 +40,12 @@ typedef uint32_t u32;
 typedef uint64_t u64;
 typedef phys_addr_t dma_addr_t;
 
-#define le16_to_cpu(x) (x)
-#define cpu_to_le16(x) (x)
-#define le32_to_cpu(x) (x)
-#define cpu_to_le32(x) (x)
-#define le64_to_cpu(x) (x)
-#define cpu_to_le64(x) (x)
+#define le16_to_cpu(x) rte_le_to_cpu_16(x)
+#define cpu_to_le16(x) rte_cpu_to_le_16(x)
+#define le32_to_cpu(x) rte_le_to_cpu_32(x)
+#define cpu_to_le32(x) rte_cpu_to_le_32(x)
+#define le64_to_cpu(x) rte_le_to_cpu_64(x)
+#define cpu_to_le64(x) rte_cpu_to_le_64(x)
 
 #define readl(addr) \
 	(*((volatile uint32_t*)((unsigned long)(addr))))
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 1380531353-23482-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#2 lore raw
Quoted 7 lines · Thomas Monjalon

CPU should always use little endian on Intel
but it is more consistent to use DPDK macros.

Signed-off-by Thomas Monjalon
---
 pmd/vmx_user.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

30/09/2013 11:07, Damien Millescamps :

Quoted 11 lines · Thomas Monjalon
Quoted 8 lines

CPU should always use little endian on Intel
but it is more consistent to use DPDK macros.

Signed-off-by Thomas Monjalon

---

 pmd/vmx_user.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

pushed

Signature · 1 line
Thomas