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 73392A0547; Thu, 9 Sep 2021 12:20:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F003940041; Thu, 9 Sep 2021 12:20:28 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id A80964003E for ; Thu, 9 Sep 2021 12:20:26 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10101"; a="207977201" X-IronPort-AV: E=Sophos;i="5.85,279,1624345200"; d="scan'208";a="207977201" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 03:20:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,279,1624345200"; d="scan'208";a="548481919" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga002.fm.intel.com with ESMTP; 09 Sep 2021 03:20:25 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx604.amr.corp.intel.com (10.18.126.84) 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 03:20:24 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx611.amr.corp.intel.com (10.18.126.91) 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 03:20:24 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx608.amr.corp.intel.com (10.18.126.88) 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 03:20:24 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (192.55.55.68) 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 03:20:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lwRe/H9aYHyMBGw3McieJyO6ShPZwLUTAR1O7iNHSxhxL2GJGx2pavuwjkEbXbpTvsWMzjp8hPknP34qh72NK2MHBhqoZtjVvrzwaqK2GQBlS3PrBpcn9iHeMbTE8L31x5r2HAdkPO/mnj1KZMhd9W/bvZCGmUQ+3La/2iCbr2U7V0aZBUVAH7CT038/laJAh9jlG3VPMRXjiYK2WC7CvIGh31+/m97apCT6JmMxEraKtaYBXMNssLG9U0hqZ7LuluVwrTSeeC+zY3czCV2JsMf1NK7+H6vjAf2VPwO//1TbQj/Ef5iB4dUv9ADfTADoK8r+eP1oDEy35rIIDX7u3w== 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=LuP2APWruzLvp6LPEZsDef62ESSkxn0ZadUkROvDJO4=; b=V9ErtuP5Y5pmepPXMs6WPVKK6qewJ/sk3vEcaYE567V5JH+c672XrIVG8h4GSTEY+UXKBTJjl0Zzj/pZiKEz7ai5NMSao0VdGSX8NRKbznffu/EFi1ql5lscOMfQe8cl1gH2WGIqYPRFxIRhQ5zZ8yrgik1ci4/dISpfkHcHW56kNUFCHmGfu1uWDFBwNhhOYVymNY8YHpkl8rbsmFiHPKh5/dVDyI1bih7ftI2lGSXFk9F6UUSvgSv04X4i3dzHhRZjeITYoWl0ef/CHD1sLU6Sz/TFx8jVoUw54VlZvXcUoBG8/z1QgyB0o75/VpH7hqDGfgfIzyVCNWW70NzQtw== 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=LuP2APWruzLvp6LPEZsDef62ESSkxn0ZadUkROvDJO4=; b=hkKqzur86EkND5oC0K+2z/iS9gR7KrhPDJulfXS9Qdy21DT1Iqfv2E/JoqP1iXX8C1TZnCXTGJFDhRLcl0SJKRN7fu+uOOEk9FpkkRLWIfFd4bEWYKqEof7Yow8+FtfAXIl+6oX6j9hrHNYx4kVBzuTzV1vehNfWgXAhmR+Oc6U= 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 PH0PR11MB5127.namprd11.prod.outlook.com (2603:10b6:510:3c::17) 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 10:20:23 +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 10:20:23 +0000 To: Stephen Hemminger , Qiming Chen CC: References: <20210826032354.1146-1-chenqiming_huawei@163.com> <20210909024531.10009-1-chenqiming_huawei@163.com> <20210908202959.2099eb1e@hermes.local> From: Ferruh Yigit X-User: ferruhy Message-ID: Date: Thu, 9 Sep 2021 11:20:18 +0100 In-Reply-To: <20210908202959.2099eb1e@hermes.local> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB3PR06CA0031.eurprd06.prod.outlook.com (2603:10a6:8:1::44) 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 DB3PR06CA0031.eurprd06.prod.outlook.com (2603:10a6:8:1::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Thu, 9 Sep 2021 10:20:22 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e87c41c4-86a8-441c-742a-08d9737b6f3a X-MS-TrafficTypeDiagnostic: PH0PR11MB5127: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: op1LBS15XPi9L1STBqkI0DjtORIE8tFnKYafd7f5oimFBgzIc0BYZ+16O0IyVq+gdOaXSXAKsK0puYO6ZscP2DEkz//yZwtn5/Jt8b/xKd3b5fL8tQnpjPfcQkz14pTk/oZDAfLD88J4dqOVP5DvJZ1Kl6XimIY5AhshcTmzPWWtpG8ec5ZXvfvGJ3/O4eBAh+8qYevEAsVbrM1V0+oeNKo8LU8nHKMbd2XPazZnv/ip8Ep8td1YBtGSO7cIC0+uhZRY1Y2hywyjlIlHzu1Ko9zSbjQ9pYtQrZiKz+HPn5VyK0Cb636AZjiYUfl/X3w/5zhuJ6WOod6F4ooYLVj3ss0bshUShX9jFsLDwsyyAlMTegBiSk1YZJUibJ9pYAnKeTdomr/9UuXw3c9dUJm2HnHZ+5gKJKeOhln5U7Ym6wlkGw1Mz7nIzwElhPyoB7upAV58Ydp0X9cNckMI0vdd2pODZ2AOTUi61FE5TKz/w6Zxo0DdySevNRymS1+a/9+5q6jI25EFq3o7TANWS/+yMbBVhEnOM6fIV25aI4zH3Z/j0x9h+0g7e7kQclmD/xfxFnWSJF6cGSaEpTNE29hl+eOVyAZc3ySw4oAj3dvJZxHk+JQmB5UpPNyCUygiUDzOsvac+erFuquK2Z6LSSZUI5xcw6oeTxnhldPfGux+EGmsdEdExUp7xWCSZ270V/KGYRkLeERRO0uXizYiSp4uqw== 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)(39860400002)(376002)(396003)(346002)(366004)(136003)(6666004)(8676002)(53546011)(36756003)(956004)(66946007)(2616005)(31696002)(44832011)(86362001)(5660300002)(478600001)(8936002)(31686004)(316002)(110136005)(16576012)(2906002)(26005)(66556008)(6486002)(66476007)(186003)(38100700002)(83380400001)(4326008)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?d1dJbjhUMGo3MVZoN0Evck1COWV4VlpLLzJpZWI3aE1VUDVtMWg1TmZPZnJK?= =?utf-8?B?WnhUMElkSGlXTEorVzA2TENMZ3pKNy9FcEVFV3dXWklTdGc2NFhsRzNhWTZo?= =?utf-8?B?cnpaRzg0UTB1N2RWNFVnY1JWb0lkcEFPcmhoWFd5a2c4NFZzQTN5cUVWVjZW?= =?utf-8?B?L3RYS01wWVhyN1p4YW0zSUNFdXRTQkJad0JlLzFDZzROeW0rcUszbElGOHVH?= =?utf-8?B?VGh4eDY4aE9VaXV4ajlhVDVOakpudGxLMkFtRzUyRjBFQlU5NENKVTNIZ2RB?= =?utf-8?B?OFlEUTFKdGFvRDZobUxnTlFxMTVQSHI2cjlOc1d4Y0NxWGtLd3dYajBXeTJI?= =?utf-8?B?enlySjZmaU4rVWd1cDRsTjFjMi84M1BnalZIVVZ6N3dTQy9GUW01aDlKK2Za?= =?utf-8?B?TVNYTGRSQ3RkOWlUUjBycnNvTml1T2Ru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JeWUvNlBGVnVKdDlwRlY4MDd2UnJOSU04OTFScmx2?= =?utf-8?B?YVF3SzZ0NStod24zOXlBR21ZdzFucElpYXY1RzJvSUxiMU5WdVNpVERRN1Ju?= =?utf-8?B?QTdnYmFqbFNyKzlFbWlYcDgwbWV1SkQvL1NobkxtWCtCdEdCbm5CcThRNHBs?= =?utf-8?B?YmFxT1c2SE1oaW5iRUluM0V4RkZZellKdGs0ak5GQXNFR0lqWUxLUlN2Y3Q5?= =?utf-8?B?d1ZZZk1BVVRzcTROU1Q0RlZFY3pjME4zTlRNdm9iVzl4MEhyUFhkRDFwalQ1?= =?utf-8?B?alY0Z3FWcEhrVDJRNnBiRi9FNkI5V3FVMnA2REF3amZiTEtJSkxUYkNzL3A4?= =?utf-8?B?aC9kRTZjNDVYTDRRZEZqNURCSDR5YytwcGFTMlB5ZU9iTkIvbXBJMm1EeG9M?= =?utf-8?Q?lFJ2DC/8SGMak9XCdFIhE48IU2ik94+jzM1NID5?= X-MS-Exchange-CrossTenant-Network-Message-Id: e87c41c4-86a8-441c-742a-08d9737b6f3a X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2021 10:20:23.5193 (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: AWiwrBIS9SBFMD52jO3L+B0sCEl7cyV/AuDGpfFoZUS6lFfKHgYqEdT1KaFibZtAdcxc2jRSEhm0Iv5kghu7Iw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5127 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] 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 4:29 AM, Stephen Hemminger wrote: > On Thu, 9 Sep 2021 10:45:31 +0800 > 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. >> >> 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. > > Looks good, the field "err_pkts" is a confusing name for me. > > On Tx it means packets dropped because pcap_sendpacket() returned error. > Looking inside libpcap that means send() failed. On Linux this is > a send on a PF_PACKET socket and it appears to be a blocking socket(). > So these errors are not transient conditions. > > On Rx it means packets dropped because out of mbufs. > In later versions of the pathc, out of mbufs updates the 'rx_nombuf' value, and pcap Rx API error updates the 'err_pkts'. > Perhaps a comment or renaming the field would helped. >