Return-path: Received: from mx1.redhat.com ([209.132.183.28]:54742 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751359AbaJENPo (ORCPT ); Sun, 5 Oct 2014 09:15:44 -0400 Date: Sun, 5 Oct 2014 15:13:12 +0200 From: Stanislaw Gruszka To: Mark Asselstine Cc: Helmut Schaa , rt2x00 Users List , linux-wireless Subject: Re: [PATCH] rt2x00: rt2x00queue: avoid using more headroom then driver requested Message-ID: <20141005131312.GA1827@redhat.com> (sfid-20141005_151549_303589_BB897B19) References: <1412135157-13520-1-git-send-email-asselsm@gmail.com> <20141001091240.GA2011@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Sender: linux-wireless-owner@vger.kernel.org List-ID: On Sat, Oct 04, 2014 at 07:38:25PM -0400, Mark Asselstine wrote: > >> The only possibility to skb_under_panic I can see, is that we retransmit > >> frame and try to align it many times, but alignment should not be needed > >> once we aligned frame. Hence I'm not sure how those skb_under_panics can > >> happen. > > I am still digging through trying to find a cause for this, without a > reproducer I am starting to lose hope on finding the cause. > > I dug up this old thread > http://rt2x00.serialmonkey.com/pipermail/users_rt2x00.serialmonkey.com/2010-November/002457.html > > I am thinking that the cause is an interaction with 80211mac and the > rt2x00queue not doing enough to ensure we are sending the skb back in > the same state as we get it. Looking at rt2x00lib_txdone() we don't > return headroom that may have been taken for frame alignment and we > don't account for the extra 4-bytes taken for header_align when the > payload_align is larger then the header_align while setting up the > l2pad. I think we reserve sufficient space, 4 bytes for payload align plus 4 bytes for header align. > Do you know why rt2x00 doesn't return frame align space back to > the headroom? For performance reasons I guess. If we return (payload) aligned skb to mac80211 and mac80211 will retransmit that skb we will not align it again, since it's already aligned. But perhaps we really need to return original tx skb to mac80211, but if so, I would like to know detailed reason why. Thanks Stanislaw