FILE
buddy.h
File preview with syntax highlighting.
linux-6.19.14/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/buddy.h
1/* SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB */ 2/* Copyright (c) 2024 NVIDIA Corporation & Affiliates */ 3 4#ifndef HWS_BUDDY_H_ 5#define HWS_BUDDY_H_ 6 7struct mlx5hws_buddy_mem { 8 unsigned long **bitmap; 9 unsigned int *num_free; 10 u32 max_order; 11}; 12 13struct mlx5hws_buddy_mem *mlx5hws_buddy_create(u32 max_order); 14 15void mlx5hws_buddy_cleanup(struct mlx5hws_buddy_mem *buddy); 16 17int mlx5hws_buddy_alloc_mem(struct mlx5hws_buddy_mem *buddy, u32 order); 18 19void mlx5hws_buddy_free_mem(struct mlx5hws_buddy_mem *buddy, u32 seg, u32 order); 20 21#endif /* HWS_BUDDY_H_ */
~/
Read-only file preview.