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 89658A0C47; Wed, 27 Oct 2021 19:31:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 148E14068C; Wed, 27 Oct 2021 19:31:35 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 8EEAC4003F for ; Wed, 27 Oct 2021 19:31:33 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10150"; a="228971736" X-IronPort-AV: E=Sophos;i="5.87,187,1631602800"; d="scan'208";a="228971736" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2021 10:31:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,187,1631602800"; d="scan'208";a="665078560" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga005.jf.intel.com with ESMTP; 27 Oct 2021 10:31:29 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 27 Oct 2021 10:31:28 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 27 Oct 2021 10:31:28 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 27 Oct 2021 10:31:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=moJstblO6BmgenLcHO5y7Orlo+8Ex6i0L9eCLLPtVLr7CNvJOTe/Cd/l/t+sYj+87NKKHX1oGuieEH3Vhbguub3vQ3LW2eplLcVc7Fs4QxrY2bKpw7qZJYzf7xQsYHn0gabeCZQFPPSc+8uO7GhfxRqt3CHu6i8WnrDf5ilRIYyFKTn+v+t/mRzl9vUWesTKsC65t4AyP8mslpmqMbZAC7ISSmwr/7yv+gVLMz26v8UCx/JYR3LXhov7bK78gSVdM7HswMfauHBISI6SUzzUno8sqCgulatSkrLzhBRQoJG2I88qxokhyaOg3kMHitEhHJyw6Wfm9Qmw9JJCWWx1QA== 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=1wWPl300fxDsO0E5fJF42xdzQYiaUPtYCNK5fmeZ7nU=; b=J+ykwN1+vecRZxwhtJq96c79Wu6G10/RPotFPW5VrWvnZjh8Hr5QpnvlKvwWv2s4XbcPLcl5AXi9wh5K9ilc0ZOgNLgC6m+B11F1uHVzL+MYagx97d7i6JDfbERSS/CqeNCE/M4eQ2nWN6om20T/VTSdokckZhEX7E1WAZrcfPHex/sYkz1+Z+GJj4OHHkPfl8GQaMhpwXKlpFeQzGWY/CtZtlgZD/Um5ZKliC0BjZTVBhowttWBE/ZhSmomHDUosAhEE29Bh+RrVk4Id0zqfotB05fxBVRKx1yJannCNCpUAJMlJy/UDHrLAwtgiBF/nO3cwh6uMhVnjWoTwDPGxQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1wWPl300fxDsO0E5fJF42xdzQYiaUPtYCNK5fmeZ7nU=; b=clXOH4OWIlelD8hDqy5dxIhzDcg8CLqk8jwasvQ3Bvq2ksg5HvRxvrYzgPgjSo1zYFhzcG1hLfe5ziInIWEztEwt7JMhcDaF06HontwgbSpe84jEaue4/gSwoIhKhieoX/7135lFkv6Y/XaijWqPyibYNl16plZAKAJaKVoOopE= Authentication-Results: monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by PH0PR11MB5095.namprd11.prod.outlook.com (2603:10b6:510:3b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Wed, 27 Oct 2021 17:31:27 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::bd7d:29be:3342:632c%6]) with mapi id 15.20.4628.020; Wed, 27 Oct 2021 17:31:27 +0000 Message-ID: <4e4a035b-7c73-176e-1121-98a1bddc1473@intel.com> Date: Wed, 27 Oct 2021 18:31:20 +0100 Content-Language: en-US To: Thomas Monjalon , David Marchand CC: "dev@dpdk.org" , "Ananyev, Konstantin" , "andrew.rybchenko@oktetlabs.ru" , "bingz@nvidia.com" , "olivier.matz@6wind.com" References: <20211026145851.21944-1-david.marchand@redhat.com> <20211027120144.20485-1-david.marchand@redhat.com> <2831386.a2vW2WujdY@thomas> From: Ferruh Yigit X-User: ferruhy In-Reply-To: <2831386.a2vW2WujdY@thomas> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DU2PR04CA0285.eurprd04.prod.outlook.com (2603:10a6:10:28c::20) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 Received: from [192.168.0.206] (37.228.236.146) by DU2PR04CA0285.eurprd04.prod.outlook.com (2603:10a6:10:28c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4628.16 via Frontend Transport; Wed, 27 Oct 2021 17:31:25 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a979ee84-228a-4fdf-c37a-08d9996f9a9f X-MS-TrafficTypeDiagnostic: PH0PR11MB5095: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Cq4WLY1aMvIeaa601hxw8tC7JUAAj8IOYiIoLgLi55Ao+SWdUejNmfeACf74mOUF4M2NiCUbq2J8p2mNIbYNBRM8X8KV+thLv+RDHk/BRHJPVdsnXXTuWt4GeexWIGCLqHA/B7D08P6PjFAbT8kFm6gwurB4evan/L9r4bRH8qyZwrsvCNZIwLJ7CCxGJ6YzxAlGO2462QrqEfN9yuLK68t62UcUrEKL2gsEPWCbcWNqm0FMx43EWs1IFoanl4yEycw1ScZIrGLS+tfBapSmgHTivVthh3tFBkCV7SRxW0n+V1Ak2TrNj4vOsAWpSN/qqjbd2XtLE6P8XAQeynpmV8/zIZLVGmk1cCs3VfW6l8TUEpZ865LpkY5Jqmo5iqwVMiMB04wZEFVmpIWUs7Jiq6diYFosCEMLG2NMLq4Ki1Hi+qMLviBPXQjsdiibKrr++ywFsqLQgbdS9lBH8/3KD35ZQilqO3UXoFod2nLH5+Kh0AWmlLrtOGFAGS3kn+L+YKeTtpxmMRmRg9EE3aEwonttDCKX2WVZkVHX94qT38jYQ2yGPF7F8XbVfyKNayNvSb6vk0T/ZJHvIAIcWW/hjDwQ/W93RK0YJKGS1onkV+XfdnCge9o1d1mn16qdRB0iz2PyKg8+AxspqRWl4O1+GcG55P0LpvzgwV/BWhoNwX9uQJ7Dih312F76DwuwY3M+A8rJFmWHhsRmwfDURLajKA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(26005)(186003)(110136005)(956004)(82960400001)(54906003)(31696002)(16576012)(316002)(8936002)(83380400001)(53546011)(8676002)(4326008)(36756003)(2616005)(31686004)(508600001)(6666004)(38100700002)(66556008)(66476007)(44832011)(66946007)(86362001)(6486002)(5660300002)(2906002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VXJFK1pFRVZSNnFOa0wxcmJaTXZhTVoxQ0theE1mak9YdTBZMDkxM1VjK1RY?= =?utf-8?B?ditnODhHdWNlUmVmeVE0b2ZUQ1I5WXdIMG05Z2V5MlUrVVFxaTF4TXNnZ1N2?= =?utf-8?B?T1VDMmdWV0l5STk3NTM1SHh1T3loUUhWTjVkMjJuejZrbU5ZMzRxTjNNYkl5?= =?utf-8?B?SjFDYi9nbEpCdUpRU1VOUkM1dXY5a0hJbUdQV0syUk9wUVlsb0tYVEZJZE9o?= =?utf-8?B?RW93SEY1eWVacUhib2lEVVNnK1MrOUM2NnVMS1hoV2xxRzJ5aTFXa1RJckVI?= =?utf-8?B?Z05idndFTWo2Z3creUc2OFNrQXFpYW01WlhpakU2Yko1cTJISERudHFZcHJH?= =?utf-8?B?WWl5VEl3RmlzeWIrMjFkbFM1TTZKMm5lM05XTHRwMUs0MWlxQzFsMmxmc3pW?= =?utf-8?B?VEFIZGUwMUlVSitIeXh4ZzE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ee84-228a-4fdf-c37a-08d9996f9a9f X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2021 17:31:26.9672 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wwkIPxDUr6Zfs2PU4h0ZfKnNbIL3CfF1aLheYB7i0BTsdYr1VAYECwf0jUTlY4iRo/NbysXa3xWFyikxPOyh3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5095 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] ethdev: warn once for buggy applications 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 Sender: "dev" On 10/27/2021 1:46 PM, Thomas Monjalon wrote: >>> Warning continuously is a pain when developping or if a unit test >>> is/gets broken. >>> >>> It could also be a problem if application behaves badly only in some >>> corner cases and a DoS results of those logs being continuously displayed. >>> >>> Let's warn once per port and per rx/tx. >>> >>> Getting such a log is scary, but let's make it more eye catching by >>> dumping a backtrace with it. >>> >>> Tested by introducing a bug in testpmd: >>> static int >>> eth_dev_start_mp(uint16_t port_id) >>> { >>> - if (is_proc_primary()) >>> + if (!is_proc_primary()) >>> return rte_eth_dev_start(port_id); >>> >>> return 0; >>> >>> Then, running a basic null test: >>> $ ./devtools/test-null.sh >>> ... >>> Start automatic packet forwarding >>> io packet forwarding - ports=2 - cores=1 - streams=2 - NUMA support >>> enabled, MP allocation mode: native >>> Logical Core 1 (socket 0) forwards packets on 2 streams: >>> RX P=0/Q=0 (socket 0) -> TX P=1/Q=0 (socket 0) peer=02:00:00:00:00:01 >>> RX P=1/Q=0 (socket 0) -> TX P=0/Q=0 (socket 0) peer=02:00:00:00:00:00 >>> >>> lcore 0 called rx_pkt_burst for not ready port 0 >>> 8: [build/app/dpdk-testpmd() [0x59e839]] >>> 7: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7ff481b69555]] >>> 6: [build/app/dpdk-testpmd(main+0x54b) [0x662d24]] >>> 5: [build/app/dpdk-testpmd(start_packet_forwarding+0x263) [0x65e795]] >>> 4: [build/app/dpdk-testpmd() [0x65e1be]] >>> 3: [build/app/dpdk-testpmd() [0x65a996]] >>> 2: [build/app/dpdk-testpmd() [0xa6cbc7]] >>> 1: [build/app/dpdk-testpmd(rte_dump_stack+0x27) [0xaee796]] >>> lcore 0 called rx_pkt_burst for not ready port 1 >>> 8: [build/app/dpdk-testpmd() [0x59e839]] >>> 7: [/lib64/libc.so.6(__libc_start_main+0xf5) [0x7ff481b69555]] >>> 6: [build/app/dpdk-testpmd(main+0x54b) [0x662d24]] >>> 5: [build/app/dpdk-testpmd(start_packet_forwarding+0x263) [0x65e795]] >>> 4: [build/app/dpdk-testpmd() [0x65e1be]] >>> 3: [build/app/dpdk-testpmd() [0x65a996]] >>> 2: [build/app/dpdk-testpmd() [0xa6cbc7]] >>> 1: [build/app/dpdk-testpmd(rte_dump_stack+0x27) [0xaee796]] >>> io packet forwarding packets/burst=32 >>> nb forwarding cores=1 - nb forwarding ports=2 >>> port 0: RX queue number: 1 Tx queue number: 1 >>> Rx offloads=0x0 Tx offloads=0x0 >>> >>> Fixes: c87d435a4d79 ("ethdev: copy fast-path API into separate structure") >>> >>> Signed-off-by: David Marchand >>> --- >>> Changes since v1: >>> - removed diff banner in commitlog, >>> - renamed vars, >>> - removed unneeded cast on anonymous struct in initialisation construct, >>> - added check on queue pointer, >>> >>> --- >> >> Acked-by: Konstantin Ananyev >> Tested-by: Konstantin Ananyev > > Acked-by: Thomas Monjalon > > Applied to dpdk-next-net/main, thanks.