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 0F97043AD9 for ; Thu, 8 Feb 2024 12:35:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0972240A6D; Thu, 8 Feb 2024 12:35:37 +0100 (CET) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2066.outbound.protection.outlook.com [40.107.92.66]) by mails.dpdk.org (Postfix) with ESMTP id 69ECC4064E; Thu, 8 Feb 2024 12:35:34 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WiLMGaMk3Im6DzvLnYDgu3UiZvjmfFxUWrhFTOpgUbymH+/0Jk9UgU5ooJ0Dpv60edVURlmBFH6T2VyupSK97Iza5s5qddLDipYmnA3juOqNoACPyQbQwD3qhbFLC27+WsGtIlPJ8ggZBWdQfXRFZUVQL3D6i4qYqacktzWkID2WTNCXggT6VVlODKNhJfdxZt57XQdFC03CDTrGLEG4d4lju4Q4KwsFzLqiV+oLw/IJ/TnQrPV0hljU+7Zdh+rSYVGdHXeHDCjHWJ9mR1jG1+P+FuhZY+4Uo9cTYq97STsjaeL+7P57Ft3dhMQKOtgUgKoaR6U2cjpOaHluwt76Sg== 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=b6yasdde+TFwub/0alafQw5iOmWsnUxnOoMa8TPgGJU=; b=AEP9MaFV4h+ethQHyGt2ZvrwktG16MqVIUGaQ41TiMyq+xSHdxcfmhlBGNbFr3AgDHY+fWxTziJW+fO3DKWW7nNH0Lo6kQgzATqQiAgXTT3zle4slmzsxyXZUe/gNPRMNGxfXZUN5K3wBVb7EmUL8DyRmM3DVURiH+nwGIvXs/dZPnRBmKc9IjdKTDH9moH3YB2Bq7TQixaJrVNf0fwnwVqSrZhKMFS+Z2WC48sPR8pU+Pg4Zg7IOOh0j9i1sfqs3GM0G9yyDH5n2RBT/lhF3KW/ZmSMqM1B3tCgtVat1eEGjgNp+W5/I8pzIZRKc3qWn5SBGNcoLJv1LyDG4gzzOg== 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=b6yasdde+TFwub/0alafQw5iOmWsnUxnOoMa8TPgGJU=; b=3J2GnxWrbRhcrNrAP6DygoojIWuOFSx0dvdkV+qAZtxrTtyCi17oV02a5gdkFSODAkjuHdulFBjxNB4TpPWA3YxHuS1Psejg9idfLGl1UVDbF0owyq1xxqDc/SU16V6tmCqZq/FVhu/XvExRFOzSPpkb2oW0WIlAztadzGZxxOg= 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 SJ0PR12MB5504.namprd12.prod.outlook.com (2603:10b6:a03:3ad::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.17; Thu, 8 Feb 2024 11:35:32 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7292.009; Thu, 8 Feb 2024 11:35:32 +0000 Message-ID: <8dc49c18-6f7c-4a13-80b5-6306bf16601e@amd.com> Date: Thu, 8 Feb 2024 11:35:27 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] app/testpmd: use Tx preparation in txonly engine Content-Language: en-US To: Konstantin Ananyev , Kaiwen Deng , "dev@dpdk.org" Cc: "stable@dpdk.org" , "qiming.yang@intel.com" , "yidingx.zhou@intel.com" , Aman Singh , Yuying Zhang , David Marchand References: <20240103012912.4334-1-kaiwenx.deng@intel.com> <20240111052555.35930-1-kaiwenx.deng@intel.com> <38baef9c-103a-4be4-8546-e9ea35abc46f@amd.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC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Mh1CLUHXF1GlofpGbe1lj4KUJVse5g3qwV7i9VrseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB8PR03CA0009.eurprd03.prod.outlook.com (2603:10a6:10:be::22) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|SJ0PR12MB5504:EE_ X-MS-Office365-Filtering-Correlation-Id: d42cc097-f84a-413f-f5ef-08dc289a0edf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jYBG+6T5xTA0Q4CzSyPmzT2sYsKLXEe2vYQrutkgahRnzj6qEWYt0jYnhDGVritqXuMSLnhQTCVzYoG8sg6EyiCo7EIkpbsH6WAlelZB7Ytk1/7MuYxX5MN/gPoReUJa+9DMKPz8jiQRqkAE3urZ3l9me1ORUVxIg9UkuHV723m4D2zd0F3Mm3JzEbOshgpkYt8kw4WFy2I717m9Qc4iKDrgVqcwBzyeD/pV28GnSRK+qhuO/+RbjKAc39Q32UI8FZpCp3xG0XI0K2kxA2BZfJkdw6piuDOZdG0/uRmv1uMBe0rTaM3L2xOUmeaHSIy5EYoQTTNI0UeEpQvte03TNf07R00K/JH1Hnm0QXEbToWs3wynvYKmL4EsHeO8VGkm8bPLbsI5TScDnxqArfD6U7SqdH+QzA9Z+YMIcaqkhZwRAofUIrbrs3SWcD1SnzA1zK90s5uqrY5CHT+3oKvbujJBwiCmzRmCv+SpeC98RkMxV01rJd7x3iCzE6Y0fNZGFU0CVtgqiBhNPAPM/7L0bbHjmnj0kAuYRde28tuzv4enj+3T702GSFgEGFiRG7ma 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:(13230031)(376002)(346002)(39860400002)(136003)(396003)(366004)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(83380400001)(66556008)(8676002)(66946007)(316002)(54906003)(66476007)(110136005)(4326008)(8936002)(5660300002)(44832011)(41300700001)(6666004)(31696002)(6506007)(36756003)(38100700002)(2906002)(53546011)(86362001)(478600001)(6512007)(26005)(6486002)(2616005)(31686004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VVV1UFhLWm52YXBtcEpZaThnd1pIdzQvRTczWTlkaHVwbmtobFlOWURjSWJw?= =?utf-8?B?WUk5RkdKdkJUNEQzMnhZaVlNK21nREQvblRUZDJNSG9Ha0dEY09DbnRnK1ZT?= =?utf-8?B?aWpxY3JVclZDVmNGYzc3amNwRmFJbTlUMm5GYThwMUNPZHlWbmR5QlppZ05G?= =?utf-8?B?NlBlNHdGbUNpNk5ockx6cXlGL3A1S1RURmF2dlYwdGYxYktoV2V6SlZRZVk0?= =?utf-8?B?anFzRjdEVFdSR0N0ZzVBT1pEYkhXbEJkYnBsNTVWNVNLckt4blkrUEhPUTI2?= =?utf-8?B?bVR5bW8wVzVicWNSSCt6c25YcU9xMW5OMm9KTFU1WDl2dWptZkg0b1paVTI1?= =?utf-8?B?YkFOMVNQL3F1eXgvd3grNkN5dnB4UGtZVlpFcXR5WHkvcWQ0VDdKcjVFYzhT?= =?utf-8?B?RGFDTlJPcWtLRVFLS2RNT244NzcwMHdpZWNPUTJxNzVSTkZCOG9KNVl6bXNX?= =?utf-8?B?WnVmRDVwdXpCNmc3ZXFCUklFaS9aSVQyd1c3Smo3Z241V0tDdGpMdWt2ZGRu?= =?utf-8?B?K2wyei9V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?= =?utf-8?B?cStsUnBEc21MbkQ3S0JDcjh4dHBtQi9GbkZOUFF0MWx6UTdsb29VRm1YWDRJ?= =?utf-8?B?a2dtQUxUemY2Qkx1QkRjMzlRNDFXNGg4am1SdXVRU2l5VFZBeDB2QW1LSkta?= =?utf-8?B?c052a1VKQWxFQ2hpR25KSHlnMjRIK05FZUQrdzM4QzVJWXZ0WHlLNTcrSmJE?= =?utf-8?B?TnZoRmtNODBVL0k5S3U4cm1tZGw3MHBDWVk4LzFZRG1GR1J1M3NweEVzYmVW?= =?utf-8?B?M0x2QlZTMWxZVXFGQ0FyczNpN1dUNWNxZWhkNlVVRWlLcmVmdWRFV0w1Z2l3?= =?utf-8?B?bkxFUkJqNEFkQ25Td0crWlRjUm1RbitLellBV01Qa2IzTVpoaFNubzEwSFJC?= =?utf-8?B?K0tNN0ZOUC9Td0xwdWhMWUhUM0lCdlRXeWxFVDNudG5xS3d5N3piUyswQU1W?= =?utf-8?B?Y1dtYXI3emZISFhMTGY0UVVnTVdXbEE1MUl3SVJJUk5YUm9xc2tFL09LVXBa?= =?utf-8?B?R1VMNlcyM1FRTmpVRXdTWVpITEV0UWpRRUJLRzNOcVM3dFpuZjBnTnJ2Vzl6?= =?utf-8?B?YmxNZkYwdkVWcm5aOTM2QWlNUDUzS3N5dG5lQnljZFozSG9tV0pQblkwMDhq?= =?utf-8?B?R0wrUUVGRGt3c3A0Qm9pYzd2ZkVKQXhPekltTGlqWnNIaFJlcTF3dTdkSXR0?= =?utf-8?Q?/yXt4toiB7vLlPcdd27o1mQ0I?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: d42cc097-f84a-413f-f5ef-08dc289a0edf X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2024 11:35:32.1900 (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: +CRTjlq7jKeQwwYjABmSgIa99VWLJ+bmA+CZbKtkCCgjcNyUx5oGOBTCBxQ+vTZh X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5504 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 2/8/2024 10:50 AM, Konstantin Ananyev wrote: > > >> On 1/11/2024 5:25 AM, Kaiwen Deng wrote: >>> Txonly forwarding engine does not call the Tx preparation API >>> before transmitting packets. This may cause some problems. >>> >>> TSO breaks when MSS spans more than 8 data fragments. Those >>> packets will be dropped by Tx preparation API, but it will cause >>> MDD event if txonly forwarding engine does not call the Tx preparation >>> API before transmitting packets. >>> >> >> txonly is used commonly, adding Tx prepare for a specific case may >> impact performance for users. >> >> What happens when driver throws MDD (Malicious Driver Detection) event, >> can't it be ignored? As you are already OK to drop the packet, can >> device be configured to drop these packages? >> >> >> Or as Jerin suggested adding a new forwarding engine is a solution, but >> that will create code duplication, I prefer to not have it if this can >> be handled in device level. > > Actually I am agree with the author of the patch - when TX offloads and/or multisegs are enabled, > user supposed to invoke eth_tx_prepare(). > Not doing that seems like a bug to me. > If it still works for some cases, that's a lucky coincidence, but not the expected behavior. > fair enough > About performance - first we can check is that really a drop. > Also as I remember most drivers set it to non-NULL value, only when some TX offloads were > enabled by the user on that port, so hopefully for simple case (one segment, no tx offloads) it > should be negligible. > +1 to measure the impact, that helps to decide > Again, we can add manual check in testpmd tx-only code to decide do we need a TX prepare > to be called or not. > What is the condition to call Tx prepare, is it only required when Tx offload are enabled? @Kaiwen can you please give some details on the problematic case, "MSS spans more than 8 data fragments", and how to produce it?