From 89247e1a736c19093fc1fb4372a7fff8bbfe845a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 24 Jun 2019 09:47:14 -0700 Subject: [PATCH] doc: update KNI guides Update KNI documentation to reflect current ethtool support. Replace references to out dated tools (ifconfig) with modern iproute2. Tshark is a better replacement for tcpdump. Signed-off-by: Stephen Hemminger Acked-by: Ferruh Yigit --- .../prog_guide/kernel_nic_interface.rst | 9 +++---- .../sample_app_ug/kernel_nic_interface.rst | 24 ++++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/doc/guides/prog_guide/kernel_nic_interface.rst b/doc/guides/prog_guide/kernel_nic_interface.rst index daf87f4a8e..5afd05c0a7 100644 --- a/doc/guides/prog_guide/kernel_nic_interface.rst +++ b/doc/guides/prog_guide/kernel_nic_interface.rst @@ -290,7 +290,8 @@ It then puts the mbuf back in the cache. Ethtool ------- -Ethtool is a Linux-specific tool with corresponding support in the kernel -where each net device must register its own callbacks for the supported operations. -The current implementation uses the igb/ixgbe modified Linux drivers for ethtool support. -Ethtool is not supported in i40e and VMs (VF or EM devices). +Ethtool is a Linux-specific tool with corresponding support in the kernel. +The current version of kni provides minimal ethtool functionality +including querying version and link state. It does not support link +control, statistics, or dumping device registers. + diff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst index a7e549d521..aac4ebd8d4 100644 --- a/doc/guides/sample_app_ug/kernel_nic_interface.rst +++ b/doc/guides/sample_app_ug/kernel_nic_interface.rst @@ -21,14 +21,14 @@ The FIFO queues contain pointers to data packets in the DPDK. This: * Provides a faster mechanism to interface with the kernel net stack and eliminates system calls -* Facilitates the DPDK using standard Linux* userspace net tools (tcpdump, ftp, and so on) +* Facilitates the DPDK using standard Linux* userspace net tools (tshark, rsync, and so on) * Eliminate the copy_to_user and copy_from_user operations on packets. The Kernel NIC Interface sample application is a simple example that demonstrates the use of the DPDK to create a path for packets to go through the Linux* kernel. This is done by creating one or more kernel net devices for each of the DPDK ports. -The application allows the use of standard Linux tools (ethtool, ifconfig, tcpdump) with the DPDK ports and +The application allows the use of standard Linux tools (ethtool, iproute, tshark) with the DPDK ports and also the exchange of packets between the DPDK application and the Linux* kernel. The Kernel NIC Interface sample application requires that the @@ -220,13 +220,13 @@ Enable KNI interface and assign an IP address: .. code-block:: console - # ifconfig vEth0_0 192.168.0.1 + # ip addr add dev vEth0_0 192.168.0.1 Show KNI interface configuration and statistics: .. code-block:: console - # ifconfig vEth0_0 + # ip -s -d addr show vEth0_0 The user can also check and reset the packet statistics inside the ``kni`` application by sending the app the USR1 and USR2 signals: @@ -234,16 +234,16 @@ application by sending the app the USR1 and USR2 signals: .. code-block:: console # Print statistics - # kill -SIGUSR1 `pidof kni` + # pkill -USR1 kni # Zero statistics - # kill -SIGUSR2 `pidof kni` + # pkill -USR2 kni Dump network traffic: .. code-block:: console - # tcpdump -i vEth0_0 + # tshark -n -i vEth0_0 The normal Linux commands can also be used to change the MAC address and MTU size used by the physical NIC which corresponds to the KNI interface. @@ -254,13 +254,19 @@ Change the MAC address: .. code-block:: console - # ifconfig vEth0_0 hw ether 0C:01:02:03:04:08 + # ip link set dev vEth0_0 lladdr 0C:01:02:03:04:08 Change the MTU size: .. code-block:: console - # ifconfig vEth0_0 mtu 1450 + # ip link set dev vEth0_0 mtu 1450 + +Limited ethtool support: + +.. code-block:: console + + # ethtool -i vEth0_0 When the ``kni`` application is closed, all the KNI interfaces are deleted from the Linux kernel. -- 2.20.1