linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] remove truesize workarounds
@ 2011-10-07 12:55 Johannes Berg
  2011-10-07 12:55 ` [PATCH 1/2] mac80211: dont adjust truesize Johannes Berg
  2011-10-07 12:55 ` [PATCH 2/2] mac80211: dont orphan TX skb Johannes Berg
  0 siblings, 2 replies; 3+ messages in thread
From: Johannes Berg @ 2011-10-07 12:55 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

The truesize mangling and orphaning of the skb
are workarounds for the old skb_truesize_check
that was really just checking the wrong thing;
davem removed that check a while ago.

johannes


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] mac80211: dont adjust truesize
  2011-10-07 12:55 [PATCH 0/2] remove truesize workarounds Johannes Berg
@ 2011-10-07 12:55 ` Johannes Berg
  2011-10-07 12:55 ` [PATCH 2/2] mac80211: dont orphan TX skb Johannes Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2011-10-07 12:55 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

There's no need to adjust truesize.

The history of this was that we always ran into
skb_truesize_bug (via skb_truesize_check) which
has since been removed in commit 92a0acce186cd.
skb_truesize_check() checked that truesize  was
bigger or equal to the actual allocation, which
would trigger in mac80211 due to header adding.
The check no longer exists and we shouldn't be
messing with the truesize anwyay.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/tx.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/net/mac80211/tx.c	2011-10-07 14:50:23.000000000 +0200
+++ b/net/mac80211/tx.c	2011-10-07 14:50:27.000000000 +0200
@@ -1402,9 +1402,6 @@ static int ieee80211_skb_resize(struct i
 		return -ENOMEM;
 	}
 
-	/* update truesize too */
-	skb->truesize += head_need + tail_need;
-
 	return 0;
 }
 



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] mac80211: dont orphan TX skb
  2011-10-07 12:55 [PATCH 0/2] remove truesize workarounds Johannes Berg
  2011-10-07 12:55 ` [PATCH 1/2] mac80211: dont adjust truesize Johannes Berg
@ 2011-10-07 12:55 ` Johannes Berg
  1 sibling, 0 replies; 3+ messages in thread
From: Johannes Berg @ 2011-10-07 12:55 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Johannes Berg <johannes.berg@intel.com>

This was another workaround for truesize "bugs".
The reason we did this was that when we orphaned
the SKB it wouldn't be truesize-checked later.
Now that the check is gone (and we just charge
the former smaller size to the socket) there's
no longer a reason to orphan the skb here.

Keep the skb charged to the socket until it is
really freed (or orphaned in TX status). This
helps flow control and allows us to get at the
socket later for other purposes.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/tx.c |    5 -----
 1 file changed, 5 deletions(-)

--- a/net/mac80211/tx.c	2011-10-07 14:50:27.000000000 +0200
+++ b/net/mac80211/tx.c	2011-10-07 14:50:30.000000000 +0200
@@ -1384,11 +1384,6 @@ static int ieee80211_skb_resize(struct i
 		tail_need = max_t(int, tail_need, 0);
 	}
 
-	if (head_need || tail_need) {
-		/* Sorry. Can't account for this any more */
-		skb_orphan(skb);
-	}
-
 	if (skb_cloned(skb))
 		I802_DEBUG_INC(local->tx_expand_skb_head_cloned);
 	else if (head_need || tail_need)



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-07 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 12:55 [PATCH 0/2] remove truesize workarounds Johannes Berg
2011-10-07 12:55 ` [PATCH 1/2] mac80211: dont adjust truesize Johannes Berg
2011-10-07 12:55 ` [PATCH 2/2] mac80211: dont orphan TX skb Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).