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 DE8BCA0509; Sun, 1 May 2022 14:51:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 870F54069D; Sun, 1 May 2022 14:51:06 +0200 (CEST) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) by mails.dpdk.org (Postfix) with ESMTP id 01DD24003F; Sun, 1 May 2022 14:51:04 +0200 (CEST) Received: by mail-il1-f178.google.com with SMTP id y16so6556873ilc.7; Sun, 01 May 2022 05:51:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oGLQMOat602S/ANNnUwIU9h/Haau4G9Gv7LaF09h1S0=; b=p9i155U8ECOHyxy/f5ULhPYdw3AlF557Cik11z6xg3J0AvL7ah1a0q0risANumjVdc VqmzUJxoXzbBMdM5bVzv74watm8mTxhxlk2h9wacwfgLlyIIG2RQg4msVi1U3yZCueIO Y2qCPsWGwkVjREYxtbe3Tf9x+AJVuRQoMIr3288FtvzldClq715V8xtZASXsSNP9pkhO IhNEtzy84d9B+PXEJ/4q9n2yfWQQL+zu8do/obyf/XqNjE+7WLSSYBDsMNMeR9qJm0mB vObE4xHzddeCNs1chBfn2nPPjbIEtftbGG1f0zIDK1LGyLuqQKu1vyoGp3viaxsKd3Hl SBkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=oGLQMOat602S/ANNnUwIU9h/Haau4G9Gv7LaF09h1S0=; b=VLYzqd09XDugStrHzAxveiJi8dTrXgcWUZw5qG32MotY2HcfYlCJgTfki9k+BrK4Td n4sI/My7vIkIseAn5VrpOaw83SQFk+z4XWwwoQuE7HZOS35lMUYIbEvCk/XmpZa2Xa5n H3f1XKXR2m01xP5pw2IVVkB9Ct7OmeDxzg3hAkV5E6wbTA5j/R6noU0rLNGdsXyeI1rJ 47ogJAGVojGko0fw83iXAr2dL0UeMLxFN22uYulTNrlzOlZZT7JuSWOvWVGSK+D5NUzH MAd72+so97bj7Ipfd8kDLoBuyMG7LQUWcDE4NtbQw/6x6e+kYbVJxI1K/qaJ/vjflqDU zjDw== X-Gm-Message-State: AOAM531jJEaff55y2I48+rsz2WXBAf8Df8tce5VL/+SHPf+eJE6mYhoa K9MibKK8yxWZezI5q7iwDr6BpxJHYxXPPHqL40g= X-Google-Smtp-Source: ABdhPJwSC842eRqMvL+jzBvTcGy4hK/7J/xC+/jEMnF2yyJaF7hhp2RhLFmkT74w81ebKDpiAGdIylo7rUEZtyQfRZQ= X-Received: by 2002:a05:6e02:10d4:b0:2ca:c81f:5013 with SMTP id s20-20020a056e0210d400b002cac81f5013mr2917175ilj.262.1651409463979; Sun, 01 May 2022 05:51:03 -0700 (PDT) MIME-Version: 1.0 References: <20220401032232.1267376-1-spiked@nvidia.com> In-Reply-To: From: Jerin Jacob Date: Sun, 1 May 2022 18:20:38 +0530 Message-ID: Subject: Re: [RFC 0/6] net/mlx5: introduce limit watermark and host shaper To: Spike Du Cc: Andrew Rybchenko , Cristian Dumitrescu , Ferruh Yigit , "techboard@dpdk.org" , Matan Azrad , Slava Ovsiienko , Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , dpdk-dev , Raslan Darawsheh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Tue, Apr 26, 2022 at 8:12 AM Spike Du wrote: > > Hi Jerin, Hi Spike, > Thanks for your comments and sorry for the late response. > > For case one, I think I can refine the design and add LWM(limit w= atermark) in rte_eth_rxconf, and add a new rte_eth_event_type event. OK. > > For case two(host shaper), I think we can't use RX meter, because= it's actually TX shaper on a remote system. It's quite specific to Mellano= x/Nvidia BlueField 2(BF2 for short) NIC. The NIC contains an ARM system. We= have two terms here: Host-system stands for the system the BF2 NIC is inse= rted; ARM-system stands for the embedded ARM in BF2. ARM-system is doing th= e forwarding. This is the way host shaper works: we configure the register = on ARM-system, but it affects Host-system's TX shaper, which means the shap= er is working on the remote port, it's not a RX meter concept, hence we can= 't use DPDK RX meter framework. I'd suggest to still use private API. OK. If the host is using the DPDK application then rte_tm can be used on the egress side to enable the same. If it is not DPDK, then yes, we need private APIs. > > For testpmd part, I understand your concern. Because we need one = private API for host shaper, and we need testpmd's forwarding code to show = how it works to user, we need to call the private API in testpmd. If curren= t patch is not acceptable, what's the correct way to do it? Any framework t= o isolate the PMD private logic from testpmd common code, but still give a = chance to call private APIs in testpmd? Please check "PMD API" item in http://mails.dpdk.org/archives/dev/2022-April/239191.html > > > Regards, > Spike. > > > > > -----Original Message----- > > From: Jerin Jacob > > Sent: Tuesday, April 5, 2022 4:59 PM > > To: Spike Du ; Andrew Rybchenko > > ; Cristian Dumitrescu > > ; Ferruh Yigit ; > > techboard@dpdk.org > > Cc: Matan Azrad ; Slava Ovsiienko > > ; Ori Kam ; NBU-Contact- > > Thomas Monjalon (EXTERNAL) ; dpdk-dev > > ; Raslan Darawsheh > > Subject: Re: [RFC 0/6] net/mlx5: introduce limit watermark and host sha= per > > > > External email: Use caution opening links or attachments > > > > > > On Fri, Apr 1, 2022 at 8:53 AM Spike Du wrote: > > > > > > LWM(limit watermark) is per RX queue attribute, when RX queue fullnes= s > > > reach the LWM limit, HW sends an event to dpdk application. > > > Host shaper can configure shaper rate and lwm-triggered for a host po= rt. > > > The shaper limits the rate of traffic from host port to wire port. > > > If lwm-triggered is enabled, a 100Mbps shaper is enabled automaticall= y > > > when one of the host port's Rx queues receives LWM event. > > > > > > These two features can combine to control traffic from host port to w= ire > > 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 R= X > > > queue is empty , then disable the shaper. We recycle this work flow t= o > > reduce RX queue drops. > > > > > > Spike Du (6): > > > net/mlx5: add LWM support for Rxq > > > common/mlx5: share interrupt management > > > net/mlx5: add LWM event handling support > > > net/mlx5: add private API to configure Rxq LWM > > > net/mlx5: add private API to config host port shaper > > > app/testpmd: add LWM and Host Shaper command > > > > + @Andrew Rybchenko @Ferruh Yigit cristian.dumitrescu@intel.com > > > > I think, case one, can be easily abstracted via adding new > > rte_eth_event_type event and case two can be abstracted via the existin= g > > Rx meter framework in ethdev. > > > > Also, Updating generic testpmd to support PMD specific API should be > > avoided, I know there is existing stuff in testpmd, I think, we should = have the > > policy to add PMD specific commands to testpmd. > > > > There are around 56PMDs in ethdev now, If PMDs try to add PMD specific > > API in testpmd it will be bloated or at minimum, it should a separate f= ile in > > testpmd if we choose to take that path. > > > > + @techboard@dpdk.org