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 0C3FAA04AD; Tue, 8 Feb 2022 07:05:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 930BA4014E; Tue, 8 Feb 2022 07:05:58 +0100 (CET) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) by mails.dpdk.org (Postfix) with ESMTP id 470EE40141 for ; Tue, 8 Feb 2022 07:05:57 +0100 (CET) Received: by mail-il1-f178.google.com with SMTP id 15so13074459ilg.8 for ; Mon, 07 Feb 2022 22:05:57 -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=v87StRxe2L5yTCmutxQpovP/CcdP6G61vYlh4W4iJtQ=; b=W480qwulpEr6bDGdlxtkcc5FXpLK3ySrduaP17VE3TCUyxVtp11b0a7hCFQGBtIrr1 IP6WMwrAtq10+3iVUOM0tip4vEF67+0kmdyVMJDq6XBmoU+0urbd+P0tdNhRqPOZXdRM umdv8jCkGkFy+zi93KbIhD2jb+H5CwiaWd5Ng= 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=v87StRxe2L5yTCmutxQpovP/CcdP6G61vYlh4W4iJtQ=; b=j59+BvSZf/+0Ny0ZuAq8Fqm5St+pN2K6TZYZDY0G5h0VbVaOFWY9+WRXvGRYy65aET T4zXz8XRQ4PbwRFnMhi96UHqRXs2FCYCuR45IyTAVu4ckwvvsy/VtAtqZo8Ic6W1kFWC 5jVKDThrIVaauEZQbx0g0efEr5Zn/C1g1SyU7d8C6Jf9wRLvdr3uiOZdILoAkHP+7fmA cjFxYpkOcj5gtLr+F51GACeymL3XaBD+eqyqzLnc4EvdG9iBxhEmEBb4IxbWFE5N+ZML v7r8lqyjLZnHvKwSjaF3GJ7T5BSgEYhAItpLiY/yV2a2nBpXgeLG8vLuvpZzSQ6XCrvw 4kPg== X-Gm-Message-State: AOAM532YP3IAD3Vqcen7tKmwLnBOq49h14g5aKOa9VJ4sEd41iZZF2h0 OTNiMHL6YLr0VxCr/194o9vdpY0KOfhTBXYSQKQHQg== X-Google-Smtp-Source: ABdhPJzVqb2F/I+OX5VMpyS3C4Ax4adxI87dW8Jv/lJK2fOMPyvgIzbuVfc1OYE7bLC1nTmy7ckHS+WfYvzjeSG/sKs= X-Received: by 2002:a92:ce85:: with SMTP id r5mr1450740ilo.255.1644300356366; Mon, 07 Feb 2022 22:05:56 -0800 (PST) MIME-Version: 1.0 References: <20220131180859.2662034-1-jerinj@marvell.com> <20220207135511.3012285-1-jerinj@marvell.com> In-Reply-To: <20220207135511.3012285-1-jerinj@marvell.com> From: Ajit Khaparde Date: Mon, 7 Feb 2022 22:05:40 -0800 Message-ID: Subject: Re: [dpdk-dev] [PATCH v4 1/2] ethdev: support queue-based priority flow control To: Jerin Jacob Kollanukkaran Cc: dpdk-dev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Ray Kinsella , Andrew Boyer , 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="000000000000ab25c105d77b8222" 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 --000000000000ab25c105d77b8222 Content-Type: text/plain; charset="UTF-8" On Mon, Feb 7, 2022 at 5:54 AM wrote: > > From: Jerin Jacob > > Based on device support and use-case need, there are two different ways > to enable PFC. The first case is the port level PFC configuration, in > this case, rte_eth_dev_priority_flow_ctrl_set() API shall be used to > configure the PFC, and PFC frames will be generated using based on VLAN > TC value. > > The second case is the queue level PFC configuration, in this > case, Any packet field content can be used to steer the packet to the > specific queue using rte_flow or RSS and then use > rte_eth_dev_priority_flow_ctrl_queue_configure() to configure the > TC mapping on each queue. > Based on congestion selected on the specific queue, configured TC > shall be used to generate PFC frames. > > Signed-off-by: Jerin Jacob > Signed-off-by: Sunil Kumar Kori Couple of nits inline. > --- > > v4..v3: > > - Remove RTE_ETH_PFC_QUEUE_CAPA_* and replace with enum rte_eth_fc_mode mode_capa > - More documentaion > - Address the comment from Ferruh in > http://patches.dpdk.org/project/dpdk/patch/20220131180859.2662034-1-jerinj@marvell.com/ > > v3..v1: > > - Introduce rte_eth_dev_priority_flow_ctrl_queue_info_get() to > avoid updates to rte_eth_dev_info > > - Removed devtools/libabigail.abignore changes > - Address the comment from Ferruh in > http://patches.dpdk.org/project/dpdk/patch/20220113102718.3167282-1-jerinj@marvell.com/ > > > doc/guides/nics/features.rst | 7 +- > doc/guides/rel_notes/release_22_03.rst | 5 + > lib/ethdev/ethdev_driver.h | 11 ++ > lib/ethdev/rte_ethdev.c | 139 +++++++++++++++++++++++++ > lib/ethdev/rte_ethdev.h | 100 ++++++++++++++++++ > lib/ethdev/version.map | 4 + > 6 files changed, 264 insertions(+), 2 deletions(-) > ::snip:: > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice > + * > + * A structure used to configure Ethernet priority flow control parameter for s/parameter/parameters > + * ethdev queues. > + * > + * rte_eth_pfc_queue_conf::rx_pause structure shall used to configure given "shall be used" > + * tx_qid with corresponding tc. When ethdev device receives PFC frame with > + * rte_eth_pfc_queue_conf::rx_pause::tc, traffic will be paused on > + * rte_eth_pfc_queue_conf::rx_pause::tx_qid for that tc. > + * > + * rte_eth_pfc_queue_conf::tx_pause structure shall used to configure given "shall be used" > + * rx_qid. When rx_qid is congested, PFC frames are generated with > + * rte_eth_pfc_queue_conf::rx_pause::tc and > + * rte_eth_pfc_queue_conf::rx_pause::pause_time to the peer. > + */ > +struct rte_eth_pfc_queue_conf { > + enum rte_eth_fc_mode mode; /**< Link flow control mode */ > + > + struct { > + uint16_t tx_qid; /**< Tx queue ID */ > + uint8_t tc; > + /**< Traffic class as per PFC (802.1Qbb) spec. The value must be > + * in the range [0, rte_eth_pfc_queue_info::tx_max - 1] > + */ > + } rx_pause; /* Valid when (mode == FC_RX_PAUSE || mode == FC_FULL) */ > + > + struct { > + uint16_t pause_time; /**< Pause quota in the Pause frame */ > + uint16_t rx_qid; /**< Rx queue ID */ > + uint8_t tc; > + /**< Traffic class as per PFC (802.1Qbb) spec. The value must be > + * in the range [0, rte_eth_pfc_queue_info::tx_max - 1] > + */ > + } tx_pause; /* Valid when (mode == FC_TX_PAUSE || mode == FC_FULL) */ ::snip:: --000000000000ab25c105d77b8222 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 VQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UE AxMKR2xvYmFsU2lnbjAeFw0yMDA5MTYwMDAwMDBaFw0yODA5MTYwMDAwMDBaMFsxCzAJBgNVBAYT AkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTEwLwYDVQQDEyhHbG9iYWxTaWduIEdDQyBS MyBQZXJzb25hbFNpZ24gMiBDQSAyMDIwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA vbCmXCcsbZ/a0fRIQMBxp4gJnnyeneFYpEtNydrZZ+GeKSMdHiDgXD1UnRSIudKo+moQ6YlCOu4t rVWO/EiXfYnK7zeop26ry1RpKtogB7/O115zultAz64ydQYLe+a1e/czkALg3sgTcOOcFZTXk38e aqsXsipoX1vsNurqPtnC27TWsA7pk4uKXscFjkeUE8JZu9BDKaswZygxBOPBQBwrA5+20Wxlk6k1 e6EKaaNaNZUy30q3ArEf30ZDpXyfCtiXnupjSK8WU2cK4qsEtj09JS4+mhi0CTCrCnXAzum3tgcH cHRg0prcSzzEUDQWoFxyuqwiwhHu3sPQNmFOMwIDAQABo4IB2jCCAdYwDgYDVR0PAQH/BAQDAgGG MGAGA1UdJQRZMFcGCCsGAQUFBwMCBggrBgEFBQcDBAYKKwYBBAGCNxQCAgYKKwYBBAGCNwoDBAYJ KwYBBAGCNxUGBgorBgEEAYI3CgMMBggrBgEFBQcDBwYIKwYBBQUHAxEwEgYDVR0TAQH/BAgwBgEB /wIBADAdBgNVHQ4EFgQUljPR5lgXWzR1ioFWZNW+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