From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] pmd: use byte ordering functions from dpdk
Date: Mon, 30 Sep 2013 10:55:53 +0200 [thread overview]
Message-ID: <1380531353-23482-1-git-send-email-thomas.monjalon@6wind.com> (raw)
CPU should always use little endian on Intel
but it is more consistent to use DPDK macros.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
pmd/vmx_user.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/pmd/vmx_user.h b/pmd/vmx_user.h
index 4a1a95c..7181a3b 100644
--- a/pmd/vmx_user.h
+++ b/pmd/vmx_user.h
@@ -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))))
--
1.7.10.4
next reply other threads:[~2013-09-30 8:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-30 8:55 Thomas Monjalon [this message]
2013-09-30 9:07 ` Damien Millescamps
2013-09-30 9:24 ` [dpdk-dev] [vmxnet3-usermap PATCH] " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380531353-23482-1-git-send-email-thomas.monjalon@6wind.com \
--to=thomas.monjalon@6wind.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).