kni: create interface in current network namespace
authorTakayuki Usui <takayuki@midokura.com>
Wed, 3 Dec 2014 01:37:26 +0000 (10:37 +0900)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 3 Dec 2014 19:45:19 +0000 (20:45 +0100)
commit999284fcc3043cf1c1d15e825ed7d77cf491f2fe
tree54e54953ad5b0c8508f8d851d1e8132cb57bea4f
parent2f423f6385bf2e845bdf53be09651225479ae309
kni: create interface in current network namespace

With this patch, KNI interface (e.g. vEth0) is created in the
network namespace where the DPDK application is running.
Otherwise, all interfaces are created in the default namespace
in the host.

put_net() is required, since get_net_ns_by_pid() increments
the reference counter of the network namespace with get_net().

Signed-off-by: Takayuki Usui <takayuki@midokura.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
lib/librte_eal/linuxapp/kni/kni_misc.c