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 DC2B445C4F; Fri, 1 Nov 2024 22:55:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BBC9A402CC; Fri, 1 Nov 2024 22:55:29 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2062.outbound.protection.outlook.com [40.107.237.62]) by mails.dpdk.org (Postfix) with ESMTP id F19C34029A for ; Fri, 1 Nov 2024 22:55:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=kSjxlcy3JBPv0jJpM7wCTp1WtH8R+XswCuwUUTSttLQaHOLB/DB4y/TrvbojE9QPY6kb0UeNWOzYTa2CDFddQ1SjE3BFT37NOUaagfqMnDWWCllK/B4PI/39DcrJm8jHTYG8vmMRREdUFFdBPdK8Wf9idm7M5GTCuq50wDmS5p4pWMEk7wNq2a05xMCEffs6biclGB+UY7PGmJ1S7B+TczNJE5J3NmZYUc2OLcE3dxalWgUDCBk8EXrmvr2VYPufT87vOLrDb1YjO3WAdui9kMSeW4C5dANMRKhK51lWo+YS2g+J4zYnLGedtV2P+mdXK9hAjuwWrKCd/4vf+Ygc/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=fBRHlgrOUEpbpUuJlb7J/yD9hK5qQMlMjIQZs5O+QDE=; b=PTUgPY3azdYBslMschRf5+89w1DUqKT9nXzH6/T2TpYJvkUUrAAaowb3iKYwgz/kY6Tm6WDOEZEWsE2cdNvjn+0CC2r8rg9sOsINLmukRyNTCpQioYY2/1f6QKlCXRkSqC3Or0WjRUtOVQaVrT7lI+/6jyUgbgeVQ1kSrMPFX+bAW7UTo6X5elTzFnWTB9pOXTnNLCGYeA1dKCiHl9XPSqD0tgLeQijV1B0Ahf841sXqui/FcJlcdE49jLXpsagglsnC47jGoiPHGrh1BV9iTMxHxk6BE451c2oJydoEbgL/oCzTwqcggdbvBd2l5lXapzCfYmdhugecLCUmS3yrbw== 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=fBRHlgrOUEpbpUuJlb7J/yD9hK5qQMlMjIQZs5O+QDE=; b=JYuQ1Abv4IY+yw1T0imZXGqb/k9eJEno2/m9nJqNyQ4YqKkGvi52ZHJK0dt8hqgb9y131YJjMWxKo5bsCF0ihakCJ5MnIqbklXjf41RExJTZhkIIItidzG0BFWyKypvwq+wXt/u+b94h33HGuL2c15hVVQxeFvNrQLoRh9Ri2AQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) by MW4PR12MB7437.namprd12.prod.outlook.com (2603:10b6:303:21a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.20; Fri, 1 Nov 2024 21:55:26 +0000 Received: from SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055]) by SJ2PR12MB8830.namprd12.prod.outlook.com ([fe80::c3eb:df02:eaa9:2055%4]) with mapi id 15.20.8093.024; Fri, 1 Nov 2024 21:55:26 +0000 Message-ID: Date: Fri, 1 Nov 2024 21:55:20 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 06/13] net/txgbe: check length of Tx packets To: Stephen Hemminger Cc: Jiawen Wu , dev@dpdk.org References: <20241023064836.2017879-1-jiawenwu@trustnetic.com> <20241028023147.60157-1-jiawenwu@trustnetic.com> <20241028023147.60157-7-jiawenwu@trustnetic.com> <402cfb9a-d84a-4bb6-919d-68c7b3ccc0f3@amd.com> <20241031195632.1336a276@hermes.local> Content-Language: en-US From: Ferruh Yigit In-Reply-To: <20241031195632.1336a276@hermes.local> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0573.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:276::6) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|MW4PR12MB7437:EE_ X-MS-Office365-Filtering-Correlation-Id: b243f362-e917-4ab3-c460-08dcfabfe4a6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?NzFXZFU3OEZBYm9YT0x5dWY4d3lSY1Rydy9KZ3V3K1UvUDk4dDg0TTRFVnRO?= =?utf-8?B?MGFnTXoxNHRWbmdHYzIvWXpHc3czR05XVkxHcFhkTHBNQkd1YmtJVEhCY1Ey?= =?utf-8?B?R1UzWktPelNwbFF2bEZENVJGUFhsZ3hCbXZ5ZlVTakxoMFVEWk8zWlljMmZi?= =?utf-8?B?cUFVZGJaeHcrUytDL2xHbHkwZVhPOGZuVGVGNS9Pblk4MnpBcW55UndWR2o0?= =?utf-8?B?SFcxc2M0T3RGV2ZNQk9FcHlqU00rRGZPZFB2eUpndk1DVFJXbmxuVk1ibVMz?= =?utf-8?B?YktjYWUzNFkzN0FsbVRxQ3pGMW1rMHMzVk9sTVlZcXZocytr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M1ZzdGlqbGVyNW4xcW9vSjJzMXZv?= =?utf-8?B?ejluenlqTk40cmFKZzNMSjFyc2VubVM2ODZJK1hXSjlteTRWSktsK05IbThs?= =?utf-8?B?VDE3ckpDN3VPdG5TR21TSzN4QnFyTVFLUVlPV04zTFJzV0FKRXpXYTNyaEYr?= =?utf-8?B?Mlprdlh4VWF1SVhiVi84R3oyQlFSNW4yZTFWdEo5ZW9sWXZ0T3JJN2pua2J1?= =?utf-8?B?cll6V2FuS0UwczcyQ3NnMFNrUE9HTUluNjR4K1NEU2NmcnlTZ1FwdkY5MnBJ?= =?utf-8?B?K2ZoTmMxNUhGQTFVTmxmSEx5aUtsYUltQ0pyUVgyTHZyell3NGhjS0hWM3Nm?= =?utf-8?B?OVArMTJDZm4zWmFtOFZ0SExNNWxwZzZOaGFVd3RQS25wMUc0a2puYkFtM0dY?= =?utf-8?B?ejhSeFdDUys3b2JJWWx3dm1FOGF6WGNzVUZuS0JIemp5dzhuRXpnT2NzdHkr?= =?utf-8?B?MTNCWXNpdmlTbEh1VC9KcmNRTTJDdk1LVkZWRnhrNkNZN0szcm9BYnI4NXRk?= =?utf-8?Q?i88BZ8VKcudPpDFn8AD/urN3pQNbDbbZttrZL80?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ2PR12MB8830.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(366016)(376014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dVFNRGlUZm9tSEg2SDd3cHA5cGg2NzMwR1NoeTVyZ2JCcmJyMm0vYXptaU91?= =?utf-8?B?MkMyVVpQZk5PUkNyOGc3TWt0M2lMbkdWcS92eFAzeFdQTUp4OERXVUdnS1RR?= =?utf-8?B?MWVPWTA4akhvYWpOaFppNHZ5SFpPd0VLOCtsM0pwMWpyT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6b1doaGpLY3dYNzVsbi9qRFdEcitmeWtQcTBQYjA0?= =?utf-8?B?SWI4WU0vbDh3cVhCdk54b0FXNHRnUUlnTUFmOUk0cHlDOERUUkwzNTNnSFB6?= =?utf-8?B?KytBa3dWazFnUXFMQnZvckoxZzhFYnQvcWY1NHNNbzlIQXBCc3ZFaWRIdlgx?= =?utf-8?Q?11rZXqrpznycIlSf+PswjIlfs?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: b243f362-e917-4ab3-c460-08dcfabfe4a6 X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 21:55:26.2414 (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: bEequ91wivmijV0gql3O486ulIEO6w4JngYC2YpKNrotRnAg49up7LH/pDTXhNY9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7437 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 11/1/2024 2:56 AM, Stephen Hemminger wrote: > On Fri, 1 Nov 2024 01:22:47 +0000 > Ferruh Yigit wrote: > >> Hi Jiawen, >> >> Above are generic checks, we may add this function to ethdev driver >> header (ethdev_driver.h) so that any PMD can use it, what do you think? > > This is in the fastpath, and additional checks should not be added there. > Or at least put them under RTE_ETHDEV_DEBUG. > It is in the datapath, and ideally there shouldn't be error checks in datapath. But if HW does not check for errors and doesn't recover from error conditions, driver may prefer to get the hit and do the checks. Not for all drivers, but for the drivers that intentionally wants do the check, I thought having a common helper function helps but I can see it can create confusion. @Jiawen, please continue as it is in next version, I mean have the checks function in the driver itself.