static d_open_t contigmem_open;
static int contigmem_num_buffers = RTE_CONTIGMEM_DEFAULT_NUM_BUFS;
-static int contigmem_buffer_size = RTE_CONTIGMEM_DEFAULT_BUF_SIZE;
+static int64_t contigmem_buffer_size = RTE_CONTIGMEM_DEFAULT_BUF_SIZE;
static eventhandler_tag contigmem_eh_tag;
static void *contigmem_buffers[RTE_CONTIGMEM_MAX_NUM_BUFS];
static struct cdev *contigmem_cdev = NULL;
TUNABLE_INT("hw.contigmem.num_buffers", &contigmem_num_buffers);
-TUNABLE_INT("hw.contigmem.buffer_size", &contigmem_buffer_size);
+TUNABLE_QUAD("hw.contigmem.buffer_size", &contigmem_buffer_size);
static SYSCTL_NODE(_hw, OID_AUTO, contigmem, CTLFLAG_RD, 0, "contigmem");
SYSCTL_INT(_hw_contigmem, OID_AUTO, num_buffers, CTLFLAG_RD,
&contigmem_num_buffers, 0, "Number of contigmem buffers allocated");
-SYSCTL_INT(_hw_contigmem, OID_AUTO, buffer_size, CTLFLAG_RD,
+SYSCTL_QUAD(_hw_contigmem, OID_AUTO, buffer_size, CTLFLAG_RD,
&contigmem_buffer_size, 0, "Size of each contiguous buffer");
static SYSCTL_NODE(_hw_contigmem, OID_AUTO, physaddr, CTLFLAG_RD, 0,
if (contigmem_buffer_size < PAGE_SIZE ||
(contigmem_buffer_size & (contigmem_buffer_size - 1)) != 0) {
- printf("buffer size 0x%x is not greater than PAGE_SIZE and "
+ printf("buffer size 0x%lx is not greater than PAGE_SIZE and "
"power of two\n", contigmem_buffer_size);
return (EINVAL);
}
eal_hugepage_info_init(void)
{
size_t sysctl_size;
- int buffer_size, num_buffers, fd, error;
+ int num_buffers, fd, error;
+ int64_t buffer_size;
/* re-use the linux "internal config" structure for our memory data */
struct hugepage_info *hpi = &internal_config.hugepage_info[0];
struct hugepage_info *tmp_hpi;
if (buffer_size >= 1<<30)
RTE_LOG(INFO, EAL, "Contigmem driver has %d buffers, each of size %dGB\n",
- num_buffers, buffer_size>>30);
+ num_buffers, (int)(buffer_size>>30));
else if (buffer_size >= 1<<20)
RTE_LOG(INFO, EAL, "Contigmem driver has %d buffers, each of size %dMB\n",
- num_buffers, buffer_size>>20);
+ num_buffers, (int)(buffer_size>>20));
else
RTE_LOG(INFO, EAL, "Contigmem driver has %d buffers, each of size %dKB\n",
- num_buffers, buffer_size>>10);
+ num_buffers, (int)(buffer_size>>10));
internal_config.num_hugepage_sizes = 1;
hpi->hugedir = CONTIGMEM_DEV;