Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp68385rdb; Fri, 5 Jan 2024 03:05:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IH22jL5+pf51eNuFvI8IQTKVCHvyvnoDe3bosdDVucF2f7wV5AAPBx/w1eZ1Yytzc53cKJ+ X-Received: by 2002:a05:6214:d89:b0:680:c75f:b444 with SMTP id e9-20020a0562140d8900b00680c75fb444mr1886998qve.37.1704452725938; Fri, 05 Jan 2024 03:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704452725; cv=none; d=google.com; s=arc-20160816; b=wrLAGUROQDag9LOP4KzERSZPUTH4U8/RRmcUiB8iDIfICCCR1AQDAHHaBHiLIlOiMv tazoGqUNGJdQR7c3QXc1RTuNDfKIf1KuBB2gvXuJh96PrI/van6/U+Q9Y+TWoK07cacE aw+qJ7tBYu/iEs0ovmNiIsCaRqftO2iM/rlaknwmawdbCMaynDWFSRr2dwQPvYQMxyfq y7QlRGd7zNdtziQme5TMDjkbJ4dJ6FHocOdFPyn9NPvBf7NbrowMjS4lGLv0JXMXrc+7 HMune2T6EaZQXVvwHyRmBP0/et1v5ky+txxtoAMyZypfd9CSrB+eaj4+/rXDSp1aNIqf o3Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=+fpo5HUbykfbyD44P+YtHkjizzxfKNPbpfhXSWOSfNs=; fh=pza06Mc204q1ncbG0nxGC3oZONQBrMDTCTQk2u4x8DA=; b=ZlXIo24jZ+2Gx4kx/MajRb0LhKtWOisKyoQ0P1on5MWc118V7PC5ALJqoUl0U/mTmt 4nUBJO6rG+eP/58GKhIfrsLjraRRgECniQHF0XC3XVd9x0QFVSmQtAdtQ5I/fIW53HIG /3B+AMuE+sazLEe3e4wWnIrorlhkd4PXX3JFU/ZKpUo23g8KMVD8nMB5ojnU2MakZiBy iAv4lCgaASjJ8hRHlwO8P/HdpXg6U26oYSsQl4yafjm7t5OfrvxdhDAC6ealWTrenFpu ToOjddEoMV0vOUByp4RNO/kwQfpw4MNTGFMvsyt4zo4eheC5/+pwuHqZloIKw4skB4R7 iuXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QSmrksRi; spf=pass (google.com: domain of linux-kernel+bounces-17778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17778-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o20-20020a05620a2a1400b007830c47fcf0si415121qkp.73.2024.01.05.03.05.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 03:05:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QSmrksRi; spf=pass (google.com: domain of linux-kernel+bounces-17778-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17778-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 AA2951C20DC5 for ; Fri, 5 Jan 2024 11:05:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E3952C1A9; Fri, 5 Jan 2024 11:05:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QSmrksRi" 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 904462420A; Fri, 5 Jan 2024 11:05:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C639BC433C7; Fri, 5 Jan 2024 11:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704452714; bh=tAcY3Wc85Xssfc6xmX/zkSzf1A83qZCnAsYuhsInaUA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QSmrksRiIqN7GoUVkymQxoJ9nLsKvI9RfLoXRVVkksE1CO+ObSwFhyH/6v3DN/jMw 378Scwa1Da7fdmpRi4Is58HyL5Yg1OxC4B80mysdJJDsZ4ffNW84vPHT52f+0nHFuH EeNbWXASg1LLRk6ZguzDvRZXR2DE7ZODlqfg180GBjGgmTNORAf4SqS+5r+5wC4OAZ hvevt/jz542KojTCEBlyIIl4kFXTEKghd9okwxadLhAlszGIMqE3KRMnKcfoibahbN aZp0+aKil7dQJ89nhS6Wt18il2m66loRu8Ux+VO6yLYw2ir6x7ammjeIaCvhQxtihr 7Qcwkv2uslEoQ== Date: Fri, 5 Jan 2024 11:05:08 +0000 From: Simon Horman To: Shinas Rasheed Cc: Jakub Kicinski , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Haseeb Gani , Vimlesh Kumar , Sathesh B Edara , "egallen@redhat.com" , "mschmidt@redhat.com" , "pabeni@redhat.com" , "wizhao@redhat.com" , "kheib@redhat.com" , "konguyen@redhat.com" , Veerasenareddy Burru , Satananda Burla , "David S. Miller" , Eric Dumazet Subject: Re: [EXT] Re: [PATCH net-next v2 6/8] octeon_ep_vf: add Tx/Rx processing and interrupt support Message-ID: <20240105110508.GU31813@kernel.org> References: <20231223134000.2906144-1-srasheed@marvell.com> <20231223134000.2906144-7-srasheed@marvell.com> <20240104130016.47bc1071@kernel.org> 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-Disposition: inline In-Reply-To: On Fri, Jan 05, 2024 at 07:26:14AM +0000, Shinas Rasheed wrote: > Hi Jakub, > > Thanks for the review! > > > > + rx_done = octep_vf_oq_process_rx(ioq_vector->oq, budget); > > > > You should not call Rx processing if budget is 0 at all, please see > > NAPI docs. Looks like the function may try to refill Rx buffers with > > budget of 0. > > > If budget is zero, octep_vf_oq_process_rx just wouldn't try to query hw for packets. Also since by then, the refill count should have been less than refill threshold, if not it only flushes free buffers back to the ring, (and tell hw that there are more free buffers available which have been processed from maybe previous calls - but this seems unlikely and should have been flushed at that time). > > > > @@ -114,8 +158,8 @@ static int octep_vf_setup_oq(struct octep_vf_device > > *oct, int q_no) > > > goto desc_dma_alloc_err; > > > } > > > > > > - oq->buff_info = (struct octep_vf_rx_buffer *) > > > - vzalloc(oq->max_count * > > OCTEP_VF_OQ_RECVBUF_SIZE); > > > + oq->buff_info = vzalloc(oq->max_count * > > OCTEP_VF_OQ_RECVBUF_SIZE); > > > + > > > > bad fixup squash? > > > Sorry, I didn't understand. Can you explain? I think he means that this change seems to make a minor update to code introduced in a previous patch of this series, and thus should be squashed into that previous patch.