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
timer: fix pending counter
[dpdk.git]
/
lib
/
librte_kni
/
rte_kni.c
diff --git
a/lib/librte_kni/rte_kni.c
b/lib/librte_kni/rte_kni.c
index
8e8741f
..
a0daa23
100644
(file)
--- a/
lib/librte_kni/rte_kni.c
+++ b/
lib/librte_kni/rte_kni.c
@@
-1,7
+1,7
@@
/*-
* BSD LICENSE
*
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-201
3
Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-201
4
Intel Corporation. All rights reserved.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@
-179,6
+179,8
@@
rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
dev_info.function = conf->addr.function;
dev_info.vendor_id = conf->id.vendor_id;
dev_info.device_id = conf->id.device_id;
dev_info.function = conf->addr.function;
dev_info.vendor_id = conf->id.vendor_id;
dev_info.device_id = conf->id.device_id;
+ dev_info.core_id = conf->core_id;
+ dev_info.force_bind = conf->force_bind;
dev_info.group_id = conf->group_id;
dev_info.mbuf_size = conf->mbuf_size;
dev_info.group_id = conf->group_id;
dev_info.mbuf_size = conf->mbuf_size;
@@
-246,7
+248,8
@@
rte_kni_alloc(struct rte_mempool *pktmbuf_pool,
dev_info.sync_phys = mz->phys_addr;
/* MBUF mempool */
dev_info.sync_phys = mz->phys_addr;
/* MBUF mempool */
- rte_snprintf(mz_name, sizeof(mz_name), "MP_%s", pktmbuf_pool->name);
+ rte_snprintf(mz_name, sizeof(mz_name), RTE_MEMPOOL_OBJ_NAME,
+ pktmbuf_pool->name);
mz = rte_memzone_lookup(mz_name);
KNI_MZ_CHECK(mz == NULL);
dev_info.mbuf_va = mz->addr;
mz = rte_memzone_lookup(mz_name);
KNI_MZ_CHECK(mz == NULL);
dev_info.mbuf_va = mz->addr;
@@
-520,3
+523,12
@@
rte_kni_unregister_handlers(struct rte_kni *kni)
kni->ops.config_network_if = NULL;
return 0;
}
kni->ops.config_network_if = NULL;
return 0;
}
+void
+rte_kni_close(void)
+{
+ if (kni_fd < 0)
+ return;
+
+ close(kni_fd);
+ kni_fd = -1;
+}