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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E88EC43217 for ; Fri, 21 Oct 2022 13:30:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230486AbiJUNaW (ORCPT ); Fri, 21 Oct 2022 09:30:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230384AbiJUNaR (ORCPT ); Fri, 21 Oct 2022 09:30:17 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81E211290AF for ; Fri, 21 Oct 2022 06:30:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2600F61E9F for ; Fri, 21 Oct 2022 13:30:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88A6AC433D6; Fri, 21 Oct 2022 13:30:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666359008; bh=otm6vjOf917CVbDV4BVliAUxIoYgK/kcfD/iNX/POm0=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=WNs0oqAvXXccJyEmg2Lal3AB2MeZV0/H/A1uEFakznALFkUGRQa809OZeCJNJ3nmD joLgF8DQMOenM9IIf49fINkHcnFs+QZ9jwLoadDN2tIk0gQ0jimyIdaNqqKFfue3Ap qwGBdiLBxLJe3DdkantklD/BfY6CeRZJwmkpP9kZXfp/XYJGbWlZlzjRoBdnNiX23t AmkweXspRocCm7dvyoaEypLll0ZuL/6Rr/TadOg5d5XA8ZMJdaj/rcA4AKB7gMpCae FBYnt0cUZVYnp/IA9q/6wSBntXU2UU1JTFZU0ubIc2rJNGnfjaOKMpMTPxV8lLfuUc zN58RYbVz73Bg== From: Kalle Valo To: "Sriram R \(QUIC\)" Cc: "Jeff Johnson \(QUIC\)" , "linux-wireless\@vger.kernel.org" , "ath12k\@lists.infradead.org" Subject: Re: [PATCH 15/50] wifi: ath12k: add dp_rx.c References: <20220812161003.27279-1-kvalo@kernel.org> <20220812161003.27279-16-kvalo@kernel.org> Date: Fri, 21 Oct 2022 16:30:04 +0300 In-Reply-To: (Sriram R.'s message of "Thu, 13 Oct 2022 05:54:54 +0000") Message-ID: <87ilkdi9sz.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org "Sriram R (QUIC)" writes: >>> +static void ath12k_dp_rx_process_received_packets(struct ath12k_base >>*ab, >>> + struct napi_struct *napi, >>> + struct sk_buff_head *msdu_list, >>> + int ring_id) { >>> + struct ieee80211_rx_status rx_status = {0}; >> >>initializing just on entry seems wrong, see below > > We reset the whole struct once, and reset the necessary fields alone > for every loop within ath12k_dp_rx_h_ppdu or similar places as > necessary and pass the status to mac80211. The initial reset is > necessary so as to reset all unused fields. This is an optimization to > not memset the struct for every loop. It would be good to document such optimisations with a comment, otherwise people might be confused. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches