From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46E022CA7 for ; Fri, 18 Aug 2023 18:37:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A371C433C7; Fri, 18 Aug 2023 18:37:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1692383862; bh=LPZ3kbVFH1VZ1oefBF6eOczHPOVwUAr8ziZ+u5QQLA4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=C1yynuixq5mfeCFJN17DZCkjLYwYl1LiUH9n4Z+HqRHUpjxg/wOOYg7vev5qIBD8M h8pTP5FLwKK6XydUll15H1fK8mYCd8uX/wH1ihE+7eAgyKmsE5UrIZb40rpLT/0pPw Y1SmhR56CA1GTN2UeLnsOpV79Dupnm/CWDwKrNoMIQRpvixT1bt0UNpQKTClDHjx3D Lp2pikHYuPWiT4XilAGpb/i/dJqKn+euxrvq366+vBclvUpY8m1fFFlygYjtH1bIqo kVrhRP89hZp1Z4o9WFQEk9uYxU/lheGcsWpbX9Q45wDeQf+wYHK5N0OIIn7sMxztVF ja9ke8TO+5nnA== Date: Fri, 18 Aug 2023 11:37:40 -0700 From: Jakub Kicinski To: Tony Nguyen Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org, Joshua Hay , pavan.kumar.linga@intel.com, emil.s.tantilov@intel.com, jesse.brandeburg@intel.com, sridhar.samudrala@intel.com, shiraz.saleem@intel.com, sindhu.devale@intel.com, willemb@google.com, decot@google.com, andrew@lunn.ch, leon@kernel.org, mst@redhat.com, simon.horman@corigine.com, shannon.nelson@amd.com, stephen@networkplumber.org, Alan Brady , Madhu Chittim , Phani Burra Subject: Re: [PATCH net-next v5 10/15] idpf: add splitq start_xmit Message-ID: <20230818113740.1ed88d8a@kernel.org> In-Reply-To: <20230816004305.216136-11-anthony.l.nguyen@intel.com> References: <20230816004305.216136-1-anthony.l.nguyen@intel.com> <20230816004305.216136-11-anthony.l.nguyen@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 15 Aug 2023 17:43:00 -0700 Tony Nguyen wrote: > + netif_stop_subqueue(tx_q->vport->netdev, tx_q->idx); > + > + /* Memory barrier before checking head and tail */ > + smp_mb(); > + > + /* Check again in a case another CPU has just made room available. */ > + if (likely(IDPF_DESC_UNUSED(tx_q) < size)) > + return -EBUSY; > + > + /* A reprieve! - use start_subqueue because it doesn't call schedule */ > + netif_start_subqueue(tx_q->vport->netdev, tx_q->idx); Please use the helpers from include/net/netdev_queues.h.