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 1C545A0C47; Wed, 27 Oct 2021 14:46:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 081C0407FF; Wed, 27 Oct 2021 14:46:27 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id CE3D54068C for ; Wed, 27 Oct 2021 14:46:25 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 1A07C5C01F2; Wed, 27 Oct 2021 08:46:25 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 27 Oct 2021 08:46:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= TKnr/kjqR2DnMH4EtBfGabItDFOZUruHj20tE2205dY=; b=FhGeBsull9kLX1PR avLtBoUm67PtreJ+ZF4nPRAR2vmrQyE9KE8yPkAGBXVDCudtpUlVPA/Aw3ojYRfj ljcPmK9/FmBz4iHdnLvOQ+uhgqRbG+8GiJkOOeANU5cXORyja4uTtVeHrb/wsVpt jq/lh6KDb9eykROdymYWOwAioG7ag000JRyUI1Fmxw6J/P8sHx1TKN3PH9MUZg99 puagEoZzvv8StCHW5lQSXUxafoEwSspE1Nr3ONt9jTMV/yELihcf6cs9HLXYAq1l mXPgzLUyEXRGQ9taBSk3DJMbl52q1tWUH41rHyu3mzTk/E0nDEgLQ5FJqPYvsirw F1ttxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=TKnr/kjqR2DnMH4EtBfGabItDFOZUruHj20tE2205 dY=; b=gg4U4mgjiCz686WCJdLV0Jcq0Nzh1qwSUxQEbbfJieLJzbUv5baj9ku7C Tbt0jewp7OxrrwPwhWxy4ASb/aJvLpMJE/bIsHd5cslyHqYVVnOcD8k7qkm4GAuj e6pEQZGl7v1Vx2CrMM9FOD3M8Yb+x6EwdvAvUkRBJnB2u6LOO3Nmvkn/a7vKhN2F F0DnshKXRw75OgExU5zad5nay51DzEr4aj8gpMKsgARQpl4Tw0zhBd0J6zGtQja2 YDDcyHhot9SWCH1U/Qm54D6ZJDTIDguqLOZLhhy4VtJOIqx1e4xIKMpObSYEvLXd szldB05lSDoear4YrHGehBhNKZukw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdegtddghedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepudeggfdvfeduffdtfeeglefghfeukefgfffhueejtdetuedtjeeu ieeivdffgeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 27 Oct 2021 08:46:23 -0400 (EDT) From: Thomas Monjalon To: David Marchand Cc: "dev@dpdk.org" , "Ananyev, Konstantin" , "Yigit, Ferruh" , "andrew.rybchenko@oktetlabs.ru" , "bingz@nvidia.com" , "olivier.matz@6wind.com" Date: Wed, 27 Oct 2021 14:46:20 +0200 Message-ID: <2831386.a2vW2WujdY@thomas> In-Reply-To: References: <20211026145851.21944-1-david.marchand@redhat.com> <20211027120144.20485-1-david.marchand@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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" > > 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