net: removes unnecessary dependencies for net_namespace.h
Subsystems (4)
PATCH 1/1 net: removes unnecessary dependencies for net_namespace.h
This patch removes some unneeded includes for net_namespace.h to speed up compilation.
include/net/pkt_cls.h +0 -1
@@ -2,7 +2,6 @@#define __NET_PKT_CLS_H#include <linux/pkt_cls.h> -#include <net/net_namespace.h> #include <net/sch_generic.h> #include <net/act_api.h>
include/net/sock.h +1 -1
@@ -57,7 +57,6 @@#include <asm/atomic.h> #include <net/dst.h> #include <net/checksum.h> -#include <net/net_namespace.h> /* * This structure really needs to be cleaned up.
@@ -95,6 +94,7 @@ typedef struct {struct sock ;struct proto ; +struct net ;/** * struct sock_common - minimal network layer representation of sockets
Quoted 10 lines · Denis V. Lunev
This patch removes some unneeded includes for
net_namespace.hto speed up compilation.Signed-off-by Denis V. Lunev <[email protected]>include/net/pkt_cls.h +0
-0
include/net/pkt_cls.h line 6
Quoted 6 lines
include/net/pkt_cls.h +0
-1@@ -2,7 +2,6 @@#define __NET_PKT_CLS_H#include <linux/pkt_cls.h> -#include <net/net_namespace.h> #include <net/sch_generic.h> #include <net/act_api.h>
What of tcf_match_indev? I guess linux/netdevice.h brings it in for us but still.
Quoted 13 lines
include/net/sock.h +0
-1@@ -57,7 +57,6 @@#include <asm/atomic.h> #include <net/dst.h> #include <net/checksum.h> -#include <net/net_namespace.h> /* * This structure really needs to be cleaned up.
include/net/sock.h typedef struct { · line 100
Quoted 7 lines
include/net/sock.h +1
-0@@ -95,6 +94,7 @@ typedef struct {struct sock ;struct proto ; +struct net ;/** * struct sock_common - minimal network layer representation of sockets
This hunk definitely looks sane.
Eric
you right, how about this?
Quoted 40 lines · Eric W. Biederman
Quoted 10 lines · Denis V. Lunev
This patch removes some unneeded includes for
net_namespace.hto speed up compilation.Signed-off-by Denis V. Lunev <[email protected]>include/net/pkt_cls.h +0
-0include/net/pkt_cls.h line 6
Quoted 6 lines
include/net/pkt_cls.h +0
-1@@ -2,7 +2,6 @@#define __NET_PKT_CLS_H#include <linux/pkt_cls.h> -#include <net/net_namespace.h> #include <net/sch_generic.h> #include <net/act_api.h> What of
tcf_match_indev? I guesslinux/netdevice.hbrings it in for us but still.Quoted 18 lines
include/net/sock.h +1
-1@@ -57,7 +57,6 @@#include <asm/atomic.h> #include <net/dst.h> #include <net/checksum.h> -#include <net/net_namespace.h> /* * This structure really needs to be cleaned up. @@ -95,6 +94,7 @@ typedef struct {struct sock ;struct proto ; +struct net ;
Quoted 8 lines
include/net/sock.h typedef struct { · line 100
Quoted 2 lines
include/net/sock.h +0
-0/** * struct sock_common - minimal network layer representation of sockets This hunk definitely looks sane.
Eric
include/net/pkt_cls.h +2 -1
@@ -2,7 +2,6 @@#define __NET_PKT_CLS_H#include <linux/pkt_cls.h> -#include <net/net_namespace.h> #include <net/sch_generic.h> #include <net/act_api.h>
@@ -336,6 +335,8 @@ static inline int tcf_valid_offset(const struct sk_buff *skb, }#ifdef CONFIG_NET_CLS_IND +#include <net/net_namespace.h> +static inline int tcf_change_indev (struct tcf_proto *tp,char *indev,struct rtattr *indev_tlv) {
include/net/sock.h +1 -1
@@ -57,7 +57,6 @@#include <asm/atomic.h> #include <net/dst.h> #include <net/checksum.h> -#include <net/net_namespace.h> /* * This structure really needs to be cleaned up.
@@ -95,6 +94,7 @@ typedef struct {struct sock ;struct proto ; +struct net ;/** * struct sock_common - minimal network layer representation of sockets
Eric W. Biederman
Acked-byLooks good to me.
Eric
Quoted 94 lines · Denis V. Lunev
you right, how about this?
Quoted 48 lines · Eric W. Biederman
Quoted 10 lines · Denis V. Lunev
This patch removes some unneeded includes for
net_namespace.hto speed up compilation.Signed-off-by Denis V. Lunev <[email protected]>include/net/pkt_cls.h +0
-0include/net/pkt_cls.h line 6
Quoted 6 lines
include/net/pkt_cls.h +0
-1@@ -2,7 +2,6 @@#define __NET_PKT_CLS_H#include <linux/pkt_cls.h> -#include <net/net_namespace.h> #include <net/sch_generic.h> #include <net/act_api.h> What of
tcf_match_indev? I guesslinux/netdevice.hbrings it in for us but still.Quoted 13 lines
include/net/sock.h +0
-1@@ -57,7 +57,6 @@#include <asm/atomic.h> #include <net/dst.h> #include <net/checksum.h> -#include <net/net_namespace.h> /* * This structure really needs to be cleaned up. include/net/sock.h typedef struct { · line 100
Quoted 7 lines
include/net/sock.h +1
-0@@ -95,6 +94,7 @@ typedef struct {struct sock ;struct proto ; +struct net ;/** * struct sock_common - minimal network layer representation of sockets This hunk definitely looks sane.
Eric
include/net/pkt_cls.h +2
-1@@ -2,7 +2,6 @@#define __NET_PKT_CLS_H#include <linux/pkt_cls.h> -#include <net/net_namespace.h> #include <net/sch_generic.h> #include <net/act_api.h> @@ -336,6 +335,8 @@ static inline int tcf_valid_offset(const struct sk_buff *skb, }#ifdef CONFIG_NET_CLS_IND +#include <net/net_namespace.h> +static inline int tcf_change_indev (struct tcf_proto *tp,char *indev,struct rtattr *indev_tlv){
include/net/sock.h +1
-1@@ -57,7 +57,6 @@#include <asm/atomic.h> #include <net/dst.h> #include <net/checksum.h> -#include <net/net_namespace.h> /* * This structure really needs to be cleaned up. @@ -95,6 +94,7 @@ typedef struct {struct sock ;struct proto ; +struct net ;/** * struct sock_common - minimal network layer representation of sockets