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 563E041CF1; Mon, 20 Feb 2023 22:11:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A1EB430FE; Mon, 20 Feb 2023 22:11:09 +0100 (CET) Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by mails.dpdk.org (Postfix) with ESMTP id E647340395 for ; Mon, 20 Feb 2023 22:11:07 +0100 (CET) Received: by mail-ed1-f54.google.com with SMTP id h16so9616230edz.10 for ; Mon, 20 Feb 2023 13:11:07 -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=LU77HxCdS6vB3bCne2QA8iD0AI96f+TN8N1i5bM2cgN9ksCm/knoCN+LdWEbv7OE0j hxVAtXjA8m7ZO5yqRJv8VWlHfhRCDLZ87x8tbuQlUwsewNm1epzzqrPm3Xy8ViaEam1F ecPMk2vxV5vTdTfUrM4efcZwb2UKB1HtWskKCLqpRiWfFhQvFb9W3cE97m2rmcUoZ7zS yIDa/q6PgtdkuZQZXHjwZM1vWOkbNzuTS86RpvFs+wvkq2hqlD3AhjqeTwZfPo2yPg9G Q9QdR5ChufJi74o3GAlVH7hQG+svKkHFfBqsGKjBV6bXOD7rvhIuZFcgbxYwZFyluQqS IJ8g== 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=GDq5N/lucUy7u6GK6dAtzgddzeoM1iKSBWMovYCD5SJXawD7OGExqztwPkjpMBMLdF 9ybtXJH1pZAgdgpG0Rmp+ypwOYjrSdK/lZhbnC5s1aD+/vsLbO2i34KvE5pWk/Swevq6 AYi4Jj3/BUk88AZeCD7DiaxmymzqrVJJcwQ97+6Ei14xcBKeCwb0x61WCYr/mcACOpGb ETCwSR0eMfixl50altmfMUl01u+vzBDocU/GtwLR0XyTTEybzkerUlawyUJoDLGK2UI5 GbeesBlEbf+1wbxJzlgufVzN+z7eVIUXpIcAfXPFSSvWlDegvSebCfg48MADPI76+RCX YffQ== X-Gm-Message-State: AO0yUKUXuaGq03oX1k49KN43B9jnpVX+GKpykb7fjnb0hArs5kjF0Sqc NTak0hRsjAFxM0m3ToXB4Qo= X-Google-Smtp-Source: AK7set9X9I72hVU34MxUC57sL3N0rRZRTWJibXBxYPFRLokeCiZ6k5Wi/cW2bWQd1nOYqBY8B8SgkQ== X-Received: by 2002:a05:6402:f1c:b0:4a2:5652:d8ba with SMTP id i28-20020a0564020f1c00b004a25652d8bamr4104417eda.18.1676927467509; Mon, 20 Feb 2023 13:11:07 -0800 (PST) Received: from localhost.localdomain ([176.41.28.141]) by smtp.gmail.com with ESMTPSA id o1-20020a50c281000000b004aef4f3bc26sm2430093edf.87.2023.02.20.13.11.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 20 Feb 2023 13:11:07 -0800 (PST) From: Levend Sayar To: junfeng.guo@intel.com Cc: dev@dpdk.org, Levend Sayar Subject: [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update Date: Tue, 21 Feb 2023 00:11:01 +0300 Message-Id: <20230220211103.8282-1-levendsayar@gmail.com> X-Mailer: git-send-email 2.37.1 (Apple Git-137.1) In-Reply-To: <20230220151936.2716-1-levendsayar@gmail.com> References: <20230220151936.2716-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)