/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
"at offset %zu, error code: %d\n",
nb, PAGEMAP_FNAME, (size_t)ofs, errno);
rc = ENOENT;
- }
+ }
close(fd);
if ((usz = rte_mempool_xmem_usage(va, elt_num, total_size, pa,
pg_num, pg_shift)) < 0) {
-
+
n = -usz;
rc = ENOENT;
RTE_LOG(ERR, USER1, "%s(%s) only %u objects from %u "
- "requested can be created over "
+ "requested can be created over "
"mmaped region %p of %zu bytes\n",
__func__, name, n, elt_num, va, sz);
} else {
uv = va + usz;
usz = sz - usz;
-
+
RTE_LOG(INFO, USER1,
"%s(%s): unmap unused %zu of %zu "
"mmaped bytes @%p\n",
sz -= usz;
pg_num = sz >> pg_shift;
}
-
+
if ((mp = rte_mempool_xmem_create(name, elt_num,
elt_size, cache_size, private_data_size,
mp_init, mp_init_arg,
RTE_VERIFY(elt_num == mp->size);
}
- }
+ }
if (mp == NULL) {
munmap(va, sz);