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
i40e: support configurable crc stripping
[dpdk.git]
/
lib
/
librte_pmd_xenvirt
/
rte_xen_lib.c
diff --git
a/lib/librte_pmd_xenvirt/rte_xen_lib.c
b/lib/librte_pmd_xenvirt/rte_xen_lib.c
index
1baa7e4
..
b3932f0
100644
(file)
--- a/
lib/librte_pmd_xenvirt/rte_xen_lib.c
+++ b/
lib/librte_pmd_xenvirt/rte_xen_lib.c
@@
-1,13
+1,13
@@
/*-
* BSD LICENSE
/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
* 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:
* 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
* * 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
@@
-17,7
+17,7
@@
* * 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.
* * 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
* 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
@@
-253,12
+253,12
@@
gntfree(void *va, size_t sz, uint64_t start_index)
}
}
}
}
-static int
+static int
xenstore_cleanup(void)
{
char store_path[PATH_MAX] = {0};
xenstore_cleanup(void)
{
char store_path[PATH_MAX] = {0};
- if (
rte_
snprintf(store_path, sizeof(store_path),
+ if (snprintf(store_path, sizeof(store_path),
"%s%s", dompath, DPDK_XENSTORE_NODE) == -1)
return -1;
"%s%s", dompath, DPDK_XENSTORE_NODE) == -1)
return -1;
@@
-320,9
+320,9
@@
xenstore_write(const char *key_str, const char *val_str)
RTE_LOG(ERR, PMD, "%s: xenstore init failed\n", __func__);
return -1;
}
RTE_LOG(ERR, PMD, "%s: xenstore init failed\n", __func__);
return -1;
}
- rv =
rte_
snprintf(grant_path, sizeof(grant_path), "%s%s", dompath, key_str);
+ rv = snprintf(grant_path, sizeof(grant_path), "%s%s", dompath, key_str);
if (rv == -1) {
if (rv == -1) {
- RTE_LOG(ERR, PMD, "%s:
rte_
snprintf %s %s failed\n",
+ RTE_LOG(ERR, PMD, "%s: snprintf %s %s failed\n",
__func__, dompath, key_str);
return -1;
}
__func__, dompath, key_str);
return -1;
}
@@
-374,11
+374,11
@@
grant_node_create(uint32_t pg_num, uint32_t *gref_arr, phys_addr_t *pa_arr, char
while (j < pg_num) {
if (first) {
while (j < pg_num) {
if (first) {
- rv =
rte_
snprintf(val_str, str_size, "%u", gref_tmp[k]);
+ rv = snprintf(val_str, str_size, "%u", gref_tmp[k]);
first = 0;
} else {
first = 0;
} else {
-
rte_
snprintf(tmp_str, PATH_MAX, "%s", val_str);
- rv =
rte_
snprintf(val_str, str_size, "%s,%u", tmp_str, gref_tmp[k]);
+ snprintf(tmp_str, PATH_MAX, "%s", val_str);
+ rv = snprintf(val_str, str_size, "%s,%u", tmp_str, gref_tmp[k]);
}
k++;
if (rv == -1)
}
k++;
if (rv == -1)
@@
-406,22
+406,20
@@
grant_gntalloc_mbuf_pool(struct rte_mempool *mpool, uint32_t pg_num, uint32_t *g
char key_str[PATH_MAX] = {0};
char val_str[PATH_MAX] = {0};
char key_str[PATH_MAX] = {0};
char val_str[PATH_MAX] = {0};
- rte_snprintf(val_str, sizeof(val_str), "");
-
if (grant_node_create(pg_num, gref_arr, pa_arr, val_str, sizeof(val_str))) {
return -1;
}
if (grant_node_create(pg_num, gref_arr, pa_arr, val_str, sizeof(val_str))) {
return -1;
}
- if (
rte_
snprintf(key_str, sizeof(key_str),
+ if (snprintf(key_str, sizeof(key_str),
DPDK_XENSTORE_PATH"%d"MEMPOOL_XENSTORE_STR, mempool_idx) == -1)
return -1;
if (xenstore_write(key_str, val_str) == -1)
return -1;
DPDK_XENSTORE_PATH"%d"MEMPOOL_XENSTORE_STR, mempool_idx) == -1)
return -1;
if (xenstore_write(key_str, val_str) == -1)
return -1;
- if (
rte_
snprintf(key_str, sizeof(key_str),
+ if (snprintf(key_str, sizeof(key_str),
DPDK_XENSTORE_PATH"%d"MEMPOOL_VA_XENSTORE_STR, mempool_idx) == -1)
return -1;
DPDK_XENSTORE_PATH"%d"MEMPOOL_VA_XENSTORE_STR, mempool_idx) == -1)
return -1;
- if (
rte_snprintf(val_str, sizeof(val_str), "%p"
, (uintptr_t)mpool->elt_va_start) == -1)
+ if (
snprintf(val_str, sizeof(val_str), "%"PRIxPTR
, (uintptr_t)mpool->elt_va_start) == -1)
return -1;
if (xenstore_write(key_str, val_str) == -1)
return -1;
return -1;
if (xenstore_write(key_str, val_str) == -1)
return -1;