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 84525A0540; Tue, 24 May 2022 17:59:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6C79C400EF; Tue, 24 May 2022 17:59:37 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id BA265400D6 for ; Tue, 24 May 2022 17:59:36 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 174073200996; Tue, 24 May 2022 11:59:34 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 24 May 2022 11:59:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding: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=fm1; t=1653407973; x= 1653494373; bh=4vXrQABLSAc8JNNRjSibYcvGciQQWOeSA3xCt1iejJs=; b=r IotGFZzJ9N1MKN1ATrPYE/CRlSkNTH3eAG7fR6FwdoipTYqzYjvHa1J7X2uSGw8z swhei9R8e/vm4fNbzVbVKHcBDsMxzdFu5SEpNj/0MeV3KTOSAK6YoxbdoShjTwNf rOOst+hTgzPARxHHbPI3YyCc0gSMSNG05kAZ4X3ec1Nw0gHioiMc4C9dqzG8Q4ZP rPj/9YUMuMt1yXaHo/4gZGA5YdOyTwmwpPuyJkKXQWtLnOLlCoZMWs6mgfi/Y4Z0 p9mW5xcjf7zbisNSCmXsyA6ioIFSYiAE0Qnjx/p5dfQFRBmKuRN8Qd8iRVgRw4dK UlHvk/ok4gvLYReAaGHXg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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=fm1; t=1653407973; x= 1653494373; bh=4vXrQABLSAc8JNNRjSibYcvGciQQWOeSA3xCt1iejJs=; b=W pFlVfMhfZEJyrbHSmV2l8mB3z5UcCn5GCyEle+0osPIKZnnmdGcKiSZOg+MXazxt mdVTSBbvHFxRRIOvGPnjQv0ZaNYQ8GexSQwIwz8tKQdsg2dlaUVqrMmN7g/mAx4M PBw7WFf8xg7JYzzwJ+DXpsRFiJS6vHumUNyjASaxzjnb1QuarLnStgpz5FBS6mMX 1VprWoCShUtPjWVvt+dDPXsZubpKxMAoELT7/t9PeIjkZDvQ0kfWdK3BwTF3XI8x 58bbwTRzoosZ+/T65Mq9xPGxIB/gk4i/CrZ6zqfogH6HUaHG4nDsO7XTBGQ91/9d vCnW3npuER+j2IVKjYUtA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrjeefgdeliecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 24 May 2022 11:59:30 -0400 (EDT) From: Thomas Monjalon To: Spike Du Cc: matan@nvidia.com, viacheslavo@nvidia.com, orika@nvidia.com, dev@dpdk.org, rasland@nvidia.com, stephen@networkplumber.org, Morten =?ISO-8859-1?Q?Br=F8rup?= , andrew.rybchenko@oktetlabs.ru, ferruh.yigit@amd.com, david.marchand@redhat.com Subject: Re: [PATCH v3 0/7] introduce per-queue limit watermark and host shaper Date: Tue, 24 May 2022 17:59:23 +0200 Message-ID: <6057836.17fYzF0512@thomas> In-Reply-To: <20220524152041.737154-1-spiked@nvidia.com> References: <20220522055900.417282-1-spiked@nvidia.com> <20220524152041.737154-1-spiked@nvidia.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 +Cc people involved in previous versions 24/05/2022 17:20, Spike Du: > LWM(limit watermark) is per RX queue attribute, when RX queue fullness reach the LWM limit, HW sends an event to dpdk application. > Host shaper can configure shaper rate and lwm-triggered for a host port. > The shaper limits the rate of traffic from host port to wire port. > If lwm-triggered is enabled, a 100Mbps shaper is enabled automatically when one of the host port's Rx queues receives LWM event. > > These two features can combine to control traffic from host port to wire port. > The work flow is configure LWM to RX queue and enable lwm-triggered flag in host shaper, after receiving LWM event, delay a while until RX queue is empty , then disable the shaper. We recycle this work flow to reduce RX queue drops. > > Add new libethdev API to set LWM, add rte event RTE_ETH_EVENT_RXQ_LIMIT_REACHED to handle LWM event. For host shaper, because it doesn't align to existing DPDK framework and is specific to Nvidia NIC, use PMD private API. > > For integration with testpmd, put the private cmdline function and LWM event handler in mlx5 PMD directory by adding a new file mlx5_test.c. Only add minimal code in testpmd to invoke interfaces from mlx5_test.c. > > Spike Du (7): > net/mlx5: add LWM support for Rxq > common/mlx5: share interrupt management > ethdev: introduce Rx queue based limit watermark > net/mlx5: add LWM event handling support > net/mlx5: support Rx queue based limit watermark > net/mlx5: add private API to config host port shaper > app/testpmd: add LWM and Host Shaper command > > app/test-pmd/cmdline.c | 74 +++++ > app/test-pmd/config.c | 21 ++ > app/test-pmd/meson.build | 4 + > app/test-pmd/testpmd.c | 24 ++ > app/test-pmd/testpmd.h | 1 + > doc/guides/nics/mlx5.rst | 84 ++++++ > doc/guides/rel_notes/release_22_07.rst | 2 + > drivers/common/mlx5/linux/meson.build | 13 + > drivers/common/mlx5/linux/mlx5_common_os.c | 131 +++++++++ > drivers/common/mlx5/linux/mlx5_common_os.h | 11 + > drivers/common/mlx5/mlx5_prm.h | 26 ++ > drivers/common/mlx5/version.map | 2 + > drivers/common/mlx5/windows/mlx5_common_os.h | 24 ++ > drivers/net/mlx5/linux/mlx5_ethdev_os.c | 71 ----- > drivers/net/mlx5/linux/mlx5_os.c | 132 ++------- > drivers/net/mlx5/linux/mlx5_socket.c | 53 +--- > drivers/net/mlx5/mlx5.c | 68 +++++ > drivers/net/mlx5/mlx5.h | 12 +- > drivers/net/mlx5/mlx5_devx.c | 60 +++- > drivers/net/mlx5/mlx5_devx.h | 1 + > drivers/net/mlx5/mlx5_rx.c | 292 +++++++++++++++++++ > drivers/net/mlx5/mlx5_rx.h | 13 + > drivers/net/mlx5/mlx5_testpmd.c | 184 ++++++++++++ > drivers/net/mlx5/mlx5_testpmd.h | 27 ++ > drivers/net/mlx5/mlx5_txpp.c | 28 +- > drivers/net/mlx5/rte_pmd_mlx5.h | 30 ++ > drivers/net/mlx5/version.map | 2 + > drivers/net/mlx5/windows/mlx5_ethdev_os.c | 22 -- > drivers/vdpa/mlx5/mlx5_vdpa_virtq.c | 48 +-- > lib/ethdev/ethdev_driver.h | 22 ++ > lib/ethdev/rte_ethdev.c | 52 ++++ > lib/ethdev/rte_ethdev.h | 71 +++++ > lib/ethdev/version.map | 2 + > 33 files changed, 1299 insertions(+), 308 deletions(-) > create mode 100644 drivers/net/mlx5/mlx5_testpmd.c > create mode 100644 drivers/net/mlx5/mlx5_testpmd.h