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 03DCE4317F; Mon, 16 Oct 2023 16:59:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B026402CB; Mon, 16 Oct 2023 16:59:33 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id CB7A340269 for ; Mon, 16 Oct 2023 16:59:32 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id CA61132009D2; Mon, 16 Oct 2023 10:59:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Mon, 16 Oct 2023 10:59:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1697468368; x=1697554768; bh=bXA7cyEhtffWq8AmxBCrvFBVeXbP6BlTjc3 u8wJJ58o=; b=LLVfmM88MMPqQx9J1zlbXRXRdo7C+eDUWz1ia3HSjNBcEXxu6Qq bN4Sa5kds+wTlNdDEzjIBEwQPdcujhMldY9+uDLj+hRc/f+5tHSOiF4y3G57MO23 dvGhbMvse/1cZu/pGhCoN4OoV4pTFQlIAgwHsFYP8h3+F5SCNcTG/uWy0JinDx9e kWOKMUhKwuvBys28seR9p2nK7TGnIDVL0V1XoXdk9p69rWC4dgZTDcZ2T0pRn8pn Y3CMLBiegc2+Cos1NW+7bohWC6kAjQ0VqUpp6qR2dJyGAgP0OJMVE0nIvOKhwD+4 GqjTex3L1kD9brotm77YI0Qdu02A5PA1lKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1697468368; x=1697554768; bh=bXA7cyEhtffWq8AmxBCrvFBVeXbP6BlTjc3 u8wJJ58o=; b=lxX2PKVy0e9DYB+Ry9qlV8fooZWMZwAjBHJHBEn3pWblzWcudXm QWwIo1aWC+kAJcdp0SIwKPb4xXvjK6oOITS0R8WscxTJ/4XCUk+7pNpHdL+tKdnJ lN98znTYI18zq8Ez2ugAAIZgQfZrGMUjezKkiXbARM3pXX3UnoO4o9KhjF4XiZ/o DCgysXytJp71Gv7FEAqWJYUMk3z1ouFPI4cbfXxyz7WubHro9xHZ8hr4JAHcZGMN sY1IWNvGN1SdHcRVq+FoICibvJOvFQQiPalPve9WwP0hgoN3JeXjc3UNYblTrGUp npdzgSshYy1FXtQ4eBpkGfrVFy5FPJKqtVw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrjedtgdektdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 16 Oct 2023 10:59:25 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: Andrew Rybchenko , dev@dpdk.org, David Marchand , Jie Hai , Song Jiale , Yuan Peng , Raslan Darawsheh , Qiming Yang , Ivan Malov , Huisong Li Subject: Re: [PATCH v2] ethdev: clarify device queue state after start and stop Date: Mon, 16 Oct 2023 16:59:23 +0200 Message-ID: <3675930.RUnXabflUD@thomas> In-Reply-To: <20231013155723.2631644-1-ferruh.yigit@amd.com> References: <20230928205930.2619353-1-ferruh.yigit@amd.com> <20231013155723.2631644-1-ferruh.yigit@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 13/10/2023 17:57, Ferruh Yigit: > Drivers start/stop device queues on port start/stop, but not all drivers > update queue state accordingly. > > This becomes more visible if a specific queue stopped explicitly and > port stopped/started later, in this case although all queues are > started, the state of that specific queue is stopped and it is > misleading. > > Misrepresentation of queue state became a defect with commit [1] that > does forwarding decision based on queue state and commit [2] that gets > up to date queue state from ethdev/device before forwarding. > > [1] > commit 3c4426db54fc ("app/testpmd: do not poll stopped queues") > > [2] > commit 5028f207a4fa ("app/testpmd: fix secondary process packet forwarding") > > This patch documents that status of all queues of a device should be > `RTE_ETH_QUEUE_STATE_STOPPED` after port stop and their status should > be`RTE_ETH_QUEUE_STATE_STARTED` after port start. It is so basic that it may look stupid :) Yes we still have to enforce such basic things, thank you for this work. > +REGISTER_TEST_COMMAND(ethdev_api, test_ethdev_api); Maybe add a comment here to explain it is not part of basic suites, waiting for all drivers being compliant. > + * All device queues (except form deferred start queues) status should be > + * `RTE_ETH_QUEUE_STATE_STARTED` after start. > + * > * On success, all basic functions exported by the Ethernet API (link status, > * receive/transmit, and so on) can be invoked. > * > @@ -2828,6 +2831,8 @@ int rte_eth_dev_start(uint16_t port_id); > * Stop an Ethernet device. The device can be restarted with a call to > * rte_eth_dev_start() > * > + * All device queues status should be `RTE_ETH_QUEUE_STATE_STOPPED` after stop. > + * Acked-by: Thomas Monjalon