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 | |
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>
-rw-r--r-- | drivers/net/bnx2.c | 2 | ||||
-rw-r--r-- | drivers/net/bonding/bond_main.c | 4 | ||||
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 4 | ||||
-rw-r--r-- | drivers/net/sfc/ethtool.c | 4 | ||||
-rw-r--r-- | drivers/net/sfc/net_driver.h | 2 | ||||
-rw-r--r-- | drivers/net/tun.c | 2 | ||||
-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 | ||||
-rw-r--r-- | net/8021q/vlan.c | 2 | ||||
-rw-r--r-- | net/bridge/br_if.c | 2 | ||||
-rw-r--r-- | net/bridge/br_private.h | 2 | ||||
-rw-r--r-- | net/core/dev.c | 15 | ||||
-rw-r--r-- | net/core/ethtool.c | 2 | ||||
-rw-r--r-- | net/core/net-sysfs.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 4 | ||||
-rw-r--r-- | net/ipv4/af_inet.c | 2 | ||||
-rw-r--r-- | net/ipv4/tcp.c | 2 | ||||
-rw-r--r-- | net/ipv4/udp.c | 2 | ||||
-rw-r--r-- | net/ipv6/af_inet6.c | 2 | ||||
-rw-r--r-- | net/ipv6/udp.c | 2 |
23 files changed, 45 insertions, 46 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index df99edf3464a..cab96fa4cd3a 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -8312,7 +8312,7 @@ static const struct net_device_ops bnx2_netdev_ops = { | |||
8312 | #endif | 8312 | #endif |
8313 | }; | 8313 | }; |
8314 | 8314 | ||
8315 | static void inline vlan_features_add(struct net_device *dev, unsigned long flags) | 8315 | static void inline vlan_features_add(struct net_device *dev, u32 flags) |
8316 | { | 8316 | { |
8317 | dev->vlan_features |= flags; | 8317 | dev->vlan_features |= flags; |
8318 | } | 8318 | } |
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 163e0b06eaa5..7047b406b8ba 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -1372,8 +1372,8 @@ static int bond_compute_features(struct bonding *bond) | |||
1372 | { | 1372 | { |
1373 | struct slave *slave; | 1373 | struct slave *slave; |
1374 | struct net_device *bond_dev = bond->dev; | 1374 | struct net_device *bond_dev = bond->dev; |
1375 | unsigned long features = bond_dev->features; | 1375 | u32 features = bond_dev->features; |
1376 | unsigned long vlan_features = 0; | 1376 | u32 vlan_features = 0; |
1377 | unsigned short max_hard_header_len = max((u16)ETH_HLEN, | 1377 | unsigned short max_hard_header_len = max((u16)ETH_HLEN, |
1378 | bond_dev->hard_header_len); | 1378 | bond_dev->hard_header_len); |
1379 | int i; | 1379 | int i; |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index ea5cfe2c3a04..a7f2eed9a08a 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -253,7 +253,7 @@ struct myri10ge_priv { | |||
253 | unsigned long serial_number; | 253 | unsigned long serial_number; |
254 | int vendor_specific_offset; | 254 | int vendor_specific_offset; |
255 | int fw_multicast_support; | 255 | int fw_multicast_support; |
256 | unsigned long features; | 256 | u32 features; |
257 | u32 max_tso6; | 257 | u32 max_tso6; |
258 | u32 read_dma; | 258 | u32 read_dma; |
259 | u32 write_dma; | 259 | u32 write_dma; |
@@ -1776,7 +1776,7 @@ static int myri10ge_set_rx_csum(struct net_device *netdev, u32 csum_enabled) | |||
1776 | static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled) | 1776 | static int myri10ge_set_tso(struct net_device *netdev, u32 tso_enabled) |
1777 | { | 1777 | { |
1778 | struct myri10ge_priv *mgp = netdev_priv(netdev); | 1778 | struct myri10ge_priv *mgp = netdev_priv(netdev); |
1779 | unsigned long flags = mgp->features & (NETIF_F_TSO6 | NETIF_F_TSO); | 1779 | u32 flags = mgp->features & (NETIF_F_TSO6 | NETIF_F_TSO); |
1780 | 1780 | ||
1781 | if (tso_enabled) | 1781 | if (tso_enabled) |
1782 | netdev->features |= flags; | 1782 | netdev->features |= flags; |
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 0e8bb19ed60d..713969accdbd 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -502,7 +502,7 @@ static void efx_ethtool_get_stats(struct net_device *net_dev, | |||
502 | static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable) | 502 | static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable) |
503 | { | 503 | { |
504 | struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev); | 504 | struct efx_nic *efx __attribute__ ((unused)) = netdev_priv(net_dev); |
505 | unsigned long features; | 505 | u32 features; |
506 | 506 | ||
507 | features = NETIF_F_TSO; | 507 | features = NETIF_F_TSO; |
508 | if (efx->type->offload_features & NETIF_F_V6_CSUM) | 508 | if (efx->type->offload_features & NETIF_F_V6_CSUM) |
@@ -519,7 +519,7 @@ static int efx_ethtool_set_tso(struct net_device *net_dev, u32 enable) | |||
519 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) | 519 | static int efx_ethtool_set_tx_csum(struct net_device *net_dev, u32 enable) |
520 | { | 520 | { |
521 | struct efx_nic *efx = netdev_priv(net_dev); | 521 | struct efx_nic *efx = netdev_priv(net_dev); |
522 | unsigned long features = efx->type->offload_features & NETIF_F_ALL_CSUM; | 522 | u32 features = efx->type->offload_features & NETIF_F_ALL_CSUM; |
523 | 523 | ||
524 | if (enable) | 524 | if (enable) |
525 | net_dev->features |= features; | 525 | net_dev->features |= features; |
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 28df8665256a..c65270241d2d 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -906,7 +906,7 @@ struct efx_nic_type { | |||
906 | unsigned int phys_addr_channels; | 906 | unsigned int phys_addr_channels; |
907 | unsigned int tx_dc_base; | 907 | unsigned int tx_dc_base; |
908 | unsigned int rx_dc_base; | 908 | unsigned int rx_dc_base; |
909 | unsigned long offload_features; | 909 | u32 offload_features; |
910 | u32 reset_world_flags; | 910 | u32 reset_world_flags; |
911 | }; | 911 | }; |
912 | 912 | ||
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b100bd50a0d7..55786a0efc41 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -1142,7 +1142,7 @@ static int tun_get_iff(struct net *net, struct tun_struct *tun, | |||
1142 | * privs required. */ | 1142 | * privs required. */ |
1143 | static int set_offload(struct net_device *dev, unsigned long arg) | 1143 | static int set_offload(struct net_device *dev, unsigned long arg) |
1144 | { | 1144 | { |
1145 | unsigned int old_features, features; | 1145 | u32 old_features, features; |
1146 | 1146 | ||
1147 | old_features = dev->features; | 1147 | old_features = dev->features; |
1148 | /* Unset features, set them as we chew on the arg. */ | 1148 | /* Unset features, set them as we chew on the arg. */ |
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 */ |
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 6e64f7c6a2e9..7850412f52b7 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c | |||
@@ -327,7 +327,7 @@ static void vlan_sync_address(struct net_device *dev, | |||
327 | static void vlan_transfer_features(struct net_device *dev, | 327 | static void vlan_transfer_features(struct net_device *dev, |
328 | struct net_device *vlandev) | 328 | struct net_device *vlandev) |
329 | { | 329 | { |
330 | unsigned long old_features = vlandev->features; | 330 | u32 old_features = vlandev->features; |
331 | 331 | ||
332 | vlandev->features &= ~dev->vlan_features; | 332 | vlandev->features &= ~dev->vlan_features; |
333 | vlandev->features |= dev->features & dev->vlan_features; | 333 | vlandev->features |= dev->features & dev->vlan_features; |
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index d9d1e2bac1d6..52ce4a30f8b3 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -365,7 +365,7 @@ int br_min_mtu(const struct net_bridge *br) | |||
365 | void br_features_recompute(struct net_bridge *br) | 365 | void br_features_recompute(struct net_bridge *br) |
366 | { | 366 | { |
367 | struct net_bridge_port *p; | 367 | struct net_bridge_port *p; |
368 | unsigned long features, mask; | 368 | u32 features, mask; |
369 | 369 | ||
370 | features = mask = br->feature_mask; | 370 | features = mask = br->feature_mask; |
371 | if (list_empty(&br->port_list)) | 371 | if (list_empty(&br->port_list)) |
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h index 84aac7734bfc..9f22898c5359 100644 --- a/net/bridge/br_private.h +++ b/net/bridge/br_private.h | |||
@@ -182,7 +182,7 @@ struct net_bridge | |||
182 | struct br_cpu_netstats __percpu *stats; | 182 | struct br_cpu_netstats __percpu *stats; |
183 | spinlock_t hash_lock; | 183 | spinlock_t hash_lock; |
184 | struct hlist_head hash[BR_HASH_SIZE]; | 184 | struct hlist_head hash[BR_HASH_SIZE]; |
185 | unsigned long feature_mask; | 185 | u32 feature_mask; |
186 | #ifdef CONFIG_BRIDGE_NETFILTER | 186 | #ifdef CONFIG_BRIDGE_NETFILTER |
187 | struct rtable fake_rtable; | 187 | struct rtable fake_rtable; |
188 | bool nf_call_iptables; | 188 | bool nf_call_iptables; |
diff --git a/net/core/dev.c b/net/core/dev.c index ad3741898584..7103f89fde0c 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1858,7 +1858,7 @@ EXPORT_SYMBOL(skb_checksum_help); | |||
1858 | * It may return NULL if the skb requires no segmentation. This is | 1858 | * It may return NULL if the skb requires no segmentation. This is |
1859 | * only possible when GSO is used for verifying header integrity. | 1859 | * only possible when GSO is used for verifying header integrity. |
1860 | */ | 1860 | */ |
1861 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features) | 1861 | struct sk_buff *skb_gso_segment(struct sk_buff *skb, u32 features) |
1862 | { | 1862 | { |
1863 | struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); | 1863 | struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT); |
1864 | struct packet_type *ptype; | 1864 | struct packet_type *ptype; |
@@ -2046,7 +2046,7 @@ static bool can_checksum_protocol(unsigned long features, __be16 protocol) | |||
2046 | protocol == htons(ETH_P_FCOE))); | 2046 | protocol == htons(ETH_P_FCOE))); |
2047 | } | 2047 | } |
2048 | 2048 | ||
2049 | static int harmonize_features(struct sk_buff *skb, __be16 protocol, int features) | 2049 | static u32 harmonize_features(struct sk_buff *skb, __be16 protocol, u32 features) |
2050 | { | 2050 | { |
2051 | if (!can_checksum_protocol(features, protocol)) { | 2051 | if (!can_checksum_protocol(features, protocol)) { |
2052 | features &= ~NETIF_F_ALL_CSUM; | 2052 | features &= ~NETIF_F_ALL_CSUM; |
@@ -2058,10 +2058,10 @@ static int harmonize_features(struct sk_buff *skb, __be16 protocol, int features | |||
2058 | return features; | 2058 | return features; |
2059 | } | 2059 | } |
2060 | 2060 | ||
2061 | int netif_skb_features(struct sk_buff *skb) | 2061 | u32 netif_skb_features(struct sk_buff *skb) |
2062 | { | 2062 | { |
2063 | __be16 protocol = skb->protocol; | 2063 | __be16 protocol = skb->protocol; |
2064 | int features = skb->dev->features; | 2064 | u32 features = skb->dev->features; |
2065 | 2065 | ||
2066 | if (protocol == htons(ETH_P_8021Q)) { | 2066 | if (protocol == htons(ETH_P_8021Q)) { |
2067 | struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; | 2067 | struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data; |
@@ -2106,7 +2106,7 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, | |||
2106 | int rc = NETDEV_TX_OK; | 2106 | int rc = NETDEV_TX_OK; |
2107 | 2107 | ||
2108 | if (likely(!skb->next)) { | 2108 | if (likely(!skb->next)) { |
2109 | int features; | 2109 | u32 features; |
2110 | 2110 | ||
2111 | /* | 2111 | /* |
2112 | * If device doesnt need skb->dst, release it right now while | 2112 | * If device doesnt need skb->dst, release it right now while |
@@ -5213,7 +5213,7 @@ static void rollback_registered(struct net_device *dev) | |||
5213 | rollback_registered_many(&single); | 5213 | rollback_registered_many(&single); |
5214 | } | 5214 | } |
5215 | 5215 | ||
5216 | unsigned long netdev_fix_features(unsigned long features, const char *name) | 5216 | u32 netdev_fix_features(u32 features, const char *name) |
5217 | { | 5217 | { |
5218 | /* Fix illegal checksum combinations */ | 5218 | /* Fix illegal checksum combinations */ |
5219 | if ((features & NETIF_F_HW_CSUM) && | 5219 | if ((features & NETIF_F_HW_CSUM) && |
@@ -6143,8 +6143,7 @@ static int dev_cpu_callback(struct notifier_block *nfb, | |||
6143 | * @one to the master device with current feature set @all. Will not | 6143 | * @one to the master device with current feature set @all. Will not |
6144 | * enable anything that is off in @mask. Returns the new feature set. | 6144 | * enable anything that is off in @mask. Returns the new feature set. |
6145 | */ | 6145 | */ |
6146 | unsigned long netdev_increment_features(unsigned long all, unsigned long one, | 6146 | u32 netdev_increment_features(u32 all, u32 one, u32 mask) |
6147 | unsigned long mask) | ||
6148 | { | 6147 | { |
6149 | /* If device needs checksumming, downgrade to it. */ | 6148 | /* If device needs checksumming, downgrade to it. */ |
6150 | if (all & NETIF_F_NO_CSUM && !(one & NETIF_F_NO_CSUM)) | 6149 | if (all & NETIF_F_NO_CSUM && !(one & NETIF_F_NO_CSUM)) |
diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 17741782a345..bd1af99e1122 100644 --- a/net/core/ethtool.c +++ b/net/core/ethtool.c | |||
@@ -1458,7 +1458,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) | |||
1458 | void __user *useraddr = ifr->ifr_data; | 1458 | void __user *useraddr = ifr->ifr_data; |
1459 | u32 ethcmd; | 1459 | u32 ethcmd; |
1460 | int rc; | 1460 | int rc; |
1461 | unsigned long old_features; | 1461 | u32 old_features; |
1462 | 1462 | ||
1463 | if (!dev || !netif_device_present(dev)) | 1463 | if (!dev || !netif_device_present(dev)) |
1464 | return -ENODEV; | 1464 | return -ENODEV; |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index e23c01be5a5b..81367ccf3306 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -99,7 +99,7 @@ NETDEVICE_SHOW(addr_assign_type, fmt_dec); | |||
99 | NETDEVICE_SHOW(addr_len, fmt_dec); | 99 | NETDEVICE_SHOW(addr_len, fmt_dec); |
100 | NETDEVICE_SHOW(iflink, fmt_dec); | 100 | NETDEVICE_SHOW(iflink, fmt_dec); |
101 | NETDEVICE_SHOW(ifindex, fmt_dec); | 101 | NETDEVICE_SHOW(ifindex, fmt_dec); |
102 | NETDEVICE_SHOW(features, fmt_long_hex); | 102 | NETDEVICE_SHOW(features, fmt_hex); |
103 | NETDEVICE_SHOW(type, fmt_dec); | 103 | NETDEVICE_SHOW(type, fmt_dec); |
104 | NETDEVICE_SHOW(link_mode, fmt_dec); | 104 | NETDEVICE_SHOW(link_mode, fmt_dec); |
105 | 105 | ||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index d31bb36ae0dc..436c4c439240 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2497,7 +2497,7 @@ EXPORT_SYMBOL_GPL(skb_pull_rcsum); | |||
2497 | * a pointer to the first in a list of new skbs for the segments. | 2497 | * a pointer to the first in a list of new skbs for the segments. |
2498 | * In case of error it returns ERR_PTR(err). | 2498 | * In case of error it returns ERR_PTR(err). |
2499 | */ | 2499 | */ |
2500 | struct sk_buff *skb_segment(struct sk_buff *skb, int features) | 2500 | struct sk_buff *skb_segment(struct sk_buff *skb, u32 features) |
2501 | { | 2501 | { |
2502 | struct sk_buff *segs = NULL; | 2502 | struct sk_buff *segs = NULL; |
2503 | struct sk_buff *tail = NULL; | 2503 | struct sk_buff *tail = NULL; |
@@ -2507,7 +2507,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
2507 | unsigned int offset = doffset; | 2507 | unsigned int offset = doffset; |
2508 | unsigned int headroom; | 2508 | unsigned int headroom; |
2509 | unsigned int len; | 2509 | unsigned int len; |
2510 | int sg = features & NETIF_F_SG; | 2510 | int sg = !!(features & NETIF_F_SG); |
2511 | int nfrags = skb_shinfo(skb)->nr_frags; | 2511 | int nfrags = skb_shinfo(skb)->nr_frags; |
2512 | int err = -ENOMEM; | 2512 | int err = -ENOMEM; |
2513 | int i = 0; | 2513 | int i = 0; |
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index f2b61107df6c..e5e2d9d64abb 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1215,7 +1215,7 @@ out: | |||
1215 | return err; | 1215 | return err; |
1216 | } | 1216 | } |
1217 | 1217 | ||
1218 | static struct sk_buff *inet_gso_segment(struct sk_buff *skb, int features) | 1218 | static struct sk_buff *inet_gso_segment(struct sk_buff *skb, u32 features) |
1219 | { | 1219 | { |
1220 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 1220 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
1221 | struct iphdr *iph; | 1221 | struct iphdr *iph; |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 6c11eece262c..f9867d2dbef4 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -2653,7 +2653,7 @@ int compat_tcp_getsockopt(struct sock *sk, int level, int optname, | |||
2653 | EXPORT_SYMBOL(compat_tcp_getsockopt); | 2653 | EXPORT_SYMBOL(compat_tcp_getsockopt); |
2654 | #endif | 2654 | #endif |
2655 | 2655 | ||
2656 | struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features) | 2656 | struct sk_buff *tcp_tso_segment(struct sk_buff *skb, u32 features) |
2657 | { | 2657 | { |
2658 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 2658 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
2659 | struct tcphdr *th; | 2659 | struct tcphdr *th; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 8157b17959ee..d37baaa1dbe3 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -2199,7 +2199,7 @@ int udp4_ufo_send_check(struct sk_buff *skb) | |||
2199 | return 0; | 2199 | return 0; |
2200 | } | 2200 | } |
2201 | 2201 | ||
2202 | struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, int features) | 2202 | struct sk_buff *udp4_ufo_fragment(struct sk_buff *skb, u32 features) |
2203 | { | 2203 | { |
2204 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 2204 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
2205 | unsigned int mss; | 2205 | unsigned int mss; |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 978e80e2c4a8..3194aa909872 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
@@ -772,7 +772,7 @@ out: | |||
772 | return err; | 772 | return err; |
773 | } | 773 | } |
774 | 774 | ||
775 | static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features) | 775 | static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, u32 features) |
776 | { | 776 | { |
777 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 777 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
778 | struct ipv6hdr *ipv6h; | 778 | struct ipv6hdr *ipv6h; |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 9a009c66c8a3..a419a787eb69 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
@@ -1299,7 +1299,7 @@ static int udp6_ufo_send_check(struct sk_buff *skb) | |||
1299 | return 0; | 1299 | return 0; |
1300 | } | 1300 | } |
1301 | 1301 | ||
1302 | static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, int features) | 1302 | static struct sk_buff *udp6_ufo_fragment(struct sk_buff *skb, u32 features) |
1303 | { | 1303 | { |
1304 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 1304 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
1305 | unsigned int mss; | 1305 | unsigned int mss; |