From: Dmitry Fleytman <dmitry@daynix.com>
To: qemu-devel@nongnu.org
Cc: Dmitry Fleytman <dmitry@daynix.com>,
Yan Vugenfirer <yan@daynix.com>,
Stefan Hajnoczi <stefanha@gmail.com>,
Anthony Liguori <anthony@codemonkey.ws>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [2/2] [vmxnet3] const_cpu_to_le64 wrapping for feature bits dropped
Date: Thu, 28 Mar 2013 10:53:30 +0200 [thread overview]
Message-ID: <1364460810-24876-3-git-send-email-dmitry@daynix.com> (raw)
In-Reply-To: <1364460810-24876-1-git-send-email-dmitry@daynix.com>
Byte swap is redundant because shared memory reading functions
already swap bytes when required
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com>
---
hw/vmxnet3.h | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/hw/vmxnet3.h b/hw/vmxnet3.h
index 7db0c8f..4eae7c7 100644
--- a/hw/vmxnet3.h
+++ b/hw/vmxnet3.h
@@ -37,10 +37,8 @@
#define __packed QEMU_PACKED
#if defined(HOST_WORDS_BIGENDIAN)
-#define const_cpu_to_le64(x) bswap_64(x)
#define __BIG_ENDIAN_BITFIELD
#else
-#define const_cpu_to_le64(x) (x)
#endif
/*
@@ -137,10 +135,10 @@ struct UPT1_RSSConf {
/* features */
enum {
- UPT1_F_RXCSUM = const_cpu_to_le64(0x0001), /* rx csum verification */
- UPT1_F_RSS = const_cpu_to_le64(0x0002),
- UPT1_F_RXVLAN = const_cpu_to_le64(0x0004), /* VLAN tag stripping */
- UPT1_F_LRO = const_cpu_to_le64(0x0008),
+ UPT1_F_RXCSUM = 0x0001, /* rx csum verification */
+ UPT1_F_RSS = 0x0002,
+ UPT1_F_RXVLAN = 0x0004, /* VLAN tag stripping */
+ UPT1_F_LRO = 0x0008,
};
/* all registers are 32 bit wide */
@@ -752,7 +750,6 @@ struct Vmxnet3_DriverShared {
#undef __le32
#undef __le64
#undef __packed
-#undef const_cpu_to_le64
#if defined(HOST_WORDS_BIGENDIAN)
#undef __BIG_ENDIAN_BITFIELD
#endif
--
1.8.1.4
next prev parent reply other threads:[~2013-03-28 8:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 8:53 [Qemu-devel] [0/2] [vmxnet3] iPXE support and byte swapping fix Dmitry Fleytman
2013-03-28 8:53 ` [Qemu-devel] [1/2] [vmxnet3] iPXE compatibility fixes Dmitry Fleytman
2013-03-28 8:53 ` Dmitry Fleytman [this message]
2013-04-02 6:14 ` [Qemu-devel] [2/2] [vmxnet3] const_cpu_to_le64 wrapping for feature bits dropped Alexander Graf
2013-04-08 12:03 ` [Qemu-devel] [0/2] [vmxnet3] iPXE support and byte swapping fix Stefan Hajnoczi
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=1364460810-24876-3-git-send-email-dmitry@daynix.com \
--to=dmitry@daynix.com \
--cc=anthony@codemonkey.ws \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
--cc=yan@daynix.com \
/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).