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/linux/netdevice.h | |
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/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 24 |
1 files changed, 12 insertions, 12 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)); |