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
cryptodev: add asymmetric session user data API
[dpdk.git]
/
examples
/
ip_pipeline
/
kni.c
diff --git
a/examples/ip_pipeline/kni.c
b/examples/ip_pipeline/kni.c
index
e3d0b37
..
a2d3331
100644
(file)
--- a/
examples/ip_pipeline/kni.c
+++ b/
examples/ip_pipeline/kni.c
@@
-24,7
+24,7
@@
kni_init(void)
{
TAILQ_INIT(&kni_list);
{
TAILQ_INIT(&kni_list);
-#ifdef RTE_LIB
RTE
_KNI
+#ifdef RTE_LIB_KNI
rte_kni_init(KNI_MAX);
#endif
rte_kni_init(KNI_MAX);
#endif
@@
-46,7
+46,7
@@
kni_find(const char *name)
return NULL;
}
return NULL;
}
-#ifndef RTE_LIB
RTE
_KNI
+#ifndef RTE_LIB_KNI
struct kni *
kni_create(const char *name __rte_unused,
struct kni *
kni_create(const char *name __rte_unused,
@@
-86,7
+86,7
@@
kni_change_mtu(uint16_t port_id, unsigned int new_mtu)
if (!rte_eth_dev_is_valid_port(port_id))
return -EINVAL;
if (!rte_eth_dev_is_valid_port(port_id))
return -EINVAL;
- if (new_mtu > ETHER_MAX_LEN)
+ if (new_mtu >
RTE_
ETHER_MAX_LEN)
return -EINVAL;
/* Set new MTU */
return -EINVAL;
/* Set new MTU */
@@
-109,6
+109,7
@@
kni_create(const char *name, struct kni_params *params)
struct rte_kni *k;
const struct rte_pci_device *pci_dev;
const struct rte_bus *bus = NULL;
struct rte_kni *k;
const struct rte_pci_device *pci_dev;
const struct rte_bus *bus = NULL;
+ int ret;
/* Check input params */
if ((name == NULL) ||
/* Check input params */
if ((name == NULL) ||
@@
-123,7
+124,9
@@
kni_create(const char *name, struct kni_params *params)
return NULL;
/* Resource create */
return NULL;
/* Resource create */
- rte_eth_dev_info_get(link->port_id, &dev_info);
+ ret = rte_eth_dev_info_get(link->port_id, &dev_info);
+ if (ret != 0)
+ return NULL;
memset(&kni_conf, 0, sizeof(kni_conf));
strlcpy(kni_conf.name, name, RTE_KNI_NAMESIZE);
memset(&kni_conf, 0, sizeof(kni_conf));
strlcpy(kni_conf.name, name, RTE_KNI_NAMESIZE);