~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal-proposed

« back to all changes in this revision

Viewing changes to net/core/dev.c

  • Committer: Package Import Robot
  • Author(s): Andy Whitcroft, Andy Whitcroft, Ubuntu: 3.5.0-3.3
  • Date: 2012-07-03 09:23:14 UTC
  • Revision ID: package-import@ubuntu.com-20120703092314-wjaqz3coxptokmtl
Tags: 3.5.0-3.3
[ Andy Whitcroft ]

* [Config] drop -pae from d-i configuration.
* rebase to Ubuntu-3.5.0-3.3

[ Ubuntu: 3.5.0-3.3 ]

* [Config] enable CONFIG_MEMTEST=y
  - LP: #1004535
* [Config] config-check: add support for a cut operation
* [Config] enforcer -- switch to cut where appropriate
* Rebase to v3.5-rc5
* [Config] Updateconfigs after rebase to v3.5-rc5
* SAUCE: ocfs2: Fix NULL pointer dereferrence in
  __ocfs2_change_file_space
  - LP: #1006012
* SAUCE: (drop after 3.5) drm/i915: ignore pipe select bit when checking
  for LVDS register initialization
  - LP: #1012800
* rebase to v3.5-rc5
  - LP: #1013183
  - LP: #1017017
  - LP: #884652

Show diffs side-by-side

added added

removed removed

Lines of Context:
2089
2089
        return 0;
2090
2090
}
2091
2091
 
2092
 
/*
2093
 
 * Try to orphan skb early, right before transmission by the device.
2094
 
 * We cannot orphan skb if tx timestamp is requested or the sk-reference
2095
 
 * is needed on driver level for other reasons, e.g. see net/can/raw.c
2096
 
 */
2097
 
static inline void skb_orphan_try(struct sk_buff *skb)
2098
 
{
2099
 
        struct sock *sk = skb->sk;
2100
 
 
2101
 
        if (sk && !skb_shinfo(skb)->tx_flags) {
2102
 
                /* skb_tx_hash() wont be able to get sk.
2103
 
                 * We copy sk_hash into skb->rxhash
2104
 
                 */
2105
 
                if (!skb->rxhash)
2106
 
                        skb->rxhash = sk->sk_hash;
2107
 
                skb_orphan(skb);
2108
 
        }
2109
 
}
2110
 
 
2111
2092
static bool can_checksum_protocol(netdev_features_t features, __be16 protocol)
2112
2093
{
2113
2094
        return ((features & NETIF_F_GEN_CSUM) ||
2193
2174
                if (!list_empty(&ptype_all))
2194
2175
                        dev_queue_xmit_nit(skb, dev);
2195
2176
 
2196
 
                skb_orphan_try(skb);
2197
 
 
2198
2177
                features = netif_skb_features(skb);
2199
2178
 
2200
2179
                if (vlan_tx_tag_present(skb) &&
2304
2283
        if (skb->sk && skb->sk->sk_hash)
2305
2284
                hash = skb->sk->sk_hash;
2306
2285
        else
2307
 
                hash = (__force u16) skb->protocol ^ skb->rxhash;
 
2286
                hash = (__force u16) skb->protocol;
2308
2287
        hash = jhash_1word(hash, hashrnd);
2309
2288
 
2310
2289
        return (u16) (((u64) hash * qcount) >> 32) + qoffset;