From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7ABD841CEC; Mon, 20 Feb 2023 16:19:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 36BBE4306A; Mon, 20 Feb 2023 16:19:46 +0100 (CET) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) by mails.dpdk.org (Postfix) with ESMTP id B7D7440395 for ; Mon, 20 Feb 2023 16:19:44 +0100 (CET) Received: by mail-ed1-f47.google.com with SMTP id f13so5496725edz.6 for ; Mon, 20 Feb 2023 07:19:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=711UVsHxRTswga1liQJYmUtASTK5jqT5xDXcGGidHK0=; b=CqoGgAQEyqq4gqWsZHANJA5du/Z6CHS/OS4wEmOTgmKK0yF+BnONPzqGj/QqZnrH84 5GWKYrWVuSog7UaXf2ryhEiM2zP1k60lwqnz4OHeZ+GwcjqOYzJ+z2fRvaJmD3XiL+oR q5UoXP+cDpDhDrIYZHg7ammc7rcqxIFHCosfHBRoF8mOCf3aZdzL7y6ouCuscfHO6mfy quCk8bRhoENXxoLzCp0m4svhluTIfHpO2wxy6LMb1DtWRRNB0eMDw9BuCnfXMG3wlLcs e9P/RvV09euATLNiFzcOPpoq32MMvEwXhXkfvE0XgTm33loS11R1Menbh3Chb9ZwAlXl bvIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=711UVsHxRTswga1liQJYmUtASTK5jqT5xDXcGGidHK0=; b=pxbNYeaGlaDolaUz/xfjuY2wop367/BxaIk92SuutSRi8UDhm+GilgIF5k6OpYBo2p QD/SxE3nNog0/tjcDgYiCWVqf9FPLXqiu0ahlmlmV/IDunW+ZlWGwOSYZmQ05NT7GcbQ T+02kmoP7WIf8tHz9YfHidG9M5P3QBV87tCn05dS5EX53877c40PW22ufNCafD7v2W+C /CR5ptQ2mzQrfMJqf4dw0koHPLREP7JlKRGfnzgy5ibJ/j/dEvH2LK69I8cRIhCNWf5I QCSf0+LMI1Gs7JH/6xZHY8FaiZ+L3rTDIopNqNQtfOZPqMGgN5BQXvnNV6RT/P8j+mAy z7JA== X-Gm-Message-State: AO0yUKWTxpc/7qHD6Cn9A6ZgvUgFgDmjUzL22ZeM0rtTs4REe+H15qaK gjjlvMU/ZvtqmhD1dE8gi3DBrt8655g= X-Google-Smtp-Source: AK7set/XyLlS80QnXCSnDUdBrA4zThIDAFQmPhes55BJFfDdB+UW5NKnd9IT4yHeUJxrEODM9Lp8yA== X-Received: by 2002:a17:906:6885:b0:878:545b:e540 with SMTP id n5-20020a170906688500b00878545be540mr9216345ejr.51.1676906384302; Mon, 20 Feb 2023 07:19:44 -0800 (PST) Received: from localhost.localdomain ([176.41.28.141]) by smtp.gmail.com with ESMTPSA id t14-20020a1709066bce00b008cff300cf47sm1740585ejs.72.2023.02.20.07.19.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 07:19:43 -0800 (PST) From: Levend Sayar To: junfeng.guo@intel.com Cc: dev@dpdk.org, Levend Sayar Subject: [PATCH v2] net/gve: fix Rx no mbufs stats counter update Date: Mon, 20 Feb 2023 18:19:36 +0300 Message-Id: <20230220151936.2716-1-levendsayar@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230219003059.85479-1-levendsayar@gmail.com> References: <20230219003059.85479-1-levendsayar@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rx no_mbufs stats counter update is added for another error case. Fixes: 4f6b1dd8240c ("net/gve: support basic statistics") Cc: junfeng.guo@intel.com Signed-off-by: Levend Sayar --- drivers/net/gve/gve_rx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/gve/gve_rx.c b/drivers/net/gve/gve_rx.c index 66fbcf3930..d346efa57c 100644 --- a/drivers/net/gve/gve_rx.c +++ b/drivers/net/gve/gve_rx.c @@ -61,7 +61,10 @@ gve_rx_refill(struct gve_rx_queue *rxq) break; rxq->sw_ring[idx + i] = nmb; } - nb_alloc = i; + if (i != nb_alloc) { + rxq->no_mbufs += nb_alloc - i; + nb_alloc = i; + } } rxq->nb_avail -= nb_alloc; next_avail += nb_alloc; -- 2.37.1 (Apple Git-137.1)