tuntap: Introduce per thread structure to suport multi-threads (VPP-1012) 97/8697/1
authorSteven <sluong@cisco.com>
Thu, 5 Oct 2017 07:12:33 +0000 (00:12 -0700)
committersteven luong <sluong@cisco.com>
Fri, 6 Oct 2017 13:44:01 +0000 (13:44 +0000)
commitfc7e71100306a9313ce8346576b7d86abd6b401e
treedc1e93f46645124b59c59c0371a0b50b6f9d252a
parent67700d41169ac37d21c400949a316750eabad969
tuntap: Introduce per thread structure to suport multi-threads (VPP-1012)

https://gerrit.fd.io/r/#/c/8551/ decoupled the global variable,
namely tm->iovecs from TX and RX. However, to support multi-threads,
we have to eliminate the use of this global variable with per thread
variable. I notice that rx_buffers must also be per thread variable.
So, we introduce per thread struct to contain rx_buffers and iovecs.
Each thread will find the per thread struct with thread_index.

Change-Id: I61abf2fdace8d722525a382ac72f0d04a173b9ce
Signed-off-by: Steven <sluong@cisco.com>
(cherry picked from commit 4cd257667406d0500a81323ef91f5c7c8c902b25)
src/vnet/unix/tapcli.c
src/vnet/unix/tuntap.c