Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1735375ybg; Sat, 19 Oct 2019 01:22:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwoWgi4FvjPs3Z9cVmLrnAFJLjnqnZ3co8Rye7i9AU/zQv8noxcdJJHOp8LqfpPSlG4YhuB X-Received: by 2002:a17:906:a88e:: with SMTP id ha14mr12291767ejb.92.1571473321238; Sat, 19 Oct 2019 01:22:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571473321; cv=none; d=google.com; s=arc-20160816; b=Tz5MvQlcN/6a/Ijs+M4tk2iRE65o++g+6s90n3V5iqjJEZ0ZPc4uLrePdHqMsvc7UR hvLynaMAkbQ9yHA51RyHj5JhJLzKZz8QOX6PRUhwkrfrEREUCO1OhmpuCp9dMOfV8qq/ h8obLLwuFOQ6cOaWCtHdABogTbyolSY69EfZI7ArFKAWBvpj/U6xQ8yuPlUalkBBgNwl 7Y1rNxgaBvQoFCqwXqnqhvIZlopLt59VzrTAGziYd5uierV6YbW105bmub8Qzgz5Z43Y gS7MGuyvHfpqneVV8W4TevE1JKisvpqk7exiSvgxzdCMDUWDYpsLtuzQnDJxsoMKf5O2 HJMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=OIAkWh/uObEds8ID1zchWMgyMMwARy501xYlSBoH05A=; b=OR7kI3LYvHGA7+luZ3s0gMzTrpADuzfYcsGNzKUmaY9vJTSpBwK1w2jF9rTgHYBWbR 0i0wIUpjPowzj+sIqGUuskadkofPn2pvJoj/HO21kw1IVdovGgUZNGZgzyUe3blgfKmw WzhtgGS9FqWFHidNcC+R93L/eQ7vQQowPRAWQZprTZP5oOWwj+HBoxKsqxOZBRnw3XnW JKYEwFZzr/aoxcaTSUoWMn379WYceDNMVBTO5L7Jlb4LFY3/xWG1nF4EFFkXjVlCoT1L J2U596Hm7Ezr5MlQ3Ux3CPfw1LsQ4qS4xgg/F2oCkp87jq2rCG+qGQb+YZbzTMiSCJwo 9m4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si5272299edw.29.2019.10.19.01.21.37; Sat, 19 Oct 2019 01:22:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728228AbfJRMfo (ORCPT + 99 others); Fri, 18 Oct 2019 08:35:44 -0400 Received: from s3.sipsolutions.net ([144.76.43.62]:56620 "EHLO sipsolutions.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2633850AbfJRMfo (ORCPT ); Fri, 18 Oct 2019 08:35:44 -0400 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> Subject: Re: [PATCH v2 1/4] mac80211: Rearrange ieee80211_tx_info to make room for tx_time_est 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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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