[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAM_iQpWJur_+hFZwj8bLa3bZwEd=aT5mWdhfapd5E9h9Q0HVUg@mail.gmail.com>
Date: Wed, 26 Jul 2017 15:01:32 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: "Levin, Alexander (Sasha Levin)" <alexander.levin@...izon.com>
Cc: "davem@...emloft.net" <davem@...emloft.net>,
"kuznet@....inr.ac.ru" <kuznet@....inr.ac.ru>,
"yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: inet: diag: expose sockets cgroup classid
On Wed, Jul 26, 2017 at 10:22 AM, Levin, Alexander (Sasha Levin)
<alexander.levin@...izon.com> wrote:
> + if (ext & (1 << (INET_DIAG_CLASS_ID - 1))) {
> + u32 classid = 0;
> +
> +#ifdef CONFIG_SOCK_CGROUP_DATA
> + classid = sock_cgroup_classid(&sk->sk_cgrp_data);
> +#endif
If CONFIG_SOCK_CGROUP_DATA is not enabled, should we put 0
or put nothing (that is, skipping this nla_put())?
> +
> + nla_put(skb, INET_DIAG_CLASS_ID, sizeof(classid), &classid);
nla_put_u32()
Thanks.
Powered by blists - more mailing lists