X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_sched%2Frte_sched.h;h=c1a772b70c84c80f132e36680f80a064705fb11a;hb=3c56316517e2d1a99e10f98ebddc0c39c6f6f86d;hp=39339b7f133387d32d82591e53c5107bd0d9b105;hpb=0ea4c6afcaf14e96059d641363112c6ee63c0934;p=dpdk.git diff --git a/lib/librte_sched/rte_sched.h b/lib/librte_sched/rte_sched.h index 39339b7f13..c1a772b70c 100644 --- a/lib/librte_sched/rte_sched.h +++ b/lib/librte_sched/rte_sched.h @@ -149,18 +149,6 @@ struct rte_sched_pipe_params { * byte. */ struct rte_sched_subport_params { - /** Token bucket rate (measured in bytes per second) */ - uint64_t tb_rate; - - /** Token bucket size (measured in credits) */ - uint64_t tb_size; - - /** Traffic class rates (measured in bytes per second) */ - uint64_t tc_rate[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE]; - - /** Enforcement period for rates (measured in milliseconds) */ - uint64_t tc_period; - /** Number of subport pipes. * The subport can enable/allocate fewer pipes than the maximum * number set through struct port_params::n_max_pipes_per_subport, @@ -337,21 +325,51 @@ rte_sched_subport_pipe_profile_add(struct rte_sched_port *port, uint32_t *pipe_profile_id); /** - * Hierarchical scheduler subport configuration + * @warning + * @b EXPERIMENTAL: this API may change without prior notice. * + * Hierarchical scheduler subport bandwidth profile add + * Note that this function is safe to use in runtime for adding new + * subport bandwidth profile as it doesn't have any impact on hiearchical + * structure of the scheduler. + * @param port + * Handle to port scheduler instance + * @param profile + * Subport bandwidth profile + * @param subport_profile_id + * Subport profile id + * @return + * 0 upon success, error code otherwise + */ +__rte_experimental +int +rte_sched_port_subport_profile_add(struct rte_sched_port *port, + struct rte_sched_subport_profile_params *profile, + uint32_t *subport_profile_id); + +/** + * Hierarchical scheduler subport configuration + * Note that this function is safe to use at runtime + * to configure subport bandwidth profile. * @param port * Handle to port scheduler instance * @param subport_id * Subport ID * @param params - * Subport configuration parameters + * Subport configuration parameters. Must be non-NULL + * for first invocation (i.e initialization) for a given + * subport. Ignored (recommended value is NULL) for all + * subsequent invocation on the same subport. + * @param subport_profile_id + * ID of subport bandwidth profile * @return * 0 upon success, error code otherwise */ int rte_sched_subport_config(struct rte_sched_port *port, uint32_t subport_id, - struct rte_sched_subport_params *params); + struct rte_sched_subport_params *params, + uint32_t subport_profile_id); /** * Hierarchical scheduler pipe configuration