From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EA6FCCA9EAF for ; Thu, 24 Oct 2019 10:06:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9A86205F4 for ; Thu, 24 Oct 2019 10:06:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="Kdf88FKG"; dkim=fail reason="key not found in DNS" (0-bit key) header.d=codeaurora.org header.i=@codeaurora.org header.b="cYHopb92" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389669AbfJXKGA (ORCPT ); Thu, 24 Oct 2019 06:06:00 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35412 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725874AbfJXKGA (ORCPT ); Thu, 24 Oct 2019 06:06:00 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5D07A60134; Thu, 24 Oct 2019 10:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571911559; bh=KzgCcuMZO8K844GlsK2yNsEGh+11mPBRcWET/19MD+E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Kdf88FKGc45bWbymtLiitwLwaG+CbtpUdXFdWnqsLhbeof9SQFxGDhjyqvu8N5eU9 +UT7tpQMCuMD9xFJ1oQcKA61a9id+vjDQZbtgsy9ca9NLY0G7VqqlVmp6keTObwiJE r6eKQ+82bWyDN3TjZD2cfukqD0WTkucAMrWv6FSc= Received: from potku.adurom.net (unknown [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C31C6606CF; Thu, 24 Oct 2019 10:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1571911556; bh=KzgCcuMZO8K844GlsK2yNsEGh+11mPBRcWET/19MD+E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=cYHopb926186KOTXqqPmy74r7zwUKy0qcZqNZsAmCYvUzno4sZtF+DQ6UlPIdL40t wsH01wvxHMQMubeC3wKp2/xy1zriQulFKHicO7+KsrmLbhFiOtF2VxGMe7Lz94qDJH 3VvXlhjkd9qIpr6k/hCOnwTCWoZFNknUkWoVLBV4= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C31C6606CF Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Wen Gong Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v6 2/3] ath10k: change max RX bundle size from 8 to 32 for sdio References: <1569402639-31720-1-git-send-email-wgong@codeaurora.org> <1569402639-31720-3-git-send-email-wgong@codeaurora.org> Date: Thu, 24 Oct 2019 13:05:53 +0300 In-Reply-To: <1569402639-31720-3-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Wed, 25 Sep 2019 17:10:38 +0800") Message-ID: <87h83ysbjy.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Wen Gong writes: > The max bundle size support by firmware is 32, change it from 8 to 32 > will help performance. This results in significant performance > improvement on RX path. > > Tested with QCA6174 SDIO with firmware > WLAN.RMH.4.4.1-00017-QCARMSWPZ-1 > > Signed-off-by: Wen Gong [...] > --- a/drivers/net/wireless/ath/ath10k/htc.h > +++ b/drivers/net/wireless/ath/ath10k/htc.h > @@ -39,7 +39,7 @@ > * 4-byte aligned. > */ > > -#define HTC_HOST_MAX_MSG_PER_RX_BUNDLE 8 > +#define HTC_HOST_MAX_MSG_PER_RX_BUNDLE 32 > > enum ath10k_htc_tx_flags { > ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE = 0x01, > @@ -48,10 +48,16 @@ enum ath10k_htc_tx_flags { > > enum ath10k_htc_rx_flags { > ATH10K_HTC_FLAGS_RECV_1MORE_BLOCK = 0x01, > - ATH10K_HTC_FLAG_TRAILER_PRESENT = 0x02, > - ATH10K_HTC_FLAG_BUNDLE_MASK = 0xF0 > + ATH10K_HTC_FLAG_TRAILER_PRESENT = 0x02 > }; I left the comma in ATH10K_HTC_FLAG_TRAILER_PRESENT to make the diff cleaner. > +#define ATH10K_HTC_FLAG_BUNDLE_MASK 0xF0 > +#define ATH10K_HTC_BUNDLE_EXTRA_MASK GENMASK(3, 2) > + > +#define ATH10K_HTC_GET_BUNDLE_COUNT(flags) \ > + (FIELD_GET(ATH10K_HTC_FLAG_BUNDLE_MASK, (flags)) + \ > + (FIELD_GET(ATH10K_HTC_BUNDLE_EXTRA_MASK, (flags)) << 4)) I think I asked you about the shift of 4 bits earlier but now I figured it out (I hope) and documented it like this: #define ATH10K_HTC_FLAG_BUNDLE_MASK GENMASK(7,4) /* bits 2-3 are for extra bundle count bits 4-5 */ #define ATH10K_HTC_BUNDLE_EXTRA_MASK GENMASK(3, 2) #define ATH10K_HTC_BUNDLE_EXTRA_SHIFT 4 static inline unsigned int ath10k_htc_get_bundle_count(u8 flags) { unsigned int count, extra_count; count = FIELD_GET(ATH10K_HTC_FLAG_BUNDLE_MASK, flags); extra_count = FIELD_GET(ATH10K_HTC_BUNDLE_EXTRA_MASK, flags) << ATH10K_HTC_BUNDLE_EXTRA_SHIFT; return count + extra_count; } As you can see I also changed the macro to a function, as I prefer C over CPP :) And changed ATH10K_HTC_FLAG_BUNDLE_MASK to use GENMASK(). But this only compiled tested, please do properly test the patches from pending branch and let me know if I broke something: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=afd85ca1b086695cfd26bf484442eaf3bccb6bdd https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=4225b4d50a4f6a1159dc3316d068398f1b5edb57 https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=911e0fc846cfc46fb4ccd1d223cb153681ff05bd -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iNa0G-0001N9-Lg for ath10k@lists.infradead.org; Thu, 24 Oct 2019 10:06:02 +0000 From: Kalle Valo Subject: Re: [PATCH v6 2/3] ath10k: change max RX bundle size from 8 to 32 for sdio References: <1569402639-31720-1-git-send-email-wgong@codeaurora.org> <1569402639-31720-3-git-send-email-wgong@codeaurora.org> Date: Thu, 24 Oct 2019 13:05:53 +0300 In-Reply-To: <1569402639-31720-3-git-send-email-wgong@codeaurora.org> (Wen Gong's message of "Wed, 25 Sep 2019 17:10:38 +0800") Message-ID: <87h83ysbjy.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: Wen Gong Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Wen Gong writes: > The max bundle size support by firmware is 32, change it from 8 to 32 > will help performance. This results in significant performance > improvement on RX path. > > Tested with QCA6174 SDIO with firmware > WLAN.RMH.4.4.1-00017-QCARMSWPZ-1 > > Signed-off-by: Wen Gong [...] > --- a/drivers/net/wireless/ath/ath10k/htc.h > +++ b/drivers/net/wireless/ath/ath10k/htc.h > @@ -39,7 +39,7 @@ > * 4-byte aligned. > */ > > -#define HTC_HOST_MAX_MSG_PER_RX_BUNDLE 8 > +#define HTC_HOST_MAX_MSG_PER_RX_BUNDLE 32 > > enum ath10k_htc_tx_flags { > ATH10K_HTC_FLAG_NEED_CREDIT_UPDATE = 0x01, > @@ -48,10 +48,16 @@ enum ath10k_htc_tx_flags { > > enum ath10k_htc_rx_flags { > ATH10K_HTC_FLAGS_RECV_1MORE_BLOCK = 0x01, > - ATH10K_HTC_FLAG_TRAILER_PRESENT = 0x02, > - ATH10K_HTC_FLAG_BUNDLE_MASK = 0xF0 > + ATH10K_HTC_FLAG_TRAILER_PRESENT = 0x02 > }; I left the comma in ATH10K_HTC_FLAG_TRAILER_PRESENT to make the diff cleaner. > +#define ATH10K_HTC_FLAG_BUNDLE_MASK 0xF0 > +#define ATH10K_HTC_BUNDLE_EXTRA_MASK GENMASK(3, 2) > + > +#define ATH10K_HTC_GET_BUNDLE_COUNT(flags) \ > + (FIELD_GET(ATH10K_HTC_FLAG_BUNDLE_MASK, (flags)) + \ > + (FIELD_GET(ATH10K_HTC_BUNDLE_EXTRA_MASK, (flags)) << 4)) I think I asked you about the shift of 4 bits earlier but now I figured it out (I hope) and documented it like this: #define ATH10K_HTC_FLAG_BUNDLE_MASK GENMASK(7,4) /* bits 2-3 are for extra bundle count bits 4-5 */ #define ATH10K_HTC_BUNDLE_EXTRA_MASK GENMASK(3, 2) #define ATH10K_HTC_BUNDLE_EXTRA_SHIFT 4 static inline unsigned int ath10k_htc_get_bundle_count(u8 flags) { unsigned int count, extra_count; count = FIELD_GET(ATH10K_HTC_FLAG_BUNDLE_MASK, flags); extra_count = FIELD_GET(ATH10K_HTC_BUNDLE_EXTRA_MASK, flags) << ATH10K_HTC_BUNDLE_EXTRA_SHIFT; return count + extra_count; } As you can see I also changed the macro to a function, as I prefer C over CPP :) And changed ATH10K_HTC_FLAG_BUNDLE_MASK to use GENMASK(). But this only compiled tested, please do properly test the patches from pending branch and let me know if I broke something: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=afd85ca1b086695cfd26bf484442eaf3bccb6bdd https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=4225b4d50a4f6a1159dc3316d068398f1b5edb57 https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=911e0fc846cfc46fb4ccd1d223cb153681ff05bd -- https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k