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 /net/core/dev.c | |
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 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 15 |
1 files changed, 7 insertions, 8 deletions
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)) |