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 A68D0A00C2; Wed, 28 Sep 2022 07:54:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 983D341145; Wed, 28 Sep 2022 07:54:28 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 73AD041133 for ; Wed, 28 Sep 2022 07:54:27 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28S0rFKk007838; Tue, 27 Sep 2022 22:52:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=pfpt0220; bh=yhQY9V68nMq2dsqC0Cbi83UdofifNyL4//4piMQ/lFI=; b=Y6sh9Nzf7pEPYk7zI84bOIvEbtw+Iu26qMHldCEurjdAZxPZrvznMjOKiNs6LLYV/Bmr vjprp6nsVx4PrlEcMjUg67JkU/UNf5SSNHMI2g5pLP6O9k29i24YBQ9tTXw2dhZUfumI DN/QBsPUOZ+QQ2Bqh976HhEhzOxInGsHhViaNxi8Aotry60sg3nOV8RnOHWP/rpVijwG Dw9VQjOzI1XVzdefHBD00S2fA5x/H50QHAYJhShtpWZR84i63rY0iyEVG45M23mtdg3e vCY7w/JjdCdoCClSbGhVqRcTY69B/x4qTjJdsnKKFqOkUJDfjJKfrdnP39LwfjhqwYw4 +A== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3jt1dpd8kd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 27 Sep 2022 22:52:19 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 27 Sep 2022 22:52:17 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.18 via Frontend Transport; Tue, 27 Sep 2022 22:52:17 -0700 Received: from cavium.localdomain (unknown [10.28.34.26]) by maili.marvell.com (Postfix) with ESMTP id EE8C63F7080; Tue, 27 Sep 2022 22:52:10 -0700 (PDT) From: To: Aman Singh , Yuying Zhang , Ray Kinsella , Ajit Khaparde , Somnath Kotur , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Qiming Yang , Wenjun Wu , Jiawen Wu , Jian Wang , Thomas Monjalon , "Ferruh Yigit" , Andrew Rybchenko CC: , , , , Subject: [PATCH v3] ethdev: queue rate parameter changed from 16b to 32b Date: Wed, 28 Sep 2022 01:51:58 -0400 Message-ID: <1664344318-3594-1-git-send-email-skoteshwar@marvell.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1663939018-18898-1-git-send-email-skoteshwar@marvell.com> References: <1663939018-18898-1-git-send-email-skoteshwar@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: G16EtywTZ7_wn8-PxdNOSjNfGLKNivxl X-Proofpoint-GUID: G16EtywTZ7_wn8-PxdNOSjNfGLKNivxl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-28_02,2022-09-27_01,2022-06-22_01 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 From: Satha Rao The rate parameter modified to uint32_t, so that it can work for more than 64 Gbps. Signed-off-by: Satha Rao --- v2: Fixed checkpatch warnings v3: updated release notes, cleanup deprecation, addressed review comments app/test-pmd/cmdline.c | 8 ++++---- app/test-pmd/config.c | 4 ++-- app/test-pmd/testpmd.h | 4 ++-- doc/guides/rel_notes/deprecation.rst | 5 ----- doc/guides/rel_notes/release_22_11.rst | 3 +++ drivers/net/bnxt/rte_pmd_bnxt.c | 4 ++-- drivers/net/bnxt/rte_pmd_bnxt.h | 2 +- drivers/net/cnxk/cnxk_ethdev.h | 2 +- drivers/net/cnxk/cnxk_tm.c | 2 +- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- drivers/net/ixgbe/ixgbe_ethdev.h | 4 ++-- drivers/net/ixgbe/rte_pmd_ixgbe.c | 2 +- drivers/net/ixgbe/rte_pmd_ixgbe.h | 2 +- drivers/net/txgbe/txgbe_ethdev.c | 2 +- drivers/net/txgbe/txgbe_ethdev.h | 2 +- lib/ethdev/ethdev_driver.h | 2 +- lib/ethdev/rte_ethdev.c | 2 +- lib/ethdev/rte_ethdev.h | 2 +- 18 files changed, 27 insertions(+), 29 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 51321de..adfdc1d 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -8106,7 +8106,7 @@ struct cmd_queue_rate_limit_result { cmdline_fixed_string_t queue; uint8_t queue_num; cmdline_fixed_string_t rate; - uint16_t rate_num; + uint32_t rate_num; }; static void cmd_queue_rate_limit_parsed(void *parsed_result, @@ -8147,7 +8147,7 @@ static void cmd_queue_rate_limit_parsed(void *parsed_result, rate, "rate"); static cmdline_parse_token_num_t cmd_queue_rate_limit_ratenum = TOKEN_NUM_INITIALIZER(struct cmd_queue_rate_limit_result, - rate_num, RTE_UINT16); + rate_num, RTE_UINT32); static cmdline_parse_inst_t cmd_queue_rate_limit = { .f = cmd_queue_rate_limit_parsed, @@ -8174,7 +8174,7 @@ struct cmd_vf_rate_limit_result { cmdline_fixed_string_t vf; uint8_t vf_num; cmdline_fixed_string_t rate; - uint16_t rate_num; + uint32_t rate_num; cmdline_fixed_string_t q_msk; uint64_t q_msk_val; }; @@ -8218,7 +8218,7 @@ static void cmd_vf_rate_limit_parsed(void *parsed_result, rate, "rate"); static cmdline_parse_token_num_t cmd_vf_rate_limit_ratenum = TOKEN_NUM_INITIALIZER(struct cmd_vf_rate_limit_result, - rate_num, RTE_UINT16); + rate_num, RTE_UINT32); static cmdline_parse_token_string_t cmd_vf_rate_limit_q_msk = TOKEN_STRING_INITIALIZER(struct cmd_vf_rate_limit_result, q_msk, "queue_mask"); diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index c90cdfe..6dd543d 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -5914,7 +5914,7 @@ struct igb_ring_desc_16_bytes { } int -set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate) +set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint32_t rate) { int diag; struct rte_eth_link link; @@ -5942,7 +5942,7 @@ struct igb_ring_desc_16_bytes { } int -set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk) +set_vf_rate_limit(portid_t port_id, uint16_t vf, uint32_t rate, uint64_t q_msk) { int diag = -ENOTSUP; diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h index ddf5e21..0af3aa1 100644 --- a/app/test-pmd/testpmd.h +++ b/app/test-pmd/testpmd.h @@ -1097,8 +1097,8 @@ void port_rss_reta_info(portid_t port_id, uint16_t nb_rx_desc, unsigned int socket_id, struct rte_eth_rxconf *rx_conf, struct rte_mempool *mp); -int set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint16_t rate); -int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, +int set_queue_rate_limit(portid_t port_id, uint16_t queue_idx, uint32_t rate); +int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint32_t rate, uint64_t q_msk); int set_rxq_avail_thresh(portid_t port_id, uint16_t queue_id, diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index e0fa5ef..9292080 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -87,11 +87,6 @@ Deprecation Notices us extending existing enum/define. One solution can be using a fixed size array instead of ``.*MAX.*`` value. -* ethdev: The function ``rte_eth_set_queue_rate_limit`` takes ``rate`` in Mbps. - The queue rate is limited to 64 Gbps because declared as ``uint16_t``. - The ``rate`` parameter will be modified to ``uint32_t`` in DPDK 22.11 - so that it can work for more than 64 Gbps. - * ethdev: Since no single PMD supports ``RTE_ETH_RX_OFFLOAD_HEADER_SPLIT`` offload and the ``split_hdr_size`` field in structure ``rte_eth_rxmode`` to enable per-port header split, they will be removed in DPDK 22.11. diff --git a/doc/guides/rel_notes/release_22_11.rst b/doc/guides/rel_notes/release_22_11.rst index 2e076ba..3c7e471 100644 --- a/doc/guides/rel_notes/release_22_11.rst +++ b/doc/guides/rel_notes/release_22_11.rst @@ -129,6 +129,9 @@ API Changes configuration (``dev_conf.fdir_conf``). Moved corresponding structures to internal API since some drivers still use it internally. +* ethdev: The type of parameter ``rate`` of the ``rte_eth_set_queue_rate_limit`` + changed from ``uint16_t`` to ``uint32_t`` to support more than 64 Gbps. + ABI Changes ----------- diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c index 77ecbef..4dc38a2 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.c +++ b/drivers/net/bnxt/rte_pmd_bnxt.c @@ -172,12 +172,12 @@ int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf, } int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf, - uint16_t tx_rate, uint64_t q_msk) + uint32_t tx_rate, uint64_t q_msk) { struct rte_eth_dev *eth_dev; struct rte_eth_dev_info dev_info; struct bnxt *bp; - uint16_t tot_rate = 0; + uint32_t tot_rate = 0; uint64_t idx; int rc; diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h index 86b8d71..174c18a 100644 --- a/drivers/net/bnxt/rte_pmd_bnxt.h +++ b/drivers/net/bnxt/rte_pmd_bnxt.h @@ -184,7 +184,7 @@ int rte_pmd_bnxt_set_vf_vlan_filter(uint16_t port, uint16_t vlan, * - (-EINVAL) if *vf* or *mac_addr* is invalid. */ int rte_pmd_bnxt_set_vf_rate_limit(uint16_t port, uint16_t vf, - uint16_t tx_rate, uint64_t q_msk); + uint32_t tx_rate, uint64_t q_msk); /** * Get VF's statistics diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h index c09e9bf..5204c46 100644 --- a/drivers/net/cnxk/cnxk_ethdev.h +++ b/drivers/net/cnxk/cnxk_ethdev.h @@ -558,7 +558,7 @@ int cnxk_nix_timesync_write_time(struct rte_eth_dev *eth_dev, uint64_t cnxk_nix_rxq_mbuf_setup(struct cnxk_eth_dev *dev); int cnxk_nix_tm_ops_get(struct rte_eth_dev *eth_dev, void *ops); int cnxk_nix_tm_set_queue_rate_limit(struct rte_eth_dev *eth_dev, - uint16_t queue_idx, uint16_t tx_rate); + uint16_t queue_idx, uint32_t tx_rate); int cnxk_nix_tm_mark_vlan_dei(struct rte_eth_dev *eth_dev, int mark_green, int mark_yellow, int mark_red, struct rte_tm_error *error); diff --git a/drivers/net/cnxk/cnxk_tm.c b/drivers/net/cnxk/cnxk_tm.c index d45e70a..9d8cd3f 100644 --- a/drivers/net/cnxk/cnxk_tm.c +++ b/drivers/net/cnxk/cnxk_tm.c @@ -751,7 +751,7 @@ struct rte_tm_ops cnxk_tm_ops = { int cnxk_nix_tm_set_queue_rate_limit(struct rte_eth_dev *eth_dev, - uint16_t queue_idx, uint16_t tx_rate_mbps) + uint16_t queue_idx, uint32_t tx_rate_mbps) { struct cnxk_eth_dev *dev = cnxk_eth_pmd_priv(eth_dev); uint64_t tx_rate = tx_rate_mbps * (uint64_t)1E6; diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index 1dfad0e..9ff8ee0 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -2475,7 +2475,7 @@ static int eth_ixgbevf_pci_remove(struct rte_pci_device *pci_dev) int ixgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf, - uint16_t tx_rate, uint64_t q_msk) + uint32_t tx_rate, uint64_t q_msk) { struct ixgbe_hw *hw; struct ixgbe_vf_info *vfinfo; @@ -6090,7 +6090,7 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on) int ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev, - uint16_t queue_idx, uint16_t tx_rate) + uint16_t queue_idx, uint32_t tx_rate) { struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); uint32_t rf_dec, rf_int; diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h index 0773a7e..b4db3f4 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/ixgbe/ixgbe_ethdev.h @@ -753,13 +753,13 @@ void ixgbe_fdir_stats_get(struct rte_eth_dev *dev, int ixgbe_vt_check(struct ixgbe_hw *hw); int ixgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf, - uint16_t tx_rate, uint64_t q_msk); + uint32_t tx_rate, uint64_t q_msk); bool is_ixgbe_supported(struct rte_eth_dev *dev); int ixgbe_tm_ops_get(struct rte_eth_dev *dev, void *ops); void ixgbe_tm_conf_init(struct rte_eth_dev *dev); void ixgbe_tm_conf_uninit(struct rte_eth_dev *dev); int ixgbe_set_queue_rate_limit(struct rte_eth_dev *dev, uint16_t queue_idx, - uint16_t tx_rate); + uint32_t tx_rate); int ixgbe_rss_conf_init(struct ixgbe_rte_flow_rss_conf *out, const struct rte_flow_action_rss *in); int ixgbe_action_rss_same(const struct rte_flow_action_rss *comp, diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.c b/drivers/net/ixgbe/rte_pmd_ixgbe.c index 9729f85..4ff7f37 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.c +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.c @@ -498,7 +498,7 @@ int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf, - uint16_t tx_rate, uint64_t q_msk) + uint32_t tx_rate, uint64_t q_msk) { struct rte_eth_dev *dev; diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h index 426fe58..7ca1126 100644 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h @@ -380,7 +380,7 @@ int rte_pmd_ixgbe_macsec_select_rxsa(uint16_t port, uint8_t idx, uint8_t an, * - (-EINVAL) if bad parameter. */ int rte_pmd_ixgbe_set_vf_rate_limit(uint16_t port, uint16_t vf, - uint16_t tx_rate, uint64_t q_msk); + uint32_t tx_rate, uint64_t q_msk); /** * Set all the TCs' bandwidth weight. diff --git a/drivers/net/txgbe/txgbe_ethdev.c b/drivers/net/txgbe/txgbe_ethdev.c index 4422472..86ef979 100644 --- a/drivers/net/txgbe/txgbe_ethdev.c +++ b/drivers/net/txgbe/txgbe_ethdev.c @@ -3764,7 +3764,7 @@ static int txgbe_dev_xstats_get_names_by_id(struct rte_eth_dev *dev, int txgbe_set_queue_rate_limit(struct rte_eth_dev *dev, - uint16_t queue_idx, uint16_t tx_rate) + uint16_t queue_idx, uint32_t tx_rate) { struct txgbe_hw *hw = TXGBE_DEV_HW(dev); uint32_t bcnrc_val; diff --git a/drivers/net/txgbe/txgbe_ethdev.h b/drivers/net/txgbe/txgbe_ethdev.h index e425ab4..5171a6c 100644 --- a/drivers/net/txgbe/txgbe_ethdev.h +++ b/drivers/net/txgbe/txgbe_ethdev.h @@ -586,7 +586,7 @@ int txgbe_set_vf_rate_limit(struct rte_eth_dev *dev, uint16_t vf, void txgbe_tm_conf_init(struct rte_eth_dev *dev); void txgbe_tm_conf_uninit(struct rte_eth_dev *dev); int txgbe_set_queue_rate_limit(struct rte_eth_dev *dev, uint16_t queue_idx, - uint16_t tx_rate); + uint32_t tx_rate); int txgbe_rss_conf_init(struct txgbe_rte_flow_rss_conf *out, const struct rte_flow_action_rss *in); int txgbe_action_rss_same(const struct rte_flow_action_rss *comp, diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h index a0e0b2a..a89450c 100644 --- a/lib/ethdev/ethdev_driver.h +++ b/lib/ethdev/ethdev_driver.h @@ -598,7 +598,7 @@ typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev, /** @internal Set queue Tx rate. */ typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev, uint16_t queue_idx, - uint16_t tx_rate); + uint32_t tx_rate); /** @internal Add tunneling UDP port. */ typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev, diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c index 1979dc0..4b11dae 100644 --- a/lib/ethdev/rte_ethdev.c +++ b/lib/ethdev/rte_ethdev.c @@ -4388,7 +4388,7 @@ enum { } int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, - uint16_t tx_rate) + uint32_t tx_rate) { struct rte_eth_dev *dev; struct rte_eth_dev_info dev_info; diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h index b62ac5b..7149dd7 100644 --- a/lib/ethdev/rte_ethdev.h +++ b/lib/ethdev/rte_ethdev.h @@ -4165,7 +4165,7 @@ int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr, * - (-EINVAL) if bad parameter. */ int rte_eth_set_queue_rate_limit(uint16_t port_id, uint16_t queue_idx, - uint16_t tx_rate); + uint32_t tx_rate); /** * Configuration of Receive Side Scaling hash computation of Ethernet device. -- 1.8.3.1