Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp744228imm; Mon, 21 May 2018 13:37:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZq6BpVBpftHnE3NS0deh92h2CYf64L3cX0W8peC1tTdmMr6sMVUDVXjUIb8AJS1Qzky4Q5z X-Received: by 2002:a63:384d:: with SMTP id h13-v6mr16780030pgn.209.1526935051429; Mon, 21 May 2018 13:37:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526935051; cv=none; d=google.com; s=arc-20160816; b=DoII+KSeNucP34fkgrKij0v11IkG+eTx5xepAAEppovy8KGXz2+QaDaMgTZxgG2CNi FRqbYJABWCrEBot8mI5vWobRtzroogcoQD90FexhyPxI99EyTZjtK/FvVQTMzT4Enjsg BxQfcqAgSEZQEQkVrPlTlKFC5XzCQLZDauGFty9tkN1b5Gy5xAbmp3vx9ZB3XiA8lRfA +c4Aoln+vjx3jjygZdznSgcM9aY28fqFWy0Mhl6Qqz8VW3nMrTkL/elu1vl6dNNpuw7a dkJdSGngUoAR9OXoB22bWCeaG1FqxoJY4DUdVjFlZDtKA8gTkQfjNU1DFmqKXfkFbqxt 8WYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=u3egw5AJS5813X3FI9hze3o4rPSnlxYpzvTRFo2gSr8=; b=LnWVTxBnBPVtF9sJErinGGBNyDz89XMghTv0BnFdUQ8cSlNbM6c8AUtlnxWqEGbrgO /ZOtejluOpMg7flDbXppsMzIqE8ScV2Dg+WiN0YYLT9x/T2FzAiWTQutvgQolPidEaW/ ycQwczar3WZg2/WYzpazl9ouZGa2duvQUhzeQqsOBL3cM5oGmwsv97O9yRxGyL9qanlg ead+Ukk96JQUcdIbas4A4lE0LgjOsvJSOh08KmTy+H9AvHBRdADZfxVBAVZz8UPllpRf XeK37Tq8c/O0Pub2z/Cw7G3r7lVr3xU+hNGg23kEPTSEMVu7MTF/OHY3uV8xjWxenBxQ DrXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GC9XKItj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n1-v6si14626762pld.188.2018.05.21.13.37.16; Mon, 21 May 2018 13:37:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@linaro.org header.s=google header.b=GC9XKItj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbeEUUhI (ORCPT + 99 others); Mon, 21 May 2018 16:37:08 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:39468 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbeEUUhF (ORCPT ); Mon, 21 May 2018 16:37:05 -0400 Received: by mail-lf0-f68.google.com with SMTP id j193-v6so25799580lfg.6 for ; Mon, 21 May 2018 13:37:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=u3egw5AJS5813X3FI9hze3o4rPSnlxYpzvTRFo2gSr8=; b=GC9XKItjSgGg+8SLRfameyXHuNPSW424iuZssTBt4q5P3BmIY+cYqFxqH8+hyo/M31 EzURzBtT1zpZo+AbNCvc5G9StyqLNICsIa2upML7V+lES9GktJePWFYjVhb5/1IcTxDR pKgppX9CaxnDCcik4J2CO+LCxPRm98xHSznSU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=u3egw5AJS5813X3FI9hze3o4rPSnlxYpzvTRFo2gSr8=; b=uIupZnigtb/j0+r6FGkiI86/gAtfWevYVDrsDkK/F+gSYWzR9yyNu2xHJuyyNs2Hvw 53PMP6/21lxuvuH+iXH2GSPnu6XQs0vinilwOLHnjt8hrLIJiCNe3qwljYMF/rKk4ebS j2IhGWmVWFiBoJjEZCur12MhoMQZU8eu2zDxs7L2seUXWw6/rHziX2u41iCdT3F1JDMA SZlixb6NuCzghLVrmVkppd24kOWLk8z1JF4a3M7HoynMlZEIf63I4v70JD7aHv89C/Ud dqzel6DAyYtUIPsKEUegqaVvBBGbLF7pXAm3xMNzYSUpMuoWwwk9cLcd08DqvUeNseJQ F8OQ== X-Gm-Message-State: ALKqPwdXwyUrRtMb2ixhJ/sAGNgkYuAsfcnP7tN+UiFjvd25nYmvUjEK QSO41zi9q3/Wbsuj/FiCql50Bw== X-Received: by 2002:a19:c6c1:: with SMTP id w184-v6mr29510108lff.126.1526935024257; Mon, 21 May 2018 13:37:04 -0700 (PDT) Received: from localhost.localdomain (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id q1-v6sm2613559lje.43.2018.05.21.13.37.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 May 2018 13:37:03 -0700 (PDT) Date: Mon, 21 May 2018 22:37:01 +0200 From: Niklas Cassel To: Adrian Chadd Cc: Kalle Valo , David Miller , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] ath10k: transmit queued frames after waking queues Message-ID: <20180521203701.GA7619@localhost.localdomain> References: <20180517231512.13085-1-niklas.cassel@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 17, 2018 at 03:26:25PM -0700, Adrian Chadd wrote: > On Thu, 17 May 2018 at 16:16, Niklas Cassel > wrote: > > > diff --git a/drivers/net/wireless/ath/ath10k/txrx.c > b/drivers/net/wireless/ath/ath10k/txrx.c > > index cda164f6e9f6..1d3b2d2c3fee 100644 > > --- a/drivers/net/wireless/ath/ath10k/txrx.c > > +++ b/drivers/net/wireless/ath/ath10k/txrx.c > > @@ -95,6 +95,9 @@ int ath10k_txrx_tx_unref(struct ath10k_htt *htt, > > wake_up(&htt->empty_tx_wq); > > spin_unlock_bh(&htt->tx_lock); > > > + if (htt->num_pending_tx <= 3 && !list_empty(&ar->txqs)) > > + ath10k_mac_tx_push_pending(ar); > > + > > Just sanity checking - what's protecting htt->num_pending_tx? or is it > serialised some other way? Hello Adrian, I did not take the htt->tx_lock lock for this since it should not be needed. There are however some compiler optimizations that you have to look out for: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/memory-barriers.txt?h=v4.17-rc6#n1547 I can't see that any of the examples applies, but let's add READ_ONCE(), to make sure that the compiler doesn't try to optimize this. Will send a V2 for this. Regards, Niklas > > > dma_unmap_single(dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); > > > ath10k_report_offchan_tx(htt->ar, msdu); > > -- > > 2.17.0