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
net/mlx5: fix E-Switch flow without port item
[dpdk.git]
/
drivers
/
net
/
kni
/
rte_eth_kni.c
diff --git
a/drivers/net/kni/rte_eth_kni.c
b/drivers/net/kni/rte_eth_kni.c
index
5e02224
..
1f232e4
100644
(file)
--- a/
drivers/net/kni/rte_eth_kni.c
+++ b/
drivers/net/kni/rte_eth_kni.c
@@
-6,6
+6,7
@@
#include <pthread.h>
#include <unistd.h>
#include <pthread.h>
#include <unistd.h>
+#include <rte_string_fns.h>
#include <rte_ethdev_driver.h>
#include <rte_ethdev_vdev.h>
#include <rte_kni.h>
#include <rte_ethdev_driver.h>
#include <rte_ethdev_vdev.h>
#include <rte_kni.h>
@@
-126,7
+127,7
@@
eth_kni_start(struct rte_eth_dev *dev)
const char *name = dev->device->name + 4; /* remove net_ */
mb_pool = internals->rx_queues[0].mb_pool;
const char *name = dev->device->name + 4; /* remove net_ */
mb_pool = internals->rx_queues[0].mb_pool;
- s
nprintf(conf.name, RTE_KNI_NAMESIZE, "%s", name
);
+ s
trlcpy(conf.name, name, RTE_KNI_NAMESIZE
);
conf.force_bind = 0;
conf.group_id = port_id;
conf.mbuf_size =
conf.force_bind = 0;
conf.group_id = port_id;
conf.mbuf_size =
@@
-458,6
+459,7
@@
eth_kni_remove(struct rte_vdev_device *vdev)
struct rte_eth_dev *eth_dev;
struct pmd_internals *internals;
const char *name;
struct rte_eth_dev *eth_dev;
struct pmd_internals *internals;
const char *name;
+ int ret;
name = rte_vdev_device_name(vdev);
PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name);
name = rte_vdev_device_name(vdev);
PMD_LOG(INFO, "Un-Initializing eth_kni for %s", name);
@@
-476,7
+478,9
@@
eth_kni_remove(struct rte_vdev_device *vdev)
eth_kni_dev_stop(eth_dev);
internals = eth_dev->data->dev_private;
eth_kni_dev_stop(eth_dev);
internals = eth_dev->data->dev_private;
- rte_kni_release(internals->kni);
+ ret = rte_kni_release(internals->kni);
+ if (ret)
+ PMD_LOG(WARNING, "Not able to release kni for %s", name);
rte_eth_dev_release_port(eth_dev);
rte_eth_dev_release_port(eth_dev);