summaryrefslogtreecommitdiff
path: root/lib/librte_kni
diff options
context:
space:
mode:
authorIntel <intel.com>2013-09-18 12:00:00 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-10-09 16:16:15 +0200
commit9c61145ff6f977dd55ccf6c293f842eb768f45c2 (patch)
treed04e576c3a1d0bf0b59963e0de137c995ccccb2a /lib/librte_kni
parentfbf895d44cfebf7bd92bb4edf3f7ff15365e57a5 (diff)
downloaddpdk-9c61145ff6f977dd55ccf6c293f842eb768f45c2.zip
dpdk-9c61145ff6f977dd55ccf6c293f842eb768f45c2.tar.gz
dpdk-9c61145ff6f977dd55ccf6c293f842eb768f45c2.tar.xz
kni: allow multiple threads
In this new mode, each KNI device has its own kernel thread for Rx. The core affinity is configurable. Signed-off-by: Intel
Diffstat (limited to 'lib/librte_kni')
-rw-r--r--lib/librte_kni/rte_kni.c2
-rw-r--r--lib/librte_kni/rte_kni.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c
index 8e8741f..684af18 100644
--- a/lib/librte_kni/rte_kni.c
+++ b/lib/librte_kni/rte_kni.c
@@ -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.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;
diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
index 8be6281..694a899 100644
--- a/lib/librte_kni/rte_kni.h
+++ b/lib/librte_kni/rte_kni.h
@@ -80,10 +80,13 @@ struct rte_kni_conf {
* memzone name.
*/
char name[RTE_KNI_NAMESIZE];
+ uint32_t core_id; /* Core ID to bind kernel thread on */
uint16_t group_id; /* Group ID */
unsigned mbuf_size; /* mbuf size */
struct rte_pci_addr addr;
struct rte_pci_id id;
+
+ uint8_t force_bind : 1; /* Flag to bind kernel thread */
};
/**