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 B0B5F43E51; Fri, 12 Apr 2024 12:23:31 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99E8C402A8; Fri, 12 Apr 2024 12:23:31 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2070.outbound.protection.outlook.com [40.107.93.70]) by mails.dpdk.org (Postfix) with ESMTP id 4703A402A2 for ; Fri, 12 Apr 2024 12:23:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kcYUJJRSVY/apmAwlK5Hc7y2YifaUYzmzeOLjjQcIgJy+t5Ut+ux21dMtCLaF2uxUIIVKi+JjkMkFMM2TTpjGY9Zh/CNp8+KveBL4FOPP2xuFXkwozFP2KvCf28JUk/fceytRz71of++Z8uAegBNPZhmB0c5807+VX3/FohLHJ6cHT1jhqFe4cXTI6HJ2h6xWSz3DIaCCUSUcFu19/bOmHBWkT5iAaOr4GwgElpR/M6+FvSVsV/9+OY+/wairzKZULO7XFX0VMSPXY6FDDkrciLK3Y/k9qJNbgQBpfSQBW8C5uBq0IqbXgK5Q0ndl759+bDzC+Q4W+C34sLKtwH0fw== 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=JKfqQ1p7HVyHfGpKLEBboAWa6z03p7SqiISx5baFCGs=; b=cdoX2TxkXOKRhL8SZ8QZ/tvQEdsDmkJhGjKimSTFXF6xl1y+wS7cmVDpQqUrU7e6kWmxCgv+CPpU0vQt3NUO+gfpb2YrlWXGxLlYr5OqPHIJ0ZzSr9budzl1HV3L7HrBwt2vLYxdkYG0g1XI6awxkhWIYtp2e0A5yx6m5/oDyV+J7Egk7NPdC71xc238lXJr9xErCDeuvvBTbRO1EMnMoG+JGGOgNOVkpG+JcnTH1VKEmayPFWPbJgyNwTuTyMvEYQVM6YRthcFptuDj4quMyU3reiDAXdOMPwD3F7940tRKYs9T6PLOJIF6XJhBH8msrMdbN9XyuPXwCJuUttZ4nA== 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=JKfqQ1p7HVyHfGpKLEBboAWa6z03p7SqiISx5baFCGs=; b=ubOC+O70yzOWibhzmMw0iIQ967Na8Qm869s70Ia3No0VOd2rFOmFGvRgesyJeEmcQ53Plpav7aBRGJpRiv6KuTPpZkAFmGgLizBqlbRpHR5/tCeEt5BFTDbaqXYzypL1I9sc5IrrGwlfqrP7e0V+v4JkQRQlmxiltQ3GZGATSeU= 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 CH3PR12MB8849.namprd12.prod.outlook.com (2603:10b6:610:178::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 10:23:25 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::282f:29d3:cac1:cde3%7]) with mapi id 15.20.7409.053; Fri, 12 Apr 2024 10:23:25 +0000 Message-ID: Date: Fri, 12 Apr 2024 11:23:21 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [EXTERNAL] Re: [PATCH v3] net/netvsc: fix number Tx queues > Rx queues To: Alan Elder , Long Li , Andrew Rybchenko Cc: "dev@dpdk.org" , stephen References: 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 aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCKKm/6BQJkdyEEBQkE3meNAAoJEFRTPtCK Km/6UdcP/0/kEp49aIUhkRnQfmKmNVpcBEs4NqceNCWTQlaX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-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0557.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:33b::13) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|CH3PR12MB8849:EE_ X-MS-Office365-Filtering-Correlation-Id: 3fba33e5-a22f-4612-65a2-08dc5ada9659 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6iDj5QEJ3ZXitVtjLiL/u5eNWQ1gyN3jYDUAy12tWbmAyBT3s65MgAYBYytFkl+rk3gaXJYua8iS1Qc+Q+BGGMgkIXqD0i2ioeaNZv80afRdfLFRsJqBioO47MMWk6lzQS6hMhDjod4as9rJt6ctwrzof65Znq7yJKqUw4LvcHw+8HDdueiFEorYjqoGKxyeHPfet4sNKDsxzh1m0ILHgBibcjOKGSM54TFO286HGoB8wYqYGUsdGh1KUICHbs+eA6fU+MbKQFuKWlT4oxYTdQ9+FOYpemX8gCNFy9pga0fJZMAQou6Fnqz22gZIiczrhN5+kqMqHLNXAK5be+OWmTa1lgjJ8CeUNk5KBOm9hME7GFvIj0ME70FSPC0Eapx3BIHqkKsSjlYwYTP92VI+xWNEhvyT5gYFEo/wf9jTW9Z7ZL9M7R6TchQmSrFeeV3IiDM2/cFc8cBaFFQ7Ytj9zA4z2hGJkWihf7TtG3STh2MKbNmyzH0YepyVuU/ZRNAqa0KIKLozDCmfpmk98x+51he+CRwkB/nCkjykPJdjepLIJKRHniasCLeOPW6fjcdJrScsIwAmgXgbNNL83YxK1RA+KrTn8OPhsCRdJGRiYKE= 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)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VllvZ2tndW1xeCtzVXU1ZUREaE5mUVBERE5CUlRBQXRYTm9YQ1FmWERpcWMr?= =?utf-8?B?UUF4YTdlTTZ2b0RNeFJCTE83RVl6YzhST3dBV2p5SitWQSszVUVxTXRjRDkw?= =?utf-8?B?eVdGNFJEUnVXdzEzWHltK2xyeTgrOXlxeHk4UlNlOVZreVVMd25IU3lVSXFG?= =?utf-8?B?QTBjdXF4SmgrNW5QeDZYdURRR1A1c2Y0UFpmV3lPbzJwZzF6ek44Z1pKUXkx?= =?utf-8?B?K0tKbk4raEJHWE1RcW9xRk5HekdqaDNPeERLNGVnWW1pV3FtQytGUU05NXJG?= =?utf-8?B?cEtpTnFwNWRYV05UYnpuVUh1L2RXM0FoczdkaDFqcUpvdW9wMnBnbWsycWNV?= =?utf-8?B?YmNRRmN4cGQ2MGtBWmRER2dNVmw2ZU1ESkZJMWRDK2VvZXhQdFA4WnhMcUVj?= =?utf-8?B?S0IwU25vTzRsdUhQaVhjMi8wZDcwT3QzZFNidGFYblI1RElicUdOU0dpWmZs?= =?utf-8?B?ekFidWpwMXNoU25lUmR3Q2Vydk1NZ3NKTHBncEVra0lkSm1qS2R5NmZlODhn?= =?utf-8?B?M3lRVFAwWkEyUEJGa252K0JpcUJqUWxZOVgxcXI2ZFRhZk9BbUlzUDZmR3NT?= =?utf-8?B?R05GSVNVaERWS2dQNk1OMkordFhoNzM1MlMwMFcrcmozdVlvQk1jdUkzeThm?= =?utf-8?B?dGdWRjB1bERwRXhjN2tyM0tUakxzT3NuQ0xKSmx5QmJmeXRJZkN4K1J4TGJq?= =?utf-8?B?dWhGQUhoS3B0UDFyUEpBb2FGMGpEUi9YWDZpUVlwZUZXSFdDQXpaN2xBaFcv?= =?utf-8?B?aTVRa09LMXFhRnF2ektmSHQ3RlhyZ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b0RVQzFITFdmZnBRdVhzZWc4MVBmWXVoQjZnSnF6c3lsSHhrdTJleldC?= =?utf-8?B?RGtHOVN6ZlFvRFp1Vm9pMzBvV29PZ0RzbUNKWGxTNHhnOVZXRWx4NjhjcjdC?= =?utf-8?B?UytjN1lhU1FSb3FXcWI3VjIvSy9DQlEzdFVrUng0RnNVcUhidDV6ZTJBWEFr?= =?utf-8?B?WjFkWHczN3UrbHRYTEd1VjZ3dUkzZlN1MHViUmg3MVNtSzZ3eDZIaWJidTh5?= =?utf-8?B?b3hveWtpbnY2cDgvSmlzVU9hbit0dTEwbDVLMVdteUk5NHhKTU9GOXhqQU1w?= =?utf-8?B?K3lGNTVySWpGSFk1MWUwK0lzRjFJY0pUWjZJYlRPQUNuaDByUlVqTUpocVd3?= =?utf-8?B?a1VKQUlkaFNYNXZIUmxSUlpyZ1VuSEY1cWR2VGJDT2xDYXczZmhQbkRubWFN?= =?utf-8?Q?I0WS/NVkRT+ppQSNeOMakNoop?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fba33e5-a22f-4612-65a2-08dc5ada9659 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 10:23:25.2647 (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: XgO/tOspEB5+iKfoRvtambPL5zw4fWD5EfCMl0kMndCQiAPKr8Vv/zQDwDj9TexQ X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8849 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 4/11/2024 9:45 PM, Alan Elder wrote: >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Thursday, April 11, 2024 7:38 AM >> To: Alan Elder ; Long Li ; >> Andrew Rybchenko >> Cc: dev@dpdk.org; stephen >> Subject: [EXTERNAL] Re: [PATCH v3] net/netvsc: fix number Tx queues > Rx >> queues >> >> On 3/19/2024 2:16 PM, Alan Elder wrote: >>> The previous code allowed the number of Tx queues to be set higher >>> than the number of Rx queues. If a packet was sent on a Tx queue with >>> index >>>> = number Rx queues there was a segfault. >>> This commit fixes the issue by creating an Rx queue for every Tx queue >>> meaning that an event buffer is allocated to handle receiving Tx >>> completion messages. >>> >>> mbuf pool and Rx ring are not allocated for these additional Rx queues >>> and RSS configuration ensures that no packets are received on them. >>> >>> Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") >>> Cc: sthemmin@microsoft.com >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Alan Elder >>> >> >> Hi Alan, >> >> What is the root cause of the crash, is it in driver scope or application? > > Hi Ferruh, > > The root cause of the crash was in the driver - a packet received on a Tx queue that had no corresponding Rx queue would cause the dev->data->rx_queues[] array to be accessed past the length of the array. > > https://github.com/DPDK/dpdk/blob/main/drivers/net/netvsc/hn_rxtx.c#L1071 > > Why there is an access to Rx queue when processing Tx queue? A backtrace of the crash can help to understand the issue, can you please include this in commit log, plus some explanation why crash happens? Thanks, ferruh