remove truesize workarounds
Johannes Berg
maintainercover remove truesize workarounds
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
Johannes Berg
maintainerPATCH 1/2 mac80211: dont adjust truesize
From: Johannes Berg <[email protected]>
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.
--- net/mac80211/tx.c | 3 --- 1 file changed, 3 deletions(-)
net/mac80211/tx.c +0 -3
@@ -1402,9 +1402,6 @@ static int ieee80211_skb_resize(struct ireturn -ENOMEM ; } -/* update truesize too */ - skb->truesize += head_need + tail_need; -return 0 ; }
Johannes Berg
maintainerPATCH 2/2 mac80211: dont orphan TX skb
In reply to Johannes BergFrom: Johannes Berg <[email protected]>
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.
--- net/mac80211/tx.c | 5 ----- 1 file changed, 5 deletions(-)
net/mac80211/tx.c +0 -5
@@ -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)