ethdev: increase queue rate parameter from 16b to 32b
The rate parameter modified to uint32_t, so that it can work for more than 64 Gbps. Signed-off-by: Satha Rao <skoteshwar@marvell.com> Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
This commit is contained in:
parent
8d54b1ec4a
commit
3a26e41e68
@ -7779,7 +7779,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,
|
||||
@ -7820,7 +7820,7 @@ static cmdline_parse_token_string_t cmd_queue_rate_limit_rate =
|
||||
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,
|
||||
@ -7847,7 +7847,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;
|
||||
};
|
||||
@ -7891,7 +7891,7 @@ static cmdline_parse_token_string_t cmd_vf_rate_limit_rate =
|
||||
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");
|
||||
|
@ -5863,7 +5863,7 @@ set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
|
||||
}
|
||||
|
||||
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;
|
||||
@ -5891,7 +5891,7 @@ 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, 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;
|
||||
|
||||
|
@ -1059,8 +1059,8 @@ rx_queue_setup(uint16_t port_id, uint16_t rx_queue_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,
|
||||
|
@ -63,11 +63,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: Announce moving from dedicated modify function for each field,
|
||||
to using the general ``rte_flow_modify_field`` action.
|
||||
|
||||
|
@ -281,6 +281,13 @@ API Changes
|
||||
for per-queue packet split offload,
|
||||
which is configured by ``rte_eth_rxseg_split``.
|
||||
|
||||
* ethdev: Changed the type of the parameter ``rate`` of the function
|
||||
``rte_eth_set_queue_rate_limit()`` from ``uint16_t`` to ``uint32_t``
|
||||
to support more than 64 Gbps.
|
||||
Changed the type of the parameter ``tx_rate`` of the functions
|
||||
``rte_pmd_bnxt_set_vf_rate_limit()`` and
|
||||
``rte_pmd_ixgbe_set_vf_rate_limit()`` in the same way for consistency.
|
||||
|
||||
* ethdev: Promoted ``rte_eth_rx_metadata_negotiate()``
|
||||
from experimental to stable.
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -184,7 +184,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on);
|
||||
* - (-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
|
||||
|
@ -558,7 +558,7 @@ int cnxk_nix_read_clock(struct rte_eth_dev *eth_dev, uint64_t *clock);
|
||||
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);
|
||||
|
@ -751,7 +751,7 @@ cnxk_nix_tm_ops_get(struct rte_eth_dev *eth_dev __rte_unused, void *arg)
|
||||
|
||||
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;
|
||||
|
@ -2475,7 +2475,7 @@ ixgbe_dev_phy_intr_setup(struct rte_eth_dev *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 @@ ixgbe_configure_msix(struct rte_eth_dev *dev)
|
||||
|
||||
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;
|
||||
|
@ -753,13 +753,13 @@ int ixgbe_enable_sec_tx_path_generic(struct ixgbe_hw *hw);
|
||||
|
||||
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,
|
||||
|
@ -499,7 +499,7 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
|
||||
|
||||
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;
|
||||
|
||||
|
@ -380,7 +380,7 @@ rte_pmd_ixgbe_set_vf_vlan_filter(uint16_t port, uint16_t vlan,
|
||||
* - (-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.
|
||||
|
@ -3764,7 +3764,7 @@ txgbe_configure_msix(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;
|
||||
|
@ -586,7 +586,7 @@ int txgbe_tm_ops_get(struct rte_eth_dev *dev, void *ops);
|
||||
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,
|
||||
|
@ -599,7 +599,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,
|
||||
|
@ -4443,7 +4443,7 @@ rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on)
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -4260,7 +4260,7 @@ int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
|
||||
* - (-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.
|
||||
|
Loading…
Reference in New Issue
Block a user