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 379C641CF1; Mon, 20 Feb 2023 23:57:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B34143112; Mon, 20 Feb 2023 23:57:56 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2046.outbound.protection.outlook.com [40.107.94.46]) by mails.dpdk.org (Postfix) with ESMTP id B0D9543110 for ; Mon, 20 Feb 2023 23:57:54 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ei7RrGT4xyqj86hN+9RGUVKf4n4r0Zk1NP3Bdio11ofSlLS0+qc5cWVKjdfIAqC43KMemezj5Vxs6+9mToVRe3u//+tL/Qove7UqMGUwtFc3MXvL0DlY/IeCB077zkJw9FVIUH9EcflOZfIQMKhmkeoT7pyR3gjgvM3TajLNWiK5Qxa4cPYnIYZFeJ+H5GhmYjisefsDJFCuIjwNjqDivqYsmneXYbtPn2D6Hn9uZKDT7WHCWnyIHlFBWQphVFbZnC1VWMcJ/MNb3v+/8R1dY5btjx3goQD5rycgYdE/N2Vg+tDieqQr3GI1pBP7ONdBmpmjIXOy/7tS6t2CpFzcuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=LKXQGy+utPQJJatyZ3AoQ9gHPA9I+fW53VMVc05qO4c=; b=KiR8tNBFGtFe0BaABlWaH3fh/TWtGORDVuLME16p6tJDx7xyKDPXdyQ6tbl9EBoqUZ03RNcPHOIvNdU3Qdmhk8MKN6cNlMUvBs+tBJQB0EyWWVAn8VRsVMJ2ZHz7+KjonOuPeN8hvNGmZfo6an8Ufv+geKT/gEaDnwC6xhnVKi4vn1bkN2DBjBgNjd8VmalDpWDE3S7YXb9ECRmsi3pIfyR3UfOMNtyq45b3xvo3KcLJRr+dLBfOm4aOOfo4iFbXGiR4ehAz6fLwXIYwv613SFf3pdhU/xDepeQB0NMKrNVRkksaEn6s4XC7YdwpSc0uwt3NOAua8TGk/wI40UpmLA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=LKXQGy+utPQJJatyZ3AoQ9gHPA9I+fW53VMVc05qO4c=; b=valZkximBHqlIZf9qxw3glZ22K+HUrHwH7zS2us7D8BhOd018pQQODrinvPGjVMdCxyHZ3aQrzy4s+HGSx0hWZX6QGxuS6HrnbFR0D1FetUEkg7UShiZcNzBhxfsCpMxmPc1xeAEB6IAHN9ykt7W52MNKWcnxCxbIaPFR+XA+8o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by SJ2PR12MB7798.namprd12.prod.outlook.com (2603:10b6:a03:4c0::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.19; Mon, 20 Feb 2023 22:57:52 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3614:22ed:ed5:5b48%8]) with mapi id 15.20.6111.020; Mon, 20 Feb 2023 22:57:52 +0000 Message-ID: <520d2dcd-ab57-7097-3218-5965d7399843@amd.com> Date: Mon, 20 Feb 2023 22:57:47 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Levend Sayar , junfeng.guo@intel.com Cc: dev@dpdk.org, Stephen Hemminger References: <20230220151936.2716-1-levendsayar@gmail.com> <20230220211103.8282-1-levendsayar@gmail.com> From: Ferruh Yigit Subject: Re: [PATCH v3 1/2] net/gve: fix Rx no mbufs stats counter update In-Reply-To: <20230220211103.8282-1-levendsayar@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO6P123CA0033.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2fe::6) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ2PR12MB7798:EE_ X-MS-Office365-Filtering-Correlation-Id: e87ab051-7dda-4473-e193-08db1395e581 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KCGQxbcvgMMTttOeTYfqvtZZXU0eBrjFPhEjXms4CWHTqDhYQ0/e6J1BIGFWdgVXATXiMOL92beSTtqJE2gAregqSGEYLqOpHS58xABuxOXeCPRD/7wC+LnfjIOYJUnlVkkPvrVMRQwOUVmp/FCx/U+AEkxrlzGaVbf7xN0wiPBF5QUEbakQ2F3vDpK1j7yrednWr+cgxGrG0MUaL8rRd1LuQiwMda/SbyqoqoMs9skLOQkjmN8XSA3LFwebe4MJcDy6wayRQZrCqCo2/MVkDyUEojiynvK1PrKx9ZSm99Z1KTWoV7GVkcHjl3nL7PIZWNOqsymXz8I8kISQcdnKnin5Q8nBiKiNarx5ZDb0rqbqwNOceKYHwwAWJc/klzHMnZrDad2U2j7q0T0MP9uuImRhTTu6vzdaNBqzFr6BycjGtwCuya+JxAbezx4Bz3XgDpvvLz8WOy958Gf+VetpSqtRQ0tOWkJ3USKkFN/NaJ5+o0G+Jb6fSr7EU2sb/YRW9f0ZSoKlfBwHFjkH+lJ73rBiufSYXVmDXkNfEyGArJVXFW53ZOsoMqfQK49YFX1iT2RqHVRp5oNw2hxhNoqBtJg7PVrg2aCYWLi9UNRrkUwjfrGHKnUg2CsUiqxOyyTpQdVT4OeOYY+fPeiUh3kxb60i8qyJwLEndZXX1BtqXWmgD3NzOLlW1M5XoJMD4UzmttbVGASqvcmWtoAV35Fqs8R1qEOBi3SusB9zVHqNZGo= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(136003)(376002)(346002)(366004)(396003)(451199018)(478600001)(38100700002)(44832011)(31696002)(2906002)(15650500001)(86362001)(4744005)(316002)(41300700001)(36756003)(5660300002)(83380400001)(2616005)(8936002)(66556008)(4326008)(8676002)(66476007)(66946007)(6506007)(26005)(186003)(31686004)(53546011)(6486002)(6512007)(6666004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Q2R6dXNqWm9oVnFnQVdBUkZqcnNKdzM0NVloM2NvQVk2c3pxNmw3YWlySGl5?= =?utf-8?B?S1AycjYrUUhPNmg1K1RVRC9Ddm1aRHpHemFBN0M5UkpKc3BFZkd3MDBxSUd4?= =?utf-8?B?UGZzZkRob01WVzdyekFYaG56Q0VuVWRVVnFzaDZwSWxnQVViSXFUVE9mVFgz?= =?utf-8?B?SU5MTnlGOWtoTU1BdkQrZXRhcDkxTVVyWXE3bGZCdDFiZW0xWTU1SFNaT05F?= =?utf-8?B?V2piTGxBQWFuaFhhdnVITjdqQXpMZ3RDWWRMbU9HczFmOVdBR3BtUG9DOF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MEkvcTZvelF3dXpR?= =?utf-8?Q?+h6Rd27O48PFEBHLYLMjcFO5s?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: e87ab051-7dda-4473-e193-08db1395e581 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2023 22:57:52.6950 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: J3q4ZfIAHO/hqDLBhrazwZ5j9RR4fL1kJ6DC4n/x7fZW6k9gnLs49/iuO4MmFW// X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB7798 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 On 2/20/2023 9:11 PM, Levend Sayar wrote: > 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; Looks good to me, there was a comment from Stephen to add 'unlikely()', is that issue resolved?