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 9BAB942C10; Fri, 2 Jun 2023 14:48:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0B0D642D0C; Fri, 2 Jun 2023 14:48:14 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2051.outbound.protection.outlook.com [40.107.92.51]) by mails.dpdk.org (Postfix) with ESMTP id E5FCF40ED8 for ; Fri, 2 Jun 2023 14:48:11 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c4l9wphQo+bxcRuU3GBFlB/jntMOFmQXLQaUlN5Y8c5P8irgweUmxJPD+xqtHUHWpzC7TTuawwOFosDMSZs7/8LEctIhefokbgrQRtIXyniSNtzkY/IB2UtvhYwU2pzgAduRcZhlVN5w6TzGXHhTrjzPMiMXR04xicqEd/u+kc/+bvIA12ELotho9c3PTXG3pQlIrKkjCPiaiSSo1UqW33SyYnLz53IAMWJHNyFI3ht6LEH0/OsTKyZbVlg2Z1n5ES1Ke9uED6i3DpurESsTo3CvNBwoIMCFCzrIiz3AdUeaiJR4NWws2Tfx7zm2KCfdu8SvwztUUV9d/BhyhnBnDQ== 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=G5Er1EnaCeSrx+nHtmpEPXE6/z/2sNHGG/KIU1A3Yjw=; b=VzXYtjf0dBtHTV7F0SC4eSovCmsriEpFvg5xrp/5h8Jn5zDpxr8aDOY92OqHJQJ+8E3SlKl+4JnZzF6PDrw5kP4tOyXWzi/OHULIK9f15Vy/jmx5zLb8Bx8j+bFjP7s70GSK3kx+/ecTSiVbTyMPW+2MV19W/C6oQy5ygik2EKQ7kSdHszaX41H8sNQUEjlrOJBG++hUBujUBzYi/4G/vqI2qyopI3XU13hgOdVGu7EGxv2T0T+c4YY4QoSuBVPdIBk27lnwX2Zo/5S7dgkAZ4dodzBxEJduRHAHrh0jcI7s6asxP+6sLMUCVYybSGgKWAFIDyaR37Vnt8B12euHfQ== 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=G5Er1EnaCeSrx+nHtmpEPXE6/z/2sNHGG/KIU1A3Yjw=; b=0/SmL49R898pmJDD6c4d1X4Cd6lqTgpkv3Omfp3DuRxpzZyzuuaqpU0IO2nBDD7inAtwclJCR86colqf/0LguLJPSkW1tKryXhgOoqNpcaROLVbAADEmV1Ef/oafTAng1WDW4RV81IOeNdrB2nzCs7Coua+uTwARdbLaygp9WsU= 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 MW4PR12MB7309.namprd12.prod.outlook.com (2603:10b6:303:22f::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.26; Fri, 2 Jun 2023 12:48:10 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a%4]) with mapi id 15.20.6433.022; Fri, 2 Jun 2023 12:48:10 +0000 Message-ID: <73a257fa-22c6-6395-0c3d-eb157512b284@amd.com> Date: Fri, 2 Jun 2023 13:47:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Subject: Re: [PATCH v4 2/2] app/testpmd: fix segment fault with invalid queue ID Content-Language: en-US To: Dengdui Huang , dev@dpdk.org Cc: stephen@networkplumber.org, thomas@monjalon.net, aman.deep.singh@intel.com, yuying.zhang@intel.com, andrew.rybchenko@oktetlabs.ru, anatoly.burakov@intel.com, lihuisong@huawei.com, liuyonglong@huawei.com, liudongdong3@huawei.com References: <20230516110021.1801443-1-huangdengdui@huawei.com> <20230602075211.3628165-1-huangdengdui@huawei.com> <20230602075211.3628165-3-huangdengdui@huawei.com> From: Ferruh Yigit In-Reply-To: <20230602075211.3628165-3-huangdengdui@huawei.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0615.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:314::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|MW4PR12MB7309:EE_ X-MS-Office365-Filtering-Correlation-Id: 9da29bfd-d64e-4be6-c5d2-08db63679e5d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /vUdC3y4pRGZiEUikCnBEfiBP9DP5tHSTk2aC8XkgvaOyVkpmpQMzYkq0r92AXbUuT6r1zbf0oo2JON8IrxDoUVyG0RpfZd8+ZoCJI+LnPliAGxzmL96eazny5sUmCv4Zg5RRXk8gDcq4n6elYSlHZzO2/tMS5wVukDwwsAs/TjgjpvNO92hWOFG7q9QEIsowUnnjWHYAcOA/xeSV3e1auAzefbm533AiMLOazOymXXK1aNVQd9pPHgx7x9ce/8PnmT3SFQERmN6kKoyF4Nxzpxbcg5vMv2HO6sfGxdjXfDwxkyX5AVIq2I8SHH3c35royw/fBm6xFvOy6XsSv8bB/5IV+JEJ+Tg9FfJ/8I8a1ZhVWA2Ks8FewNapiQCrQKEn8fVJq2NbXWrwIicQjFXch7YCvfTaTd+OSHybwk5bb4vC/9qaYbPq8XeGeQ8l129BtwAjEceUCpN1utbeZa4qH58XKXX4UCVaFOmG7KpUu5LPG/Eibsxm1Re//7Q/5/V50sZHz9eYRuv2HjqehkQGQ383+s7+vSY8pClfbMyhdn7rV0/mAKLT0JC1IGQCZKYmJhQ5m0VFL49GGy+a5i0fFj+ELjp66WjRX5ZpMWWkX2kZv6lL9xB2/It80NFUuVLhVX+SovRCGsRJES+nm8mRw== 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:(13230028)(4636009)(39860400002)(366004)(396003)(136003)(346002)(376002)(451199021)(6506007)(53546011)(26005)(186003)(6512007)(6666004)(6486002)(2616005)(41300700001)(316002)(44832011)(2906002)(5660300002)(4744005)(8936002)(7416002)(8676002)(478600001)(4326008)(66556008)(66946007)(66476007)(36756003)(86362001)(31696002)(38100700002)(31686004)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OElONlZpNWNzU1lxNHRSTi85QndHSlFockJpZE4yUms4RTVmT0RrQmpvSjlJ?= =?utf-8?B?Tmcvc0NoQi9TeDF1Z0pZWlRKd0Z0aFozS3F6aU9ob2ZpQ0hVVTJjMU8xQzIv?= =?utf-8?B?RlJDdWY4MVNSWUkza3pkcnJ2S2psQlVralBEZzZjVmVidFBkTE9IejZmZ1Vs?= =?utf-8?B?YXd5ZDJGejROd2JSR0k2SGlkR2ZkY1pHRTlmdFRmRGJlSi95cnpjNWl0Sk5M?= =?utf-8?B?WUFMRkNrVD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B?R0wzdkNkanE5azFTZVRzSUsveVRnanVHUURUM3hmT2YyR0FLMkI1blliTDR4?= =?utf-8?Q?lxTXqVs7Rg3mRWancOtdYA8+A?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9da29bfd-d64e-4be6-c5d2-08db63679e5d X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2023 12:48:09.4690 (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: 3CAzvRUq+n6i0H+97tWOO6tg/Qo1Y2osZGCuDtBWLkfv3RjyWvjnx9lYk6KBq2Kj X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB7309 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 6/2/2023 8:52 AM, Dengdui Huang wrote: > When input queue ID is invalid, it will lead to > Segmentation fault, like: > > dpdk-testpmd -a 0000:01:00.0 -- -i > testpmd> show port 0 txq/rxq 99 desc 0 status > Segmentation fault > > dpdk-testpmd -a 0000:01:00.0 -- -i > testpmd> show port 0 rxq 99 desc used count > Segmentation fault > > This patch fixes it. > > Fixes: fae9aa717d6c ("app/testpmd: support checking descriptor status") > Fixes: 3f9acb5c83bb ("ethdev: avoid non-dataplane checks in Rx queue count") > Cc: stable@dpdk.org > > Signed-off-by: Dengdui Huang > Acked-by: Ferruh Yigit