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 2BD53A0352; Mon, 7 Feb 2022 18:27:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8976410FD; Mon, 7 Feb 2022 18:27:30 +0100 (CET) Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by mails.dpdk.org (Postfix) with ESMTP id 03668410F6 for ; Mon, 7 Feb 2022 18:27:29 +0100 (CET) Received: by mail-ej1-f49.google.com with SMTP id ka4so44084050ejc.11 for ; Mon, 07 Feb 2022 09:27:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o+CmvhSgKos4A1r7kkGjgZVSOyP8Clgv1xjqL+tIfpI=; b=XTLOJXhXSgunFZr2cXZKh1pYnYS3pna3NgVH1uKW+rGuo6TvSXfR4jTBCqC2fgem4S SpEm3FResAT1MGH1DKG9tt/MbL5T/GNfpE0DOQDHqUaDRiJBRFGs1cxNp2wKaVz2piZ2 wWDG0v8bo2D7FSvWsOp8AKwTYcJMe1gbqqO7s= 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; bh=o+CmvhSgKos4A1r7kkGjgZVSOyP8Clgv1xjqL+tIfpI=; b=FO7qtd30Ev3Jz0lSqvlhHSpz4wMapYUgHsI5z9TsibLDyeWSCfcEkiSuwte8JMMUDv Rlmc8Xc4o1qaXLz+ft/0/QGvAuM3XJfHklduJHJpmH7AAVWlR//j55Hj/KrsdTD1wgW3 Gntjx6M+U7NT2bl3IGVgSWllamh83q4yDb7tvvQN1qctAt27jvXEH3ftu78wxm5p1VUQ M7LPeENzDVqKD7ixRzNm0Z5YvVVnVABUEPix9XaXJqaAmwRx/nKCapyNCIioVIrr6ex1 XsMDcuF17UZQGvsHJ//7C6ggX02cSRxEF/QbU7qDlh904A+a7kdVVw33cUZNuBrwILEc CCjw== X-Gm-Message-State: AOAM531g/7n42eCcKhyQi6AmIcaedY/wMXH8Vf1YjGE+KB8BE8s7YV4p gjjvnmhU+fjZXTqgp6SlUSuCq62+Y8vj0OOucV+FU95eYsN3rA== X-Google-Smtp-Source: ABdhPJxo2c3E/SXsTyKFLLZmtQraVFyP87LITKeRgJ/M9F8r5LrJBtQ32OC/WefDyPaYMjszQP9Wzgan4MlIg4qRb7U= X-Received: by 2002:a17:907:7204:: with SMTP id dr4mr583159ejc.708.1644254849435; Mon, 07 Feb 2022 09:27:29 -0800 (PST) MIME-Version: 1.0 References: <20220131180859.2662034-1-jerinj@marvell.com> <20220207135511.3012285-1-jerinj@marvell.com> <20220207135511.3012285-2-jerinj@marvell.com> In-Reply-To: <20220207135511.3012285-2-jerinj@marvell.com> From: Ajit Khaparde Date: Mon, 7 Feb 2022 09:27:12 -0800 Message-ID: Subject: Re: [dpdk-dev] [PATCH v4 2/2] app/testpmd: add queue based pfc CLI options To: Jerin Jacob Kollanukkaran Cc: dpdk-dev , Xiaoyun Li , Aman Singh , Yuying Zhang , Thomas Monjalon , Ferruh Yigit , Andrew Boyer , Andrew Rybchenko , Beilei Xing , Bruce Richardson , Chas Williams , "Xia, Chenbo" , Ciara Loftus , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Gaetan Rivet , Gagandeep Singh , Guoyang Zhou , Haiyue Wang , Harman Kalra , Heinrich Kuhn , Hemant Agrawal , Hyong Youb Kim , Igor Chauskin , Igor Russkikh , Jakub Grajciar , "Singh, Jasvinder" , Jian Wang , Jiawen Wu , Jingjing Wu , John Daley , John Miller , "John W. Linville" , "Wiles, Keith" , Kiran Kumar K , oulijun , Liron Himi , Long Li , Marcin Wojtas , Martin Spinler , Matan Azrad , Matt Peters , Maxime Coquelin , Michal Krawczyk , "Min Hu (Connor)" , Nalla Pradeep , Nithin Dabilpuram , Qiming Yang , Qi Zhang , Radha Mohan Chintakuntla , Rahul Lakkireddy , Rasesh Mody , Rosen Xu , "Sachin Saxena (OSS)" , Satha Rao , Shahed Shaikh , Shai Brandes , Shepard Siegel , Somalapuram Amaranath , Somnath Kotur , Stephen Hemminger , Steven Webster , Sunil Kumar Kori , Tetsuya Mukawa , Veerasenareddy Burru , Slava Ovsiienko , Xiao Wang , Xiaoyun Wang , Yisen Zhuang , Yong Wang , Ziyang Xuan Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000003d338005d770ea51" 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 --0000000000003d338005d770ea51 Content-Type: text/plain; charset="UTF-8" On Mon, Feb 7, 2022 at 5:54 AM wrote: > > From: Sunil Kumar Kori > > Patch adds command line options to configure queue based > priority flow control. > > - Syntax command is given as below: > > set pfc_queue_ctrl rx \ > tx > > - Example command to configure queue based priority flow control > on rx and tx side for port 0, Rx queue 0, Tx queue 0 with pause > time 2047 > > testpmd> set pfc_queue_ctrl 0 rx on 0 0 tx on 0 0 2047 > > Signed-off-by: Sunil Kumar Kori Couple of minor nits. Otherwise this looks good. Acked-by: Ajit Khaparde > --- > v4..v3: > - fix documentation to explain CLI syntax. > v3..v1: > - Sync up the implementation to use new APIs > > app/test-pmd/cmdline.c | 122 ++++++++++++++++++++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 23 ++++ > 2 files changed, 145 insertions(+) > ::snip:: > + > +static void > +cmd_queue_priority_flow_ctrl_set_parsed(void *parsed_result, > + __rte_unused struct cmdline *cl, > + __rte_unused void *data) > +{ > + struct cmd_queue_priority_flow_ctrl_set_result *res = parsed_result; > + struct rte_eth_pfc_queue_conf pfc_queue_conf; > + int rx_fc_enable, tx_fc_enable; > + int ret; > + > + /* > + * Rx on/off, flow control is enabled/disabled on RX side. This can on the RX side. > + * indicate the RTE_ETH_FC_TX_PAUSE, Transmit pause frame at the Rx > + * side. Tx on/off, flow control is enabled/disabled on TX side. This > + * can indicate the RTE_ETH_FC_RX_PAUSE, Respond to the pause frame at > + * the Tx side. > + */ > + static enum rte_eth_fc_mode rx_tx_onoff_2_mode[2][2] = { > + {RTE_ETH_FC_NONE, RTE_ETH_FC_TX_PAUSE}, > + {RTE_ETH_FC_RX_PAUSE, RTE_ETH_FC_FULL} > + }; > + ::snip: > > +set pfc_queue_ctrl > +~~~~~~~~~~~~~~~~~~ > + > +Set the priority flow control parameter on a given Rx and Tx queue of a port:: > + > + testpmd> set pfc_queue_ctrl rx (on|off) \ > + tx (on|off) > + > +Where: > + > +* ``tx_qid`` (integer): Tx qid for which ``tx_tc`` will be applied and traffic > + will be paused when PFC frame is received with ``tx_tc`` enabled. > + > +* ``tx_tc`` (0-15): TC for which traffic is to be paused for xmit. > + > +* ``rx_qid`` (integer): Rx qid for which threshold will be applied and PFC > + frame will be generated with ``tx_tc`` when exceeds the threshold. when the threshold exceeds. > + > +* ``rx_tc`` (0-15): TC filled in PFC frame for which remote Tx is to be paused. > + > +* ``pause_time`` (integer): Pause quanta filled in the PFC frame for which > + interval, remote Tx will be paused. Valid only if Tx pause is on. > + > set stat_qmap > ~~~~~~~~~~~~~ > > -- > 2.35.1 > --0000000000003d338005d770ea51 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIIQdgYJKoZIhvcNAQcCoIIQZzCCEGMCAQExDzANBglghkgBZQMEAgEFADALBgkqhkiG9w0BBwGg gg3NMIIFDTCCA/WgAwIBAgIQeEqpED+lv77edQixNJMdADANBgkqhkiG9w0BAQsFADBMMSAwHgYD VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSB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