git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: add devargs test cases
[dpdk.git]
/
drivers
/
common
/
iavf
/
iavf_impl.c
diff --git
a/drivers/common/iavf/iavf_impl.c
b/drivers/common/iavf/iavf_impl.c
index
6174a91
..
8919b0e
100644
(file)
--- a/
drivers/common/iavf/iavf_impl.c
+++ b/
drivers/common/iavf/iavf_impl.c
@@
-1,33
+1,32
@@
/* SPDX-License-Identifier: BSD-3-Clause
/* SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2019-202
0
Intel Corporation
+ * Copyright(c) 2019-202
1
Intel Corporation
*/
#include <stdio.h>
#include <inttypes.h>
#include <rte_common.h>
*/
#include <stdio.h>
#include <inttypes.h>
#include <rte_common.h>
-#include <rte_random.h>
#include <rte_malloc.h>
#include <rte_memzone.h>
#include "iavf_type.h"
#include "iavf_prototype.h"
#include <rte_malloc.h>
#include <rte_memzone.h>
#include "iavf_type.h"
#include "iavf_prototype.h"
-int iavf_common_logger;
-
enum iavf_status
iavf_allocate_dma_mem_d(__rte_unused struct iavf_hw *hw,
struct iavf_dma_mem *mem,
u64 size,
u32 alignment)
{
enum iavf_status
iavf_allocate_dma_mem_d(__rte_unused struct iavf_hw *hw,
struct iavf_dma_mem *mem,
u64 size,
u32 alignment)
{
+ static uint64_t iavf_dma_memzone_id;
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
if (!mem)
return IAVF_ERR_PARAM;
const struct rte_memzone *mz = NULL;
char z_name[RTE_MEMZONE_NAMESIZE];
if (!mem)
return IAVF_ERR_PARAM;
- snprintf(z_name, sizeof(z_name), "iavf_dma_%"PRIu64, rte_rand());
+ snprintf(z_name, sizeof(z_name), "iavf_dma_%" PRIu64,
+ __atomic_fetch_add(&iavf_dma_memzone_id, 1, __ATOMIC_RELAXED));
mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY,
RTE_MEMZONE_IOVA_CONTIG, alignment,
RTE_PGSIZE_2M);
mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY,
RTE_MEMZONE_IOVA_CONTIG, alignment,
RTE_PGSIZE_2M);
@@
-87,9
+86,4
@@
iavf_free_virt_mem_d(__rte_unused struct iavf_hw *hw,
return IAVF_SUCCESS;
}
return IAVF_SUCCESS;
}
-RTE_INIT(iavf_common_init_log)
-{
- iavf_common_logger = rte_log_register("pmd.common.iavf");
- if (iavf_common_logger >= 0)
- rte_log_set_level(iavf_common_logger, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER_DEFAULT(iavf_common_logger, NOTICE);