Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp512182rdb; Fri, 5 Jan 2024 19:30:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFk8o7MVEMiCPnKIyJQ7LsQ1LZoStP0fdbukujKG5/as9o5h9dKf/E41NpDpjIR3ZqKY1V0 X-Received: by 2002:a05:6214:2b0c:b0:680:ce74:9525 with SMTP id jx12-20020a0562142b0c00b00680ce749525mr441066qvb.118.1704511841263; Fri, 05 Jan 2024 19:30:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704511841; cv=none; d=google.com; s=arc-20160816; b=cwwci4Qw1L1pTCGsxzT3xHgNaANNuM7NnfAYC8bIX+vailt4BrytKMmNpwFr5LZyta YgUewi2AxqfM1GIvPD4Rc4mpXj793VWRKIF8KlE2KjlSkWfqSFMOu2w3fbFygQz38Dqm WQG/81YJ7ebe4Fx4tA3zPoxD8CLYN25CkX8kIfgUvQPiOSkHoP8daUyO7XLcGr3j4lLQ GKo9KyzvCytU3dab9BMMsic+iVu7L+lLEHgVmLUjPgwIppyGAGO8zg55SZafgRjcTTTd zYIoi30BlKjTj8xkm+ku1YBhjGt2RqcYt4Q/2IAbBHLmWtFu6HQk7dYw0Zu5D5UlYpbo 9dcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=4jZ3iZgsVywFK2Ntbg5VKfs9AfF2wJaG0hr4w6q9u8w=; fh=xj4dZKoaFBL4JegojZJQtsvddfztt+QYM1s2e+uzOo8=; b=mgCsXmNSxYoTliZRq/+ixndb9TsWvQLEFkng+drWLmSHy1IhG+tEzUfVFiWRzi44PU RO/CQDHFgwzFfvLUHYb2A0aqcUDvYRozdY86zrII8ytbdj659TcJdyXetCWjnApu+i1H rGmm2FEbB/OR8ZHUwgU5+d2m0vHrMshIrCB1hSwf7ILLugT+WnmcoJtkj1zMdDmcYRoV RDAnZILcii8CM5BV9OzEZxSpTo/dYF42wi8RcXQipLVe2Dj7cCiV6EPej7llLPk0DICX QmV0gPinNsdSfFulPHk4aLcqTw1PW6zxkVijHgY+SAhgYcQuF3s+PO+JSs8+t3Vc5Dy3 2OEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dYDIp+Mb; spf=pass (google.com: domain of linux-kernel+bounces-18469-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c12-20020a0ce14c000000b0067f886473besi3184642qvl.76.2024.01.05.19.30.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 19:30:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18469-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=dYDIp+Mb; spf=pass (google.com: domain of linux-kernel+bounces-18469-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18469-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id EE9251C23C36 for ; Sat, 6 Jan 2024 03:30:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B42E117F6; Sat, 6 Jan 2024 03:30:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dYDIp+Mb" X-Original-To: linux-kernel@vger.kernel.org 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 DBC2C15B3; Sat, 6 Jan 2024 03:30:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A09CDC433C7; Sat, 6 Jan 2024 03:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704511831; bh=ZZT5W/3OayChCmzDajSxgELxnptLBYGuC7NHIb+7uWU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=dYDIp+Mby3VrwUNXuc505hhrUlZWX6YnsTAVt4cp6JDLy3Cz/pqLGQN6+dmvKEmUM 2bedL6TjTCT6R5Sx4kfi5PQ6E4J7L/vPeDv+H2ZW4FI3RUowD8z3DslbcTqNHNpoNZ ZXNamfRP8ONsklOAVRAkW8fuc+XE39d7oF/R1NHo2RKfHsh0OZWYc6pdBK6uibWJ23 +jCooMpqaBF/RbdMPN75AGF+VYJLlOZvW1yoInTFV+TtxrsESTc5LPiL8/RpPfRQBw 4OmYf1xM5QVcP/N4S/mSmIq7nx/naIBfHsFaIz/z0QBVzDKrlqebewzFQTGkmiK2Ql r9ZGd6gofQaHQ== Date: Fri, 5 Jan 2024 19:30:29 -0800 From: Jakub Kicinski To: Shinas Rasheed Cc: , , , , , , , , , , , , Veerasenareddy Burru , Satananda Burla , "David S. Miller" , Eric Dumazet Subject: Re: [PATCH net-next v3 6/8] octeon_ep_vf: add Tx/Rx processing and interrupt support Message-ID: <20240105193029.004ee174@kernel.org> In-Reply-To: <20240105203823.2953604-7-srasheed@marvell.com> References: <20240105203823.2953604-1-srasheed@marvell.com> <20240105203823.2953604-7-srasheed@marvell.com> Precedence: bulk X-Mailing-List: linux-kernel@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 Fri, 5 Jan 2024 12:38:21 -0800 Shinas Rasheed wrote: > +static int octep_vf_iq_full_check(struct octep_vf_iq *iq) > +{ > + if (likely((IQ_INSTR_SPACE(iq)) > > + OCTEP_VF_WAKE_QUEUE_THRESHOLD)) > + return 0; > + > + /* Stop the queue if unable to send */ > + netif_stop_subqueue(iq->netdev, iq->q_no); > + > + /* check again and restart the queue, in case NAPI has just freed > + * enough Tx ring entries. > + */ > + if (unlikely(IQ_INSTR_SPACE(iq) > > + OCTEP_VF_WAKE_QUEUE_THRESHOLD)) { > + netif_start_subqueue(iq->netdev, iq->q_no); > + iq->stats.restart_cnt++; > + return 0; > + } Please use the macros from netdev_queues.h here as well. Looks like you may be missing a memory barrier here. And please call this function after queuing an skb to make sure NETDEV_TX_BUSY is almost never returned. See Documentation/networking/driver.rst