From 2716c2c386016e7f080db6d9e1271e7ab2da9e0d Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Thu, 14 Jun 2012 06:42:44 +0000 Subject: [PATCH] --- yaml --- r: 311351 b: refs/heads/master c: 62b1a8ab9b3660bb820d8dfe23148ed6cda38574 h: refs/heads/master i: 311349: 777f10355282fa6f73cbe259ef3b32f8597453ea 311347: 4cb3532744c8b736aa41cabfa964fd466a2d0560 311343: 70b4d9d97797d6b0d4098619a601d30f78973d82 v: v3 --- [refs] | 2 +- trunk/include/linux/skbuff.h | 7 ++----- trunk/net/can/raw.c | 3 --- trunk/net/core/dev.c | 23 +---------------------- trunk/net/iucv/af_iucv.c | 1 - 5 files changed, 4 insertions(+), 32 deletions(-) diff --git a/[refs] b/[refs] index 8c796403f303..c84efa650c52 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bc14786a100cc6a81cd060e8031ec481241b418c +refs/heads/master: 62b1a8ab9b3660bb820d8dfe23148ed6cda38574 diff --git a/trunk/include/linux/skbuff.h b/trunk/include/linux/skbuff.h index b534a1be540a..642cb7355df3 100644 --- a/trunk/include/linux/skbuff.h +++ b/trunk/include/linux/skbuff.h @@ -225,14 +225,11 @@ enum { /* device driver is going to provide hardware time stamp */ SKBTX_IN_PROGRESS = 1 << 2, - /* ensure the originating sk reference is available on driver level */ - SKBTX_DRV_NEEDS_SK_REF = 1 << 3, - /* device driver supports TX zero-copy buffers */ - SKBTX_DEV_ZEROCOPY = 1 << 4, + SKBTX_DEV_ZEROCOPY = 1 << 3, /* generate wifi status information (where possible) */ - SKBTX_WIFI_STATUS = 1 << 5, + SKBTX_WIFI_STATUS = 1 << 4, }; /* diff --git a/trunk/net/can/raw.c b/trunk/net/can/raw.c index cde1b4a20f75..46cca3a91d19 100644 --- a/trunk/net/can/raw.c +++ b/trunk/net/can/raw.c @@ -681,9 +681,6 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, if (err < 0) goto free_skb; - /* to be able to check the received tx sock reference in raw_rcv() */ - skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF; - skb->dev = dev; skb->sk = sk; diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index cd0981977f5c..6df214041a5e 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -2089,25 +2089,6 @@ static int dev_gso_segment(struct sk_buff *skb, netdev_features_t features) return 0; } -/* - * Try to orphan skb early, right before transmission by the device. - * We cannot orphan skb if tx timestamp is requested or the sk-reference - * is needed on driver level for other reasons, e.g. see net/can/raw.c - */ -static inline void skb_orphan_try(struct sk_buff *skb) -{ - struct sock *sk = skb->sk; - - if (sk && !skb_shinfo(skb)->tx_flags) { - /* skb_tx_hash() wont be able to get sk. - * We copy sk_hash into skb->rxhash - */ - if (!skb->rxhash) - skb->rxhash = sk->sk_hash; - skb_orphan(skb); - } -} - static bool can_checksum_protocol(netdev_features_t features, __be16 protocol) { return ((features & NETIF_F_GEN_CSUM) || @@ -2193,8 +2174,6 @@ int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, if (!list_empty(&ptype_all)) dev_queue_xmit_nit(skb, dev); - skb_orphan_try(skb); - features = netif_skb_features(skb); if (vlan_tx_tag_present(skb) && @@ -2304,7 +2283,7 @@ u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb, if (skb->sk && skb->sk->sk_hash) hash = skb->sk->sk_hash; else - hash = (__force u16) skb->protocol ^ skb->rxhash; + hash = (__force u16) skb->protocol; hash = jhash_1word(hash, hashrnd); return (u16) (((u64) hash * qcount) >> 32) + qoffset; diff --git a/trunk/net/iucv/af_iucv.c b/trunk/net/iucv/af_iucv.c index 07d7d55a1b93..cd6f7a991d80 100644 --- a/trunk/net/iucv/af_iucv.c +++ b/trunk/net/iucv/af_iucv.c @@ -372,7 +372,6 @@ static int afiucv_hs_send(struct iucv_message *imsg, struct sock *sock, skb_trim(skb, skb->dev->mtu); } skb->protocol = ETH_P_AF_IUCV; - skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF; nskb = skb_clone(skb, GFP_ATOMIC); if (!nskb) return -ENOMEM;