Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1729432ybg; Sat, 19 Oct 2019 01:14:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1q70Wa1q/Z2dqA97idbNYSDxYumohIraQWSGBXakN1WirCOWunoXL+tZVUU9e/dFOrzEE X-Received: by 2002:a17:906:948d:: with SMTP id t13mr12649010ejx.112.1571472867510; Sat, 19 Oct 2019 01:14:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571472867; cv=none; d=google.com; s=arc-20160816; b=DFHJT4KF4kFJzRn5JIfen3FnJKd8h8HdczAnRqV4R3YdAQOcWlBRPLF1p00OKe3hKi HHPbXqjIfCUoTYm0Hgf/wCSV/2F/p3dckKm/u0SejbhhHWPQCyWdDoqlznUEJFM5h37M Wvevhds4YF7AmvP8oifxDbPTXtSL0NUS7WsW7XjnCfEFhiFQ6rtoB2XUXBdYdkC23hWm 1CUtd81QSZsOsunN9XGNG9yLqO0VAByx5y6gjjEQtnckwPcCYrfRlllRta2V3UhL09LZ eVn2VJNAGboJNNif0MWxVsRjWAtW+W4lOUgXhMZcmEeM8wAt78H3E9aAwx3ySjnGb35G i0Jw== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=fPfdn1wJgZGqQXuVAEaKG2OM7BuZcbx3t0qWbYXPYIY=; b=aVY41EUtmhCISekXQNA0HtZAHCqNjLmz+ZOE86v1fiYiJh++FvnGClgoCtqJLFtEwo KGsq1V0dodGh/K0U/YbSbflSxLJ3oFV9RSWQSDvApp8HUV1I5YHekHJFQ5lGh0dx9GEj QWCJylKZl4XmCWwJoFnkVpxcacJIqwXBUw2Vvn6DeCS5uiLkR7hxSj26MBZoVILeOjAN eTFZ2sBIgVsdkT+XX/pS7t63Ja2+GxDJbuXqyKDQltX5M5DaCDXeAOoHFcHM/IS6YHwq y9T9hFipdedROuLpQkEhbaQ/4bcJnvKo2e4TMLf41IqsH/j5OX2xZNUxNI2Wh7chlydW caJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="CqO/ZpzO"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p15si5568491eda.294.2019.10.19.01.14.02; Sat, 19 Oct 2019 01:14:27 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="CqO/ZpzO"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2438519AbfJRKPT (ORCPT + 99 others); Fri, 18 Oct 2019 06:15:19 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:47997 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2442482AbfJRKPS (ORCPT ); Fri, 18 Oct 2019 06:15:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571393717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fPfdn1wJgZGqQXuVAEaKG2OM7BuZcbx3t0qWbYXPYIY=; b=CqO/ZpzOTBDlRsy0P/nPM2HzbfCVXmu6Q87v96ubVGedtcDrrBGsZZKrTu6DV+wlup5BJl 5gv4Y1O/vC6+EP7L+ew/rmOrlqLoe+1W14B+XfvxHIETLBgHJYkPUcaFkjG4mGtLtHevzW 5I0HU+UU3/1ar2Sbvy6fZKtu0d3oan0= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-321-B31KicRPMLelMl44H7gV5w-1; Fri, 18 Oct 2019 06:15:15 -0400 Received: by mail-lj1-f200.google.com with SMTP id m8so963428ljb.3 for ; Fri, 18 Oct 2019 03:15:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=fPfdn1wJgZGqQXuVAEaKG2OM7BuZcbx3t0qWbYXPYIY=; b=M+Ip6H7U4JdiFm/LeLt1oN4FOhBf5X7ckhtO6fZ6tG8fMNLyqvobpJjXQMPjOO30sL On0QK61XYv+1d1tkEjYh7OUY5VcFB87AdJX1l6BA4aDX+mg0516x/SVkICV3z7cZTvp4 kNRoyvM5OpNlozmimvqVlOgOCpzydge0fHuvhltFEVb8KhnIG0f2rqqaKzMzahthsXy1 HHvLO1O0C7LdjrqhNc7FBJQFsJdwXhqY12g9IDAbBrT6t7YsBlR0MsaQbt8wR0pfHnSq 9HqewSVTvLRdsy52phOlHuqQVlQy9FvnZKyoZ+B0sDLUExh3wVgk4j2E8nPGTAQ2Fyuq ztwQ== X-Gm-Message-State: APjAAAXaI7qX8hSFGAOZ5jGYqlxGp6e+UD6zYyIDTMESCx+71OM+pY8D macEXC1pjHaRhQ5SYI/GpV2dLfBJo6wmuu62yenVzFu6+A90Sc1wm/YzSiHxGkSLADyCDD4mVbL rDSV05KsOeQltWPVXWphKCbB8UmY= X-Received: by 2002:a2e:501c:: with SMTP id e28mr5633714ljb.201.1571393714343; Fri, 18 Oct 2019 03:15:14 -0700 (PDT) X-Received: by 2002:a2e:501c:: with SMTP id e28mr5633684ljb.201.1571393713934; Fri, 18 Oct 2019 03:15:13 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk (borgediget.toke.dk. [85.204.121.218]) by smtp.gmail.com with ESMTPSA id v1sm2085763lfe.34.2019.10.18.03.15.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 03:15:12 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 000821804C9; Fri, 18 Oct 2019 12:15:11 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Kan Yan Cc: Johannes Berg , 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 Subject: Re: [PATCH v2 1/4] mac80211: Rearrange ieee80211_tx_info to make room for tx_time_est In-Reply-To: References: <157115993755.2500430.12214017471129215800.stgit@toke.dk> <157115993866.2500430.13989567853855880476.stgit@toke.dk> X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 18 Oct 2019 12:15:11 +0200 Message-ID: <87sgnqe4wg.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: B31KicRPMLelMl44H7gV5w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 > 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), 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... However, there's a nice juicy 'u16 ack_frame_id' at the start of ieee80211_tx_info. Could we potentially use that? We could use the top bit as a disambiguation flag; I think we're fine with 15 bits for the TX time itself (a single packet won't exceed 8ms or TX time), so if we can live with 15 bits of ACK frame ID space, that could be a way forward? Johannes, what do you think? -Toke