Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8039824ybn; Tue, 1 Oct 2019 02:09:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4HWSJRibj7EIIMTKIyLU/5XLlFV39IiaeJILTt6++xR/27yOGkroiWcVZs8wHkqjMAzQF X-Received: by 2002:a17:906:1357:: with SMTP id x23mr23182412ejb.66.1569920960219; Tue, 01 Oct 2019 02:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569920960; cv=none; d=google.com; s=arc-20160816; b=sHgV0AKLEKO2Xp4I1Dvuci6gZqrw5f8qjAfVFuYwXSvDkptch3JR/iMtWcFAHn3K7F BdOHIDv1aI9QbdnUUcvRo17l/JBH8i0N4IDnr+NXoypSDo63EZSg9hy2B/+JmGGeMwE7 YWuI0S+LYWgU0txa0uVkRVlO70OlD+GLznEAs6BoDJlwaMcZm0hmRvu4KoP462WnpFjn ECl6gp2xyk3DZ4bhpy2nTOsFNhZKp7P+aZt1pMxUcLLhRkORJt4nTk8O8JfJfaUzrlFH 2Lrsppw/y6twlgjsBzOTL//ZL2NpH3qTkNM2uyKWAn72s14OQBo0FIjZFVqR081//6ND /Xlg== 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=ztuEv3F1VvUb37/sb6lMwENjtvEWt91fS/pfkH1uTOo=; b=olo18oGKfmU8BlAp3i5iEqPprZ+SvFTnL/TsnHPvZbF6oJpByZZEIE/OLl9vAXZZjg YyQSDHHeFaYKtoDJuNgv4YqxB+pzROwT7qwnqGbipQJUx5paBIRhyWp/2j/px84x+HC+ LKhAQTOJPVJAI/DRTJ98xmMRCyJ1kbUb6mOBfjkT6kAK8lVNDaLjfBEVY3DXwumIZ0wc h2nB9a/yoLR6esAamCww0u8bSLgTtoV01YxUOKx7oQtIO4tW+TULkm/NTb+AHY+I8i/N PfDvh+RfqMfc352haMn+BM6QLypn1n/VdLw9ooiEFFOmRuOxA+duodXiC3YYAHOcY/sj qFwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=DAIv4Ttb; 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 j52si9179821eda.338.2019.10.01.02.08.54; Tue, 01 Oct 2019 02:09:20 -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=DAIv4Ttb; 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 S1729934AbfJAJIh (ORCPT + 99 others); Tue, 1 Oct 2019 05:08:37 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:29621 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728892AbfJAJIh (ORCPT ); Tue, 1 Oct 2019 05:08:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1569920915; 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=ztuEv3F1VvUb37/sb6lMwENjtvEWt91fS/pfkH1uTOo=; b=DAIv4TtbMvnaAU1cwjaHs0TUJzmf9lRWanjd+Jbh/YTsrYalKBN5TTO586xsnuXMmY7GWE NNNnG0P2M5v3GXK+sdu9mYGrLhBGRunQHO8/MnyNajTFlJvj00olIMmKpM+3Ner1pBmENY fatnaw+i6oXM0mUKpEZ99/S/UZI9nwc= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-360-CWdt7FA0OSKwpO3SIgyM5w-1; Tue, 01 Oct 2019 05:08:33 -0400 Received: by mail-lf1-f71.google.com with SMTP id p15so2620654lfc.20 for ; Tue, 01 Oct 2019 02:08:33 -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:content-transfer-encoding; bh=10PCp8jeul/Ln8OdCxlZHThqI0Uexho93oGHCJziLrg=; b=cwaEqMZ4gTY9KbWfbxDtb9fImITi+tPNzqi9UJXz4311bf6bJX9fl0yD4/uyqk1gi6 VMzLkM/QxETXqu2sEzk/dFXuHyImaR27U+pdsOXFu04Nh7oek3CkK73lCRh0f/zwPL73 K5/Wepre7Dg6p0tFPjKHNSRxGySt5FTr/NrTkjG7deHOWSalmJUFiUZekatzsgAi2aJK MAtNVHs003PBw5K47PNihMqmsBuVBkJaY5eNv8Xiuu5w029uFHU+lWnhe4qw9GIc3lOk WI9vXJeIl3yZRIkmN3nFfE6k05jUK8Kk94eLM7ktqcBY43ygmEMnPLp4BBlIF7YQmQ6F 4jBQ== X-Gm-Message-State: APjAAAWqwnMeNPcqOGrZF2f6YI3ERR6O5Pcx8bHliWjcbcdekwJ2tn0x zlk3mttfoIEqHDFryazCQ0m+KqmtcIiALyytvBzw7OUjFyMOI2ZShX02v2vTwzzpZXml4MxQBtv zLJK1p48s+qS9lqP+QRYJSVvYSS0= X-Received: by 2002:a2e:894b:: with SMTP id b11mr10980566ljk.152.1569920912182; Tue, 01 Oct 2019 02:08:32 -0700 (PDT) X-Received: by 2002:a2e:894b:: with SMTP id b11mr10980561ljk.152.1569920912043; Tue, 01 Oct 2019 02:08:32 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a00:7660:6da:443::2]) by smtp.gmail.com with ESMTPSA id t22sm3720806lfg.91.2019.10.01.02.08.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2019 02:08:31 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 589A218063D; Tue, 1 Oct 2019 11:08:30 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Johannes Berg Cc: linux-wireless@vger.kernel.org, make-wifi-fast@lists.bufferbloat.net, John Crispin , Lorenzo Bianconi , Felix Fietkau Subject: Re: [PATCH RFC/RFT 1/4] mac80211: Rearrange ieee80211_tx_info to make room for tx_time_est In-Reply-To: References: <156889576422.191202.5906619710809654631.stgit@alrua-x1> <156889576534.191202.17686228416284995279.stgit@alrua-x1> X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 01 Oct 2019 11:08:30 +0200 Message-ID: <87v9t8vnn5.fsf@toke.dk> MIME-Version: 1.0 X-MC-Unique: CWdt7FA0OSKwpO3SIgyM5w-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Johannes Berg writes: > Hi, > > Sorry for the long time to review here ... > > On Thu, 2019-09-19 at 14:22 +0200, Toke H=C3=B8iland-J=C3=B8rgensen wrote= : >> From: Toke H=C3=B8iland-J=C3=B8rgensen >>=20 >> To implement airtime queue limiting, we need to keep a running account o= f >> the estimated airtime of all skbs queued into the device. Do to this >> correctly, we need to store the airtime estimate into the skb so we can >> decrease the outstanding balance when the skb is freed. This means that = the >> time estimate must be stored somewhere that will survive for the lifetim= e >> of the skb. >>=20 >> Fortunately, we had a couple of bytes left in the 'status' field in the >> ieee80211_tx_info; and since we only plan to calculate the airtime estim= ate >> after the skb is dequeued from the FQ structure, on the control side we = can >> share the space with the codel enqueue time. And by rearranging the orde= r >> of elements it is possible to have the position of the new tx_time_est l= ine >> up between the control and status structs, so the value will survive fro= m >> when mac80211 hands the packet to the driver, and until the driver eithe= r >> frees it, or hands it back through TX status. > > Seems reasonable to me, if we end up needing it and don't have an out- > of-band path (that you seem to have been discussing in this long > thread too) Awesome! Any idea for how to make it work on big-endian systems? I got a splat from the kbuild robot that triggered the BUILD_BUG_ON when building for m68k. I assume it's the union with codel_time_t that ends up being aligned wrong... -Toke