Patchwork netprio_cgroup: define sk_cgrp_prioidx only if NETPRIO_CGROUP is enabled

login
register
mail settings
Submitter Zefan Li
Date Dec. 26, 2012, 6:48 a.m.
Message ID <50DA9DB8.6080506@huawei.com>
Download mbox | patch
Permalink /patch/208144/
State Accepted
Delegated to: David Miller
Headers show

Comments

Zefan Li - Dec. 26, 2012, 6:48 a.m.
sock->sk_cgrp_prioidx won't be used at all if CONFIG_NETPRIO_CGROUP=n.

Signed-off-by: Li Zefan <lizefan@huawei.com>
---
 include/net/sock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Neil Horman - Dec. 26, 2012, 6:03 p.m.
On Wed, Dec 26, 2012 at 02:48:24PM +0800, Li Zefan wrote:
> sock->sk_cgrp_prioidx won't be used at all if CONFIG_NETPRIO_CGROUP=n.
> 
> Signed-off-by: Li Zefan <lizefan@huawei.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>

> ---
>  include/net/sock.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/net/sock.h b/include/net/sock.h
> index 93a6745..182ca99 100644
> --- a/include/net/sock.h
> +++ b/include/net/sock.h
> @@ -367,7 +367,7 @@ struct sock {
>  	unsigned short		sk_ack_backlog;
>  	unsigned short		sk_max_ack_backlog;
>  	__u32			sk_priority;
> -#ifdef CONFIG_CGROUPS
> +#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
>  	__u32			sk_cgrp_prioidx;
>  #endif
>  	struct pid		*sk_peer_pid;
> -- 
> 1.8.0.2
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Dec. 26, 2012, 10:16 p.m.
From: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 26 Dec 2012 13:03:39 -0500

> On Wed, Dec 26, 2012 at 02:48:24PM +0800, Li Zefan wrote:
>> sock->sk_cgrp_prioidx won't be used at all if CONFIG_NETPRIO_CGROUP=n.
>> 
>> Signed-off-by: Li Zefan <lizefan@huawei.com>
> Acked-by: Neil Horman <nhorman@tuxdriver.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/include/net/sock.h b/include/net/sock.h
index 93a6745..182ca99 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -367,7 +367,7 @@  struct sock {
 	unsigned short		sk_ack_backlog;
 	unsigned short		sk_max_ack_backlog;
 	__u32			sk_priority;
-#ifdef CONFIG_CGROUPS
+#if IS_ENABLED(CONFIG_NETPRIO_CGROUP)
 	__u32			sk_cgrp_prioidx;
 #endif
 	struct pid		*sk_peer_pid;