[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CY4PR15MB15754702C2F63F5A4401104A9A4E0@CY4PR15MB1575.namprd15.prod.outlook.com>
Date: Fri, 29 Jun 2018 15:03:41 +0000
From: Jon Maloy <jon.maloy@...csson.com>
To: Eric Dumazet <eric.dumazet@...il.com>,
Mohan Krishna Ghanta Krishnamurthy
<mohan.krishna.ghanta.krishnamurthy@...csson.com>,
"tipc-discussion@...ts.sourceforge.net"
<tipc-discussion@...ts.sourceforge.net>,
"maloy@...jonn.com" <maloy@...jonn.com>,
"ying.xue@...driver.com" <ying.xue@...driver.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>
CC: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...il.com>
Subject: RE: [net-next 2/3] tipc: implement socket diagnostics for AF_TIPC
What about a union?
///jon
> -----Original Message-----
> From: Eric Dumazet <eric.dumazet@...il.com>
> Sent: Friday, 29 June, 2018 09:58
> To: Mohan Krishna Ghanta Krishnamurthy <mohan.krishna.ghanta.krishnamurthy@...csson.com>; tipc-
> discussion@...ts.sourceforge.net; Jon Maloy <jon.maloy@...csson.com>; maloy@...jonn.com; ying.xue@...driver.com;
> netdev@...r.kernel.org; davem@...emloft.net
> Cc: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@...il.com>
> Subject: Re: [net-next 2/3] tipc: implement socket diagnostics for AF_TIPC
>
>
>
> On 03/21/2018 06:37 AM, GhantaKrishnamurthy MohanKrishna wrote:
> > This commit adds socket diagnostics capability for AF_TIPC in netlink
> > family NETLINK_SOCK_DIAG in a new kernel module (diag.ko).
>
> ...
> > +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.
>
Powered by blists - more mailing lists