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
/
octeontx
/
octeontx_mbox.c
diff --git
a/drivers/common/octeontx/octeontx_mbox.c
b/drivers/common/octeontx/octeontx_mbox.c
index
2fd2531
..
f414267
100644
(file)
--- a/
drivers/common/octeontx/octeontx_mbox.c
+++ b/
drivers/common/octeontx/octeontx_mbox.c
@@
-68,14
+68,7
@@
struct mbox_intf_ver {
uint32_t minor:10;
};
uint32_t minor:10;
};
-int octeontx_logtype_mbox;
-
-RTE_INIT(otx_init_log)
-{
- octeontx_logtype_mbox = rte_log_register("pmd.octeontx.mbox");
- if (octeontx_logtype_mbox >= 0)
- rte_log_set_level(octeontx_logtype_mbox, RTE_LOG_NOTICE);
-}
+RTE_LOG_REGISTER(octeontx_logtype_mbox, pmd.octeontx.mbox, NOTICE);
static inline void
mbox_msgcpy(volatile uint8_t *d, volatile const uint8_t *s, uint16_t size)
static inline void
mbox_msgcpy(volatile uint8_t *d, volatile const uint8_t *s, uint16_t size)
@@
-279,7
+272,7
@@
octeontx_start_domain(void)
}
static int
}
static int
-octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
+octeontx_check_mbox_version(struct mbox_intf_ver
*
app_intf_ver,
struct mbox_intf_ver *intf_ver)
{
struct mbox_intf_ver kernel_intf_ver = {0};
struct mbox_intf_ver *intf_ver)
{
struct mbox_intf_ver kernel_intf_ver = {0};
@@
-290,8
+283,9
@@
octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
hdr.coproc = NO_COPROC;
hdr.msg = RM_INTERFACE_VERSION;
hdr.coproc = NO_COPROC;
hdr.msg = RM_INTERFACE_VERSION;
- result = octeontx_mbox_send(&hdr, &app_intf_ver, sizeof(app_intf_ver),
- &kernel_intf_ver, sizeof(kernel_intf_ver));
+ result = octeontx_mbox_send(&hdr, app_intf_ver,
+ sizeof(struct mbox_intf_ver),
+ &kernel_intf_ver, sizeof(kernel_intf_ver));
if (result != sizeof(kernel_intf_ver)) {
mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
result, hdr.res_code);
if (result != sizeof(kernel_intf_ver)) {
mbox_log_err("Could not send interface version. Err=%d. FuncErr=%d\n",
result, hdr.res_code);
@@
-301,9
+295,9
@@
octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
if (intf_ver)
*intf_ver = kernel_intf_ver;
if (intf_ver)
*intf_ver = kernel_intf_ver;
- if (app_intf_ver
.
platform != kernel_intf_ver.platform ||
- app_intf_ver
.
major != kernel_intf_ver.major ||
- app_intf_ver
.
minor != kernel_intf_ver.minor)
+ if (app_intf_ver
->
platform != kernel_intf_ver.platform ||
+ app_intf_ver
->
major != kernel_intf_ver.major ||
+ app_intf_ver
->
minor != kernel_intf_ver.minor)
result = -EINVAL;
return result;
result = -EINVAL;
return result;
@@
-312,7
+306,7
@@
octeontx_check_mbox_version(struct mbox_intf_ver app_intf_ver,
int
octeontx_mbox_init(void)
{
int
octeontx_mbox_init(void)
{
-
const
struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
+ struct mbox_intf_ver MBOX_INTERFACE_VERSION = {
.platform = 0x01,
.major = 0x01,
.minor = 0x03
.platform = 0x01,
.major = 0x01,
.minor = 0x03
@@
-330,7
+324,7
@@
octeontx_mbox_init(void)
return ret;
}
return ret;
}
- ret = octeontx_check_mbox_version(MBOX_INTERFACE_VERSION,
+ ret = octeontx_check_mbox_version(
&
MBOX_INTERFACE_VERSION,
&rm_intf_ver);
if (ret < 0) {
mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",
&rm_intf_ver);
if (ret < 0) {
mbox_log_err("MBOX version: Kernel(%d.%d.%d) != DPDK(%d.%d.%d)",