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 4E4D245AFB; Thu, 10 Oct 2024 04:00:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E2B5B4025C; Thu, 10 Oct 2024 04:00:49 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2046.outbound.protection.outlook.com [40.107.243.46]) by mails.dpdk.org (Postfix) with ESMTP id EB7FB40156; Thu, 10 Oct 2024 04:00:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ciycNqDUQlCUOB0ei7XGYcDquQPkvn4fWxPVUOd+Krhw9rbqazVNtrAYNaZkkQw87e3UoK9TN6NDbnd5SH0GBmFIl+6nywOFsem8UaVPQmR6cFUO1px8Vyfcu6RzJ3bdks0xQcS/MoovnJ4z126wkOLfKud7/1jLeCGvQyGEgiTTnXWPz2RB1GMMBAcXoqR9L6qEHM7hRPdditRyPc7I47sExpAXybsxvxcbJEDPYg9T8nC/FcEaFPCFGUQ2qONIttAxRbAvB+HzjSg7ZuaE4zSVydkAE055fedVJssA9KS4WJjUCr9duvr5Sli5xxCcAqOKmYcNgWFf+eBimU+O+A== 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=zXI/sWHa6+M9J6yxIu0Wv32DYf9kuZe66Xh+lMkGWcE=; b=JWQHXMehl2dtwDrhX1uKI6Ngl46/tU67o8Z0zwtc6SozQuU8ql3U/6ftmYppvSgd+0v7KKoShatvE4BV7Wlha1H/uTNnc0IrnDP6SqtvuXM8FE5mABLQqmvI3t4yg9UOJos7M9MHHUUYdzt8AondIaqlMcUwPXdr4OfGUP20N6QvnLLSQAsuxzO2+9kdQXMRGnk1jGJXNhrUPd2fxpMez6GVDiJLTKW7dTlcxrFtqMNUMKddi1Naz2qVufE15AiHeOPRruBzyzI1D7rO3MFhVUsVpMQ7XAnAyp0Fxeskt0HuRo1DyXAZZAbMV680phCVmgd7OUb46++Dzz5y97wnmw== 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=zXI/sWHa6+M9J6yxIu0Wv32DYf9kuZe66Xh+lMkGWcE=; b=04yjueqGqGi1JS5usJc+5lBv3r7LQ8okhvNhEFFvYEKjWi4uTxms0jp5E7xaBLFdsPAc9m85k15H7esa4uVte57pU8JrMGoR78Wl83vlD/1F9gVJJNz4UNyc1ORxABc/FkCHdiOAcdUlNxlk2Y7NAaAifLFaNxyYQxLQQd9JBaY= 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 SJ0PR12MB6927.namprd12.prod.outlook.com (2603:10b6:a03:483::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Thu, 10 Oct 2024 02:00:44 +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.8026.020; Thu, 10 Oct 2024 02:00:44 +0000 Message-ID: Date: Thu, 10 Oct 2024 03:00:32 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] net/memif: fix buffer overflow in zero copy Rx To: Mihai Brodschi , Jakub Grajciar Cc: dev@dpdk.org, stable@dpdk.org References: <8bf5e505-191b-46ea-8b90-0ed4fc15d306@broadcom.com> <75a9c5d9-da21-4e78-b637-84f152daae30@broadcom.com> <2d6fba2f-f522-4d0a-abbb-38d938f61af2@broadcom.com> <39430e7d-161e-40c3-bbb0-a7cd5de0b7cf@broadcom.com> Content-Language: en-US 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 aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULC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rseA8c4VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <39430e7d-161e-40c3-bbb0-a7cd5de0b7cf@broadcom.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SG2P153CA0046.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c6::15) To SJ2PR12MB8830.namprd12.prod.outlook.com (2603:10b6:a03:4d0::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ2PR12MB8830:EE_|SJ0PR12MB6927:EE_ X-MS-Office365-Filtering-Correlation-Id: c8d01a28-99e7-4bb2-e07a-08dce8cf598a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?SWZnVWV5V2FUb1V6d2d2dTJUVWZ1QXUwNjV4aVA0amU1OFBsU2JLSFdlQXNZ?= =?utf-8?B?Z282SVdCNjNLbVFTaVNzb1lJaWpHbEtKRUlwcGY1ZnlkcnIyRjNvTnI4OXBk?= =?utf-8?B?c0ZOL2V2RWp1cCtGL1pGenlJQUVLV2h3VnM1ZnVPODJEOHE1bytGdnZPMitG?= =?utf-8?B?TzJxT0Y0TWMzekV2M1Y3VVFpalVGZjZ4R3huZEkvY1ZDUXRrejl2UkQyeGpt?= =?utf-8?B?UGt5NGhrNytUcTVjaUlBQ2xMNlBkcUJDdUdxVlJ0akRDeVJvSnh0TFMzZVhi?= =?utf-8?B?WWtDOWdOWU8rbXZBWDZuRTF3d0FLQ2hOR3VpdklrdFNSUXJuaHdYOU5HKytO?= =?utf-8?B?a25sSmlidmJlRytlejBibUI3VWR4S3ZxYklzT1d6MnF5eDVWdmpQcjRVeEFZ?= =?utf-8?B?b21VV1R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?utf-8?B?cTRiWGw4Q24zQ2hPQ2lhRVBEVzJvRjJuOEV1ODljWHZ0WGdNSG44YTRqK3Iw?= =?utf-8?B?Y1gwTGVobzJtRFVpT3lZT0pQVWZHKzk0bEYzL0VOVnAxcVFxcC9rYVo4Y2E1?= =?utf-8?B?MEdaamRRRGVoazVsRUtteElhbTJ6dmZHWUp5VjdoK2dOaUVYSDJSV280YXpT?= =?utf-8?B?dlVLd3EvczYyZVdMdjhzOE12UW8xSmhGWTRHYWMyOEszaHFpY2wrdXowcTM2?= =?utf-8?B?MDlEZVZzTDZSY3ZyQTJnek9weFN2QTk5WDJSUGZyditERDRNbjB1cTFsZGdE?= =?utf-8?B?b3RPR0puVnVGSDNFTllLZFZYa2VydTdtSkthdUMxTlpxQkRsMk1rT3Z0UHcx?= =?utf-8?B?bzRYckJaa3AwUUxzRDNjMTFlajdsZ1RMWjRuV3N6UTNIZUJIaUVqVVlnPT0=?= 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)(376014)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?V2pnOUdWWC9aeDhnTERRTmRqZjdQTHBTMWJHLysvYS9USWd5NGdVSnkvVlBs?= =?utf-8?B?L2p2LzNldm90dDh1RkVMUi93eUFiMG1CVElwYUVITVZEVzBEK1AydVp4NFJH?= =?utf-8?B?VS9kTzJ5bDhheGtoZHRySE9raGhhVGdkOFlWRmUzeWVZWTF0K3lydHdzNTVS?= =?utf-8?B?czEyM1NSTy9qWUpaU0VvRy83Y3RBUGttMjM5YWowZDB6blN2eGdVL3NJUHc5?= =?utf-8?B?TjVwemFGNkI4MHNlUXRUUTdjR3VyMythR3VjQTZYcUdsUUk2NDBVVlhaTjJy?= =?utf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3FCUUdJQTY2Ukhm?= =?utf-8?Q?NBroAF2SLCjnxKgg8JvxbRxas?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c8d01a28-99e7-4bb2-e07a-08dce8cf598a X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8830.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2024 02:00:44.0520 (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: 3ea9EGCOgSa0FsEsmZxs4A9+dgdwkXoAgVLtDbRbpathwMqw3y09PZnfGxdUU5eL X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6927 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 8/31/2024 2:38 PM, Mihai Brodschi wrote: > Hi Ferruh, > > Apologies for the late response. > I've run some performance tests for the two proposed solutions. > In the tables below, the rte_memcpy results correspond to this patch. > The 2xpktmbuf_alloc results correspond to the other proposed solution. > > bash commands: > server# ./dpdk-testpmd --vdev=net_memif0,id=1,role=server,bsize=1024,rsize=8 --single -l --file=test1 -- --nb-cores --txq --rxq --burst -i > client# ./dpdk-testpmd --vdev=net_memif0,id=1,role=client,bsize=1024,rsize=8,zero-copy=yes --single -l --file=test2 -- --nb-cores --txq --rxq --burst -i > > testpmd commands: > client: > testpmd> start > server: > testpmd> start tx_first > > > CPU: AMD EPYC 7713P > RAM: DDR4-3200 > OS: Debian 12 > DPDK: 22.11.1 > SERVER_CORES=72,8,9,10,11 > CLIENT_CORES=76,12,13,14,15 > > Results: > ================================================================== > | | 1 CORE | 2 CORES | 4 CORES | > ================================================================== > | unpatched burst=32 | 9.95 Gbps | 19.24 Gbps | 36.4 Gbps | > ------------------------------------------------------------------ > | 2xpktmbuf_alloc burst=32 | 9.86 Gbps | 18.88 Gbps | 36.6 Gbps | > ------------------------------------------------------------------ > | 2xpktmbuf_alloc burst=31 | 9.17 Gbps | 18.69 Gbps | 35.1 Gbps | > ------------------------------------------------------------------ > | rte_memcpy burst=32 | 9.54 Gbps | 19.10 Gbps | 36.6 Gbps | > ------------------------------------------------------------------ > | rte_memcpy burst=31 | 9.39 Gbps | 18.53 Gbps | 35.5 Gbps | > ================================================================== > > > CPU: Intel Core i7-14700HX > RAM: DDR5-5600 > OS: Ubuntu 24.04.1 > DPDK: 23.11.1 > SERVER_CORES=0,1,3,5,7 > CLIENT_CORES=8,9,11,13,15 > > Results: > ================================================================== > | | 1 CORE | 2 CORES | 4 CORES | > ================================================================== > | unpatched burst=32 | 15.52 Gbps | 27.35 Gbps | 46.8 Gbps | > ------------------------------------------------------------------ > | 2xpktmbuf_alloc burst=32 | 15.49 Gbps | 27.68 Gbps | 46.4 Gbps | > ------------------------------------------------------------------ > | 2xpktmbuf_alloc burst=31 | 14.98 Gbps | 26.75 Gbps | 45.2 Gbps | > ------------------------------------------------------------------ > | rte_memcpy burst=32 | 15.99 Gbps | 28.44 Gbps | 49.3 Gbps | > ------------------------------------------------------------------ > | rte_memcpy burst=31 | 14.85 Gbps | 27.32 Gbps | 46.3 Gbps | > ================================================================== > Hi Mihai, Thank you for the extensive testing. Problematic case is "burst=31", between '2xpktmbuf_alloc' & 'rte_memcpy' method, there is small difference and not one of them consistently better than other. In this case I will proceed with current patch. > > On 19/07/2024 12:03, Ferruh Yigit wrote: >> On 7/8/2024 12:45 PM, Ferruh Yigit wrote: >>> On 7/8/2024 4:39 AM, Mihai Brodschi wrote: >>>> >>>> >>>> On 07/07/2024 21:46, Mihai Brodschi wrote: >>>>> >>>>> >>>>> On 07/07/2024 18:18, Mihai Brodschi wrote: >>>>>> >>>>>> >>>>>> On 07/07/2024 17:05, Ferruh Yigit wrote: >>>>>>> >>>>>>> My expectation is numbers should be like following: >>>>>>> >>>>>>> Initially: >>>>>>> size = 256 >>>>>>> head = 0 >>>>>>> tail = 0 >>>>>>> >>>>>>> In first refill: >>>>>>> n_slots = 256 >>>>>>> head = 256 >>>>>>> tail = 0 >>>>>>> >>>>>>> Subsequent run that 32 slots used: >>>>>>> head = 256 >>>>>>> tail = 32 >>>>>>> n_slots = 32 >>>>>>> rte_pktmbuf_alloc_bulk(mq, buf[head & mask], n_slots); >>>>>>> head & mask = 0 >>>>>>> // So it fills first 32 elements of buffer, which is inbound >>>>>>> >>>>>>> This will continue as above, combination of only gap filled and head >>>>>>> masked with 'mask' provides the wrapping required. >>>>>> >>>>>> If I understand correctly, this works only if eth_memif_rx_zc always processes >>>>>> a number of packets which is a power of 2, so that the ring's head always wraps >>>>>> around at the end of a refill loop, never in the middle of it. >>>>>> Is there any reason this should be the case? >>>>>> Maybe the tests don't trigger the crash because this condition holds true for them? >>>>> >>>>> Here's how to reproduce the crash on DPDK stable 23.11.1, using testpmd: >>>>> >>>>> Server: >>>>> # ./dpdk-testpmd --vdev=net_memif0,id=1,role=server,bsize=1024,rsize=8 --single-file-segments -l2,3 --file-prefix test1 -- -i >>>>> >>>>> Client: >>>>> # ./dpdk-testpmd --vdev=net_memif0,id=1,role=client,bsize=1024,rsize=8,zero-copy=yes --single-file-segments -l4,5 --file-prefix test2 -- -i >>>>> testpmd> start >>>>> >>>>> Server: >>>>> testpmd> start tx_first >>>>> testpmt> set burst 15 >>>>> >>>>> At this point, the client crashes with a segmentation fault. >>>>> Before the burst is set to 15, its default value is 32. >>>>> If the receiver processes packets in bursts of size 2^N, the crash does not occur. >>>>> Setting the burst size to any power of 2 works, anything else crashes. >>>>> After applying this patch, the crashes are completely gone. >>>> >>>> Sorry, this might not crash with a segmentation fault. To confirm the mempool is >>>> corrupted, please compile DPDK with debug=true and the c_args -DRTE_LIBRTE_MEMPOOL_DEBUG. >>>> You should see the client panic when changing the burst size to not be a power of 2. >>>> This also works on the latest main branch. >>>> >>> >>> Hi Mihai, >>> >>> Right, if the buffer size is not multiple of burst size, issue is valid. >>> And as there is a requirement to have buffer size power of two, burst >>> should have the same. >>> I assume this issue is not caught before because default burst size is 32. >>> >>> Can you please share some performance impact of the change, with two >>> possible solutions we discussed above? >>> >>> Other option is to add this as a limitation to the memif zero copy, but >>> this won't be good for usability. >>> >>> We can decide based on performance numbers. >>> >>> >> >> Hi Jakup, >> >> Do you have any comment on this? >> >> I think we should either document this as limitation of the driver, or >> fix it, and if so need to decide the fix. >> > >