Thread (7 messages) 7 messages, 4 authors, 2018-06-29

RE: [net-next 2/3] tipc: implement socket diagnostics for AF_TIPC

flat view

From: Jon Maloy <hidden>
Date: 2018-06-29 15:03:52

What about a union?
///jon
-----Original Message-----
From: Eric Dumazet <redacted>
Sent: Friday, 29 June, 2018 09:58
To: Mohan Krishna Ghanta Krishnamurthy <redacted>; tipc-
discussion@lists.sourceforge.net; Jon Maloy [off-list ref]; maloy@donjonn.com; ying.xue@windriver.com;
netdev@vger.kernel.org; davem@davemloft.net
Cc: Parthasarathy Bhuvaragan <redacted>
Subject: Re: [net-next 2/3] tipc: implement socket diagnostics for AF_TIPC



On 03/21/2018 06:37 AM, GhantaKrishnamurthy MohanKrishna wrote:
quoted
This commit adds socket diagnostics capability for AF_TIPC in netlink
family NETLINK_SOCK_DIAG in a new kernel module (diag.ko).
...
quoted
+static u64 __tipc_diag_gen_cookie(struct sock *sk)
+{
+	u32 res[2];
+
+	sock_diag_save_cookie(sk, res);
+	return *((u64 *)res);
+}
I am pretty sure some combination of compiler / arch could be not happy
with this assumption that res[] is aligned to allow an u64 to be read like that.
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help