From: Haiqing Bai <Haiqing.Bai@windriver.com>
To: <jon.maloy@ericsson.com>, <ying.xue@windriver.com>,
<davem@davemloft.net>, <zhenbo.gao@windriver.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
Date: Mon, 20 Aug 2018 18:26:01 +0800 [thread overview]
Message-ID: <1534760761-30206-1-git-send-email-Haiqing.Bai@windriver.com> (raw)
The tipc multicast demo in tipcutils fails to work on big-endian hardware.
The tipc multicast server can not receive the packets sent by the multicast
client for that the dest port is always zero after tipc_dest_pop, then it
is found that the struct tipc_dest fails to take big/little endian into
account.
Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com>
Signed-off-by: Zhenbo Gao <zhenbo.gao@windriver.com>
---
net/tipc/name_table.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h
index 0febba4..6e1e0ab 100644
--- a/net/tipc/name_table.h
+++ b/net/tipc/name_table.h
@@ -135,8 +135,13 @@ struct tipc_dest {
struct list_head list;
union {
struct {
+#ifdef __LITTLE_ENDIAN_BITFIELD
u32 port;
u32 node;
+#else /* __BIG_ENDIAN_BITFIELD */
+ u32 node;
+ u32 port;
+#endif
};
u64 value;
};
--
1.9.1
next reply other threads:[~2018-08-20 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-20 10:26 Haiqing Bai [this message]
2018-08-21 2:20 ` [PATCH] tipc: fix issue that tipc_dest neglects of big-endian David Miller
2018-08-21 9:52 ` Jon Maloy
2018-08-21 9:57 ` Xue, Ying
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=1534760761-30206-1-git-send-email-Haiqing.Bai@windriver.com \
--to=haiqing.bai@windriver.com \
--cc=davem@davemloft.net \
--cc=jon.maloy@ericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ying.xue@windriver.com \
--cc=zhenbo.gao@windriver.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).