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 A8604A0547; Thu, 9 Sep 2021 10:05:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64C7040041; Thu, 9 Sep 2021 10:05:51 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id C65AF4003E for ; Thu, 9 Sep 2021 10:05:49 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10101"; a="284422556" X-IronPort-AV: E=Sophos;i="5.85,279,1624345200"; d="scan'208";a="284422556" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 01:05:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,279,1624345200"; d="scan'208";a="479538630" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga008.jf.intel.com with ESMTP; 09 Sep 2021 01:05:48 -0700 Received: from orsmsx602.amr.corp.intel.com (10.22.229.15) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 9 Sep 2021 01:05:48 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Thu, 9 Sep 2021 01:05:48 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Thu, 9 Sep 2021 01:05:48 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n4G27kS/eutAtUNiVBZoCbltjVXxC3Oy6/uJe0m0H27k2l7MYa3gA7Bc6SnfDMq9HoIaek1KZixvfOdDTKrsl4KOuLnNqtI7mRD1gqh6e8yy5ac5P0RabURbjQbWmas6awQB17BlRSq9YM5GBBLRGi5d4qyO3WAFuOmrZFzdM6UAl/zQJOunlWLVKm7/oikW3AqjmrhbrllrgGUFFUMKpyb4sdDdhQ8avJpkD5SlFM0HX1MCsDeH5cDI0/fG5g3uFjeKyQOvA5NavHVa3xKK9arqCk/iJjL2jj2Fklw8ZXpY52TTHQZRmcbjV/oUc3O0dwScDjC4aLE73QyQ9FWv6A== 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; bh=odLTEOdVPCbweCO5QOIX8nagGu0kYWYa2MMR91NrmNc=; b=UyQGoOhndMbE7JocA4VaA4ES5tPoWsZTPEyzqxJ+jgaR7ucbMdYSM053y+2NB9y4cl59tzZ71Q244NFGCch1m9YxbgfXL+WeaVpeR9vtTn2aPrkNpSx5obxDNu2sJBinYwTNaTIlQnZZoi2DZfh/KJEtnw3QMRAPvmZ1snEvW9ulId7cGfpAM+PBweIToA5oF1mrFSQlADA+XL32fioMlFZ8LAbg+3sqPqOnmde9OditTm/oQbVcSAYlYj6QZoXKgxYLdPGuTqOoFeRC+aiLzrF1JuzCCNET+O5HFNywbCqcYlczr3Ai84gSSENcqz+bzts86K2hi8YERHPB9omHow== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=odLTEOdVPCbweCO5QOIX8nagGu0kYWYa2MMR91NrmNc=; b=oHILfzoT8n94Eybet9Aq8yEt18Bt3fUCc66n6ctXzqvnbGn2zHQMg+yJHSUZE+tymtbcz6HYGv1zULuTBqk7WQsb5kPS/sJSQ+BAo0D76XYsmXyIPqjytAI2wfVt3SLWmupZD2XamLToa+Wkd1OeZ/SXI3AupYhuBAJk3Vh8phQ= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB4902.namprd11.prod.outlook.com (2603:10b6:510:37::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14; Thu, 9 Sep 2021 08:05:47 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::747b:3a08:d1ec:31fc%5]) with mapi id 15.20.4478.025; Thu, 9 Sep 2021 08:05:47 +0000 To: Qiming Chen , References: <20210909024531.10009-1-chenqiming_huawei@163.com> <20210909041658.10123-1-chenqiming_huawei@163.com> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Thu, 9 Sep 2021 09:05:41 +0100 In-Reply-To: <20210909041658.10123-1-chenqiming_huawei@163.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB9PR05CA0005.eurprd05.prod.outlook.com (2603:10a6:10:1da::10) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DB9PR05CA0005.eurprd05.prod.outlook.com (2603:10a6:10:1da::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16 via Frontend Transport; Thu, 9 Sep 2021 08:05:46 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bfbc3ec8-da56-444c-6a64-08d97368a146 X-MS-TrafficTypeDiagnostic: PH0PR11MB4902: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yj2otkTeeC2TmgT5/zAOWhwY+V64xGYnBnMXtDyML+USu3KxQbdJeyqtTEoohO0rC/id+6+47MB69bOrqtOVNuNucpcT1iSNEFNC5aEDKxRX7bcR5kRCx6i5ogmHbIfXDaKpB7Y616EuKJ75mLdvb5/8qcFrBsZz3Y0T37/3z5GAQ8+9FySRlQ1FrwmwQWHsMMfrVgeWN0HkhE40YY5KV7V2LtsyXjU/pqpaAW+Lpyk7Y+0rFCcolcTX8cTiE4eGx6/MjyYHrul1PZYqU2L1WwZPO087JT/PbS7symchC3bzgIaeo82YQh75TopettsWuJJhqTmPwAe9pVoalIVQC5omDY2Be80wQei+oxzsissziW2WpHiIL/nwpupCg73u4pNKf0IWyeqxEkFkYcIoy6XxgZIYgAKpoULSvYmCaFIb8UxQ9+6WBErFfQi70ET2P0hFFLzmMBJI5mGFgInfv+/BEislyX8o9nC53C5Pz4VSdZMoJ6DU8S10tzis7iLDPh/5iR4nPLkSBGG6L7t3O7I7AcQf3xoPpMBVJm+VXmQpsh5Cjam9WaKZ0xL4mf4xo1xcrdRCRqMnmFxWhcOJhdwSi/GnbUN1C2qHVRxqcmwGoHl8UyJwLQB2LqjjTe04gshVCvfUNvCrEXPUyKH4VDAYb/K3dJEkpzXDZdecwhZNseHCtjGk62sErr57TsLMQChOejpfrc/OZ1U+T3kEeg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(366004)(396003)(376002)(39860400002)(346002)(26005)(66556008)(2616005)(44832011)(5660300002)(186003)(83380400001)(6666004)(66946007)(478600001)(86362001)(8936002)(8676002)(2906002)(16576012)(31696002)(31686004)(38100700002)(36756003)(6486002)(53546011)(956004)(316002)(66476007)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZDY5WTV6SHloOVBta3k1L1hHclFmdDlBWUloNnZOMHY0ZmN4RjM0a2o2S0xu?= =?utf-8?B?WVJJMXFVUW94YkdVMmNsTlZ2Qk5GSW1YdXFCM0FHdndTeHhqVzdGN3plcnQ1?= =?utf-8?B?WSt0SjcxUG9ocnNGRXA2Y2V0Q3JSNVhXSDNGRmtsZ201d0dVaU9kdmU4Y0J6?= =?utf-8?B?d3VZaUFObThSVEgzSUhwSjA1Y1QwWnV3N2ZCNm9qOUFsZVZMamNDWjZLOFJH?= =?utf-8?B?bGNGWmVUOHZJRVV5K1FGTVdFZ0syWHNvWXE2S294OEpVQjBWNWx2QTM2S1Bo?= =?utf-8?B?VHR2by9jdEhiZU5zdUMzMjl3a1lNV2xOdW1CMFBzUTVVN2tRRmNsZXlnWmJo?= =?utf-8?B?ZzBqWXRpL0dSeFZSV3h1VE5CMFhieXF5bVJUNW43U2xnaEVabWlvL2JUWUk1?= =?utf-8?B?b3ZKUXVkL1RwNERaMDhOOHNJVFlIV2tvUnUzcGlxYWdiZmxXSlBPZU0wTi9S?= =?utf-8?B?OWU3SWxZQlN4R3l3RVA3bmlHbE5nL0k3TnJoNjlpZko2UG5LVHdCemFWb05n?= =?utf-8?B?dng1QjJwZDlhYzlQeGphZHVneVVaUkRLampOWU5JYTJFekREMjNxU3puUzNT?= =?utf-8?B?bXh1M25ZYlJWUng2NmhIVEJ0TGt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kdmMSsyY0lBVnlYVHBYS3Q0OC9rQ1dvd3ZMQTRRTkNyY3V2NFEw?= =?utf-8?B?Q3JUMXFNdWhZem9Oa1VROGMzVWhwdmpoUloweDFZNVF3WmpvZ2VVS2VxdzZy?= =?utf-8?B?L1BaK082YWdlVlUxRTBDV1pBT2l6SGZQcHNtOVMwcEFqUzVLYzhCeFVndFRq?= =?utf-8?B?ZlVXZHVwM3FrQ1c5VDY0VFplenloSXFSaDRwMHZiaXVaTFRZUGlRUzBFOGdw?= =?utf-8?Q?qwxvVRcSD3T+Y6GnLbJRfIUdD7XgQisPyy+ImD8?= X-MS-Exchange-CrossTenant-Network-Message-Id: bfbc3ec8-da56-444c-6a64-08d97368a146 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2021 08:05:47.0230 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: A77U/1ykMJHkcBzy0f9WJasuV25TtOkcLyzohPAUUWL0GFOaMQldxaMypoCh30AOmHXPxqCz7ow4+P8vEP8yfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB4902 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v4] net/pcap: improve rx statistics 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 Sender: "dev" On 9/9/2021 5:16 AM, Qiming Chen wrote: > In the receiving direction, if alloc mbuf or jumbo process failed, there > is no err_pkts count, which makes it difficult to locate the problem. > Because alloc mbuf failed, the rx_nombuf field is counted. > Please fix './devtools/check-git-log.sh' warnings. > Signed-off-by: Qiming Chen > --- > v2: > Clear coding style issues. > v3: > 1) Send direction does not release mbuf. > 2) Failed to alloc mbuf is counted to the rx_nombuf field. > v4: > Add rx_nombuf field. <...> > @@ -297,8 +298,10 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > break; > > mbuf = rte_pktmbuf_alloc(pcap_q->mb_pool); > - if (unlikely(mbuf == NULL)) > - break; > + if (unlikely(mbuf == NULL)) { > + pcap_q->rx_stat.rx_nombuf++; > + continue; Not sure to update to 'continue' here. I guess both works but if allocating an mbuf failed, keeping continue to the loop may cause more mbuf allocation failure, 'break' may give more time to have mbufs available. Also the patch is related to adding stats, so lets not update the behavior in this patch. > + } > > if (header.caplen <= rte_pktmbuf_tailroom(mbuf)) { > /* pcap packet will fit in the mbuf, can copy it */ > @@ -311,6 +314,7 @@ eth_pcap_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) > mbuf, > packet, > header.caplen) == -1)) { > + pcap_q->rx_stat.rx_nombuf++; This one should update 'err_pkts'.