Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mlx4/mlx4_core/icm.h
Show All 37 Lines | |||||
#include <linux/pci.h> | #include <linux/pci.h> | ||||
#include <linux/mutex.h> | #include <linux/mutex.h> | ||||
#include <linux/scatterlist.h> | #include <linux/scatterlist.h> | ||||
#define MLX4_ICM_CHUNK_LEN \ | #define MLX4_ICM_CHUNK_LEN \ | ||||
((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ | ((256 - sizeof (struct list_head) - 2 * sizeof (int)) / \ | ||||
(sizeof (struct scatterlist))) | (sizeof (struct scatterlist))) | ||||
enum { | #define MLX4_ICM_PAGE_SHIFT 12 | ||||
MLX4_ICM_PAGE_SHIFT = 12, | #define MLX4_ICM_PAGE_SIZE (1 << MLX4_ICM_PAGE_SHIFT) | ||||
MLX4_ICM_PAGE_SIZE = 1 << MLX4_ICM_PAGE_SHIFT, | |||||
}; | |||||
struct mlx4_icm_chunk { | struct mlx4_icm_chunk { | ||||
struct list_head list; | struct list_head list; | ||||
int npages; | int npages; | ||||
int nsg; | int nsg; | ||||
struct scatterlist mem[MLX4_ICM_CHUNK_LEN]; | struct scatterlist mem[MLX4_ICM_CHUNK_LEN]; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |