diff options
| author | Michal Wilczynski <[email protected]> | 2022-11-15 10:48:21 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2022-11-18 05:41:28 +0000 |
| commit | bdf96d965a204dab8085b8f8e361b3844e6667f9 (patch) | |
| tree | 1df01580b03f6d69e0ea41a24c7486a5ecc64721 /drivers/net/ethernet/intel/ice/ice_sched.h | |
| parent | ice: Introduce new parameters in ice_sched_node (diff) | |
| download | kernel-bdf96d965a204dab8085b8f8e361b3844e6667f9.tar.gz kernel-bdf96d965a204dab8085b8f8e361b3844e6667f9.zip | |
ice: Add an option to pre-allocate memory for ice_sched_node
devlink-rate API requires a priv object to be allocated when node still
doesn't have a parent. This is problematic, because ice_sched_node can't
be currently created without a parent.
Add an option to pre-allocate memory for ice_sched_node struct. Add
new arguments to ice_sched_add() and ice_sched_add_elems() that allow
for pre-allocation of memory for ice_sched_node struct.
Signed-off-by: Michal Wilczynski <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_sched.h')
| -rw-r--r-- | drivers/net/ethernet/intel/ice/ice_sched.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_sched.h b/drivers/net/ethernet/intel/ice/ice_sched.h index 920db43ed4fa..9c100747445a 100644 --- a/drivers/net/ethernet/intel/ice/ice_sched.h +++ b/drivers/net/ethernet/intel/ice/ice_sched.h @@ -83,7 +83,8 @@ ice_sched_set_node_bw(struct ice_port_info *pi, struct ice_sched_node *node, int ice_sched_add_elems(struct ice_port_info *pi, struct ice_sched_node *tc_node, struct ice_sched_node *parent, u8 layer, u16 num_nodes, - u16 *num_nodes_added, u32 *first_node_teid); + u16 *num_nodes_added, u32 *first_node_teid, + struct ice_sched_node **prealloc_node); int ice_sched_move_nodes(struct ice_port_info *pi, struct ice_sched_node *parent, @@ -105,7 +106,8 @@ struct ice_sched_node * ice_sched_find_node_by_teid(struct ice_sched_node *start_node, u32 teid); int ice_sched_add_node(struct ice_port_info *pi, u8 layer, - struct ice_aqc_txsched_elem_data *info); + struct ice_aqc_txsched_elem_data *info, + struct ice_sched_node *prealloc_node); void ice_sched_update_parent(struct ice_sched_node *new_parent, struct ice_sched_node *node); |
