Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361443
b: refs/heads/master
c: 16fad69
h: refs/heads/master
i:
  361441: 6f21c76
  361439: 4ca88eb
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 14, 2013
1 parent 5e831b3 commit 812fe74
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 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: b701f16dd490d3f346724050f17d60beda094998
refs/heads/master: 16fad69cfe4adbbfa813de516757b87bcae36d93
7 changes: 5 additions & 2 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ struct sk_buff {
union {
__u32 mark;
__u32 dropcount;
__u32 avail_size;
__u32 reserved_tailroom;
};

sk_buff_data_t inner_transport_header;
Expand Down Expand Up @@ -1447,7 +1447,10 @@ static inline int skb_tailroom(const struct sk_buff *skb)
*/
static inline int skb_availroom(const struct sk_buff *skb)
{
return skb_is_nonlinear(skb) ? 0 : skb->avail_size - skb->len;
if (skb_is_nonlinear(skb))
return 0;

return skb->end - skb->tail - skb->reserved_tailroom;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ struct sk_buff *sk_stream_alloc_skb(struct sock *sk, int size, gfp_t gfp)
* Make sure that we have exactly size bytes
* available to the caller, no more, no less.
*/
skb->avail_size = size;
skb->reserved_tailroom = skb->end - skb->tail - size;
return skb;
}
__kfree_skb(skb);
Expand Down
1 change: 0 additions & 1 deletion trunk/net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,6 @@ static void __pskb_trim_head(struct sk_buff *skb, int len)
eat = min_t(int, len, skb_headlen(skb));
if (eat) {
__skb_pull(skb, eat);
skb->avail_size -= eat;
len -= eat;
if (!len)
return;
Expand Down

0 comments on commit 812fe74

Please sign in to comment.