diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-01-24 18:32:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-24 18:32:47 -0500 |
commit | 04ed3e741d0f133e02bed7fa5c98edba128f90e7 (patch) | |
tree | 3dde4ca8306e98536faa69bccf0e47a2549c088f /include | |
parent | 57422dc530115e427dff464cc0a32bcd0efb5008 (diff) |
net: change netdev->features to u32
Quoting Ben Hutchings: we presumably won't be defining features that
can only be enabled on 64-bit architectures.
Occurences found by `grep -r` on net/, drivers/net, include/
[ Move features and vlan_features next to each other in
struct netdev, as per Eric Dumazet's suggestion -DaveM ]
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netdevice.h | 24 | ||||
-rw-r--r-- | include/linux/skbuff.h | 2 | ||||
-rw-r--r-- | include/net/protocol.h | 4 | ||||
-rw-r--r-- | include/net/tcp.h | 2 | ||||
-rw-r--r-- | include/net/udp.h | 2 |
5 files changed, 17 insertions, 17 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a335f2022690..0de3c59720fa 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -914,7 +914,11 @@ struct net_device { | |||
914 | struct list_head unreg_list; | 914 | struct list_head unreg_list; |
915 | 915 | ||
916 | /* Net device features */ | 916 | /* Net device features */ |
917 | unsigned long features; | 917 | u32 features; |
918 | |||
919 | /* VLAN feature mask */ | ||
920 | u32 vlan_features; | ||
921 | |||
918 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | 922 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ |
919 | #define NETIF_F_IP_CSUM 2 /* Can checksum TCP/UDP over IPv4. */ | 923 | #define NETIF_F_IP_CSUM 2 /* Can checksum TCP/UDP over IPv4. */ |
920 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | 924 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ |
@@ -1176,9 +1180,6 @@ struct net_device { | |||
1176 | /* rtnetlink link ops */ | 1180 | /* rtnetlink link ops */ |
1177 | const struct rtnl_link_ops *rtnl_link_ops; | 1181 | const struct rtnl_link_ops *rtnl_link_ops; |
1178 | 1182 | ||
1179 | /* VLAN feature mask */ | ||
1180 | unsigned long vlan_features; | ||
1181 | |||
1182 | /* for setting kernel sock attribute on TCP connection setup */ | 1183 | /* for setting kernel sock attribute on TCP connection setup */ |
1183 | #define GSO_MAX_SIZE 65536 | 1184 | #define GSO_MAX_SIZE 65536 |
1184 | unsigned int gso_max_size; | 1185 | unsigned int gso_max_size; |
@@ -1401,7 +1402,7 @@ struct packet_type { | |||
1401 | struct packet_type *, | 1402 | struct packet_type *, |
1402 | struct net_device *); | 1403 | struct net_device *); |
1403 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 1404 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
1404 | int features); | 1405 | u32 features); |
1405 | int (*gso_send_check)(struct sk_buff *skb); | 1406 | int (*gso_send_check)(struct sk_buff *skb); |
1406 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 1407 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
1407 | struct sk_buff *skb); | 1408 | struct sk_buff *skb); |
@@ -2370,7 +2371,7 @@ extern int netdev_tstamp_prequeue; | |||
2370 | extern int weight_p; | 2371 | extern int weight_p; |
2371 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); | 2372 | extern int netdev_set_master(struct net_device *dev, struct net_device *master); |
2372 | extern int skb_checksum_help(struct sk_buff *skb); | 2373 | extern int skb_checksum_help(struct sk_buff *skb); |
2373 | extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features); | 2374 | extern struct sk_buff *skb_gso_segment(struct sk_buff *skb, u32 features); |
2374 | #ifdef CONFIG_BUG | 2375 | #ifdef CONFIG_BUG |
2375 | extern void netdev_rx_csum_fault(struct net_device *dev); | 2376 | extern void netdev_rx_csum_fault(struct net_device *dev); |
2376 | #else | 2377 | #else |
@@ -2397,22 +2398,21 @@ extern char *netdev_drivername(const struct net_device *dev, char *buffer, int l | |||
2397 | 2398 | ||
2398 | extern void linkwatch_run_queue(void); | 2399 | extern void linkwatch_run_queue(void); |
2399 | 2400 | ||
2400 | unsigned long netdev_increment_features(unsigned long all, unsigned long one, | 2401 | u32 netdev_increment_features(u32 all, u32 one, u32 mask); |
2401 | unsigned long mask); | 2402 | u32 netdev_fix_features(u32 features, const char *name); |
2402 | unsigned long netdev_fix_features(unsigned long features, const char *name); | ||
2403 | 2403 | ||
2404 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, | 2404 | void netif_stacked_transfer_operstate(const struct net_device *rootdev, |
2405 | struct net_device *dev); | 2405 | struct net_device *dev); |
2406 | 2406 | ||
2407 | int netif_skb_features(struct sk_buff *skb); | 2407 | u32 netif_skb_features(struct sk_buff *skb); |
2408 | 2408 | ||
2409 | static inline int net_gso_ok(int features, int gso_type) | 2409 | static inline int net_gso_ok(u32 features, int gso_type) |
2410 | { | 2410 | { |
2411 | int feature = gso_type << NETIF_F_GSO_SHIFT; | 2411 | int feature = gso_type << NETIF_F_GSO_SHIFT; |
2412 | return (features & feature) == feature; | 2412 | return (features & feature) == feature; |
2413 | } | 2413 | } |
2414 | 2414 | ||
2415 | static inline int skb_gso_ok(struct sk_buff *skb, int features) | 2415 | static inline int skb_gso_ok(struct sk_buff *skb, u32 features) |
2416 | { | 2416 | { |
2417 | return net_gso_ok(features, skb_shinfo(skb)->gso_type) && | 2417 | return net_gso_ok(features, skb_shinfo(skb)->gso_type) && |
2418 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); | 2418 | (!skb_has_frag_list(skb) || (features & NETIF_F_FRAGLIST)); |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 6e946da9d1d6..31f02d0b46a7 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1877,7 +1877,7 @@ extern void skb_split(struct sk_buff *skb, | |||
1877 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, | 1877 | extern int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, |
1878 | int shiftlen); | 1878 | int shiftlen); |
1879 | 1879 | ||
1880 | extern struct sk_buff *skb_segment(struct sk_buff *skb, int features); | 1880 | extern struct sk_buff *skb_segment(struct sk_buff *skb, u32 features); |
1881 | 1881 | ||
1882 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, | 1882 | static inline void *skb_header_pointer(const struct sk_buff *skb, int offset, |
1883 | int len, void *buffer) | 1883 | int len, void *buffer) |
diff --git a/include/net/protocol.h b/include/net/protocol.h index dc07495bce4c..6f7eb800974a 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
@@ -38,7 +38,7 @@ struct net_protocol { | |||
38 | void (*err_handler)(struct sk_buff *skb, u32 info); | 38 | void (*err_handler)(struct sk_buff *skb, u32 info); |
39 | int (*gso_send_check)(struct sk_buff *skb); | 39 | int (*gso_send_check)(struct sk_buff *skb); |
40 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 40 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
41 | int features); | 41 | u32 features); |
42 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 42 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
43 | struct sk_buff *skb); | 43 | struct sk_buff *skb); |
44 | int (*gro_complete)(struct sk_buff *skb); | 44 | int (*gro_complete)(struct sk_buff *skb); |
@@ -57,7 +57,7 @@ struct inet6_protocol { | |||
57 | 57 | ||
58 | int (*gso_send_check)(struct sk_buff *skb); | 58 | int (*gso_send_check)(struct sk_buff *skb); |
59 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 59 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
60 | int features); | 60 | u32 features); |
61 | struct sk_buff **(*gro_receive)(struct sk_buff **head, | 61 | struct sk_buff **(*gro_receive)(struct sk_buff **head, |
62 | struct sk_buff *skb); | 62 | struct sk_buff *skb); |
63 | int (*gro_complete)(struct sk_buff *skb); | 63 | int (*gro_complete)(struct sk_buff *skb); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 38509f047382..917911165e3b 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1404,7 +1404,7 @@ extern struct request_sock_ops tcp6_request_sock_ops; | |||
1404 | extern void tcp_v4_destroy_sock(struct sock *sk); | 1404 | extern void tcp_v4_destroy_sock(struct sock *sk); |
1405 | 1405 | ||
1406 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | 1406 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); |
1407 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | 1407 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, u32 features); |
1408 | extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, | 1408 | extern struct sk_buff **tcp_gro_receive(struct sk_buff **head, |
1409 | struct sk_buff *skb); | 1409 | struct sk_buff *skb); |
1410 | extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head, | 1410 | extern struct sk_buff **tcp4_gro_receive(struct sk_buff **head, |
diff --git a/include/net/udp.h b/include/net/udp.h index bb967dd59bf7..e82f3a8c0f8f 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -245,5 +245,5 @@ extern void udp4_proc_exit(void); | |||
245 | extern void udp_init(void); | 245 | extern void udp_init(void); |
246 | 246 | ||
247 | extern int udp4_ufo_send_check(struct sk_buff *skb); | 247 | extern int udp4_ufo_send_check(struct sk_buff *skb); |
248 | extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, int features); | 248 | extern struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, u32 features); |
249 | #endif /* _UDP_H */ | 249 | #endif /* _UDP_H */ |