Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311351
b: refs/heads/master
c: 62b1a8a
h: refs/heads/master
i:
  311349: 777f103
  311347: 4cb3532
  311343: 70b4d9d
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jun 15, 2012
1 parent 494efb4 commit 2716c2c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc14786a100cc6a81cd060e8031ec481241b418c
refs/heads/master: 62b1a8ab9b3660bb820d8dfe23148ed6cda38574
7 changes: 2 additions & 5 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

/*
Expand Down
3 changes: 0 additions & 3 deletions trunk/net/can/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
23 changes: 1 addition & 22 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||
Expand Down Expand Up @@ -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) &&
Expand Down Expand Up @@ -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;
Expand Down
1 change: 0 additions & 1 deletion trunk/net/iucv/af_iucv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2716c2c

Please sign in to comment.