* [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
@ 2018-08-20 10:26 Haiqing Bai
2018-08-21 2:20 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Haiqing Bai @ 2018-08-20 10:26 UTC (permalink / raw)
To: jon.maloy, ying.xue, davem, zhenbo.gao; +Cc: netdev, linux-kernel
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
2018-08-20 10:26 [PATCH] tipc: fix issue that tipc_dest neglects of big-endian Haiqing Bai
@ 2018-08-21 2:20 ` David Miller
2018-08-21 9:52 ` Jon Maloy
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2018-08-21 2:20 UTC (permalink / raw)
To: Haiqing.Bai; +Cc: jon.maloy, ying.xue, zhenbo.gao, netdev, linux-kernel
From: Haiqing Bai <Haiqing.Bai@windriver.com>
Date: Mon, 20 Aug 2018 18:26:01 +0800
> 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>
Jon and Ying, please review.
thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
2018-08-21 2:20 ` David Miller
@ 2018-08-21 9:52 ` Jon Maloy
2018-08-21 9:57 ` Xue, Ying
0 siblings, 1 reply; 4+ messages in thread
From: Jon Maloy @ 2018-08-21 9:52 UTC (permalink / raw)
To: David Miller, Haiqing.Bai; +Cc: ying.xue, zhenbo.gao, netdev, linux-kernel
Hi David,
Please hold this one for now.
///jon
> -----Original Message-----
> From: David Miller <davem@davemloft.net>
> Sent: Monday, 20 August, 2018 22:21
> To: Haiqing.Bai@windriver.com
> Cc: Jon Maloy <jon.maloy@ericsson.com>; ying.xue@windriver.com; zhenbo.gao@windriver.com; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
>
> From: Haiqing Bai <Haiqing.Bai@windriver.com>
> Date: Mon, 20 Aug 2018 18:26:01 +0800
>
> > 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>
>
> Jon and Ying, please review.
>
> thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
2018-08-21 9:52 ` Jon Maloy
@ 2018-08-21 9:57 ` Xue, Ying
0 siblings, 0 replies; 4+ messages in thread
From: Xue, Ying @ 2018-08-21 9:57 UTC (permalink / raw)
To: Jon Maloy; +Cc: David Miller, Bai, Haiqing, Gao, Zhenbo, netdev, linux-kernel
Sorry, I am on vacation too. I agree with Jon. Please temporarily hold this patch. Once I am back, I will review it as soon as possible.
Sent from my iPhone
> On Aug 21, 2018, at 9:52 PM, Jon Maloy <jon.maloy@ericsson.com> wrote:
>
> Hi David,
> Please hold this one for now.
>
> ///jon
>
>> -----Original Message-----
>> From: David Miller <davem@davemloft.net>
>> Sent: Monday, 20 August, 2018 22:21
>> To: Haiqing.Bai@windriver.com
>> Cc: Jon Maloy <jon.maloy@ericsson.com>; ying.xue@windriver.com; zhenbo.gao@windriver.com; netdev@vger.kernel.org; linux-
>> kernel@vger.kernel.org
>> Subject: Re: [PATCH] tipc: fix issue that tipc_dest neglects of big-endian
>>
>> From: Haiqing Bai <Haiqing.Bai@windriver.com>
>> Date: Mon, 20 Aug 2018 18:26:01 +0800
>>
>>> 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>
>>
>> Jon and Ying, please review.
>>
>> thank you.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-21 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20 10:26 [PATCH] tipc: fix issue that tipc_dest neglects of big-endian Haiqing Bai
2018-08-21 2:20 ` David Miller
2018-08-21 9:52 ` Jon Maloy
2018-08-21 9:57 ` Xue, Ying
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).