From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id ECE113B2A4 for ; Fri, 18 Oct 2019 08:35:44 -0400 (EDT) Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.92.2) (envelope-from ) id 1iLRTp-0002Kb-8n; Fri, 18 Oct 2019 14:35:41 +0200 Message-ID: <4bc17c32337888a57a78a0e2c874abd462faef21.camel@sipsolutions.net> From: Johannes Berg To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , Kan Yan Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, ath10k@lists.infradead.org, John Crispin , Lorenzo Bianconi , Felix Fietkau , Rajkumar Manoharan , Kevin Hayes Date: Fri, 18 Oct 2019 14:35:40 +0200 In-Reply-To: <87sgnqe4wg.fsf@toke.dk> References: <157115993755.2500430.12214017471129215800.stgit@toke.dk> <157115993866.2500430.13989567853855880476.stgit@toke.dk> <87sgnqe4wg.fsf@toke.dk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [Make-wifi-fast] [PATCH v2 1/4] mac80211: Rearrange ieee80211_tx_info to make room for tx_time_est X-BeenThere: make-wifi-fast@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Oct 2019 12:35:45 -0000 On Fri, 2019-10-18 at 12:15 +0200, Toke Høiland-Jørgensen wrote: > Kan Yan writes: > > > The "tx_time_est" field, shared by control and status, is not able to > > survive until the skb returns to the mac80211 layer in some > > architectures. The same space is defined as driver_data and some > > wireless drivers use it for other purposes, as the cb in the sk_buff > > is free to be used by any layer. > > > > In the case of ath10k, the tx_time_est get clobbered by > > struct ath10k_skb_cb { > > dma_addr_t paddr; > > u8 flags; > > u8 eid; > > u16 msdu_id; > > u16 airtime_est; > > struct ieee80211_vif *vif; > > struct ieee80211_txq *txq; > > } __packed; > > Ah, bugger, of course the driver that actually needs this is using the > full driver_data space :P Looks like you could shrink *this* fairly easily though. E.g. most likely vif == txq->vif unless txq==NULL, so it's down to 22 bytes plus a bit/flag for knowing whether the pointer is a vif directly (if no TXQ) or a TXQ. > > Do you think shrink driver_data by 2 bytes and use that space for > > tx_time_est to make it persistent across mac80211 and wireless driver > > layer an acceptable solution? > > Hmm, the driver_data field is defined as an array of pointers, so we can > only shrink it in increments of sizeof(void *). I think it may be > feasible to shrink it (as in, I don't think any drivers are actually > using the full 40 bytes), It doesn't have to be defined like that, just was most convenient as driers were using pointers there. > but doing this in a way that will gain us a > 2-byte space that is also usable in the case driver_data is *not* used > (i.e., it needs be able to align with a field in .control and .status as > well) would require some serious surgery of the whole ieee80211_tx_info... Yeah, good point, this doesn't help at all ... johannes