From patchwork Mon Jun 10 17:51:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 54630 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1895D1C1C0; Mon, 10 Jun 2019 19:52:17 +0200 (CEST) Received: from mail-pg1-f196.google.com (mail-pg1-f196.google.com [209.85.215.196]) by dpdk.org (Postfix) with ESMTP id 5A63E1C193 for ; Mon, 10 Jun 2019 19:52:08 +0200 (CEST) Received: by mail-pg1-f196.google.com with SMTP id v9so3712808pgr.13 for ; Mon, 10 Jun 2019 10:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zwcpHj9mObwR/3WCwV5l4XnojjP3r4EDgCtfcfF1G0s=; b=RFyvWUw0c9nZ2Q0h5BC3ZnT/BCYtY/GUEeJemXY/7z94A9ZQfeyh9Cwe06ZcHdlhEg 1edOtPhP7+dZXylcoVqyCx4OA5SKZUlWlMDHB1wx1pVYdfK7/N70xhD9waK7KF+SGDRm r6uCbWqWJniAwkiNLcOHviXRfyHbdkY0ZUHK2jzQZ+s/MzoHp4lqRQsMcaD3EXI25q0n cxXHHy30LfZ3Lnjw5bJnvDt/fpyIeP2mxoYmLoOtYINRROamWjYBMn3Z5B4/mMCTdQ2m Ire3imZWPaFkU4J2Pw41mZ/U9Oebrknpw2lO2zRVd0Jdt1lbOLgGhPKDjT2LSwAtSZ4L TFMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zwcpHj9mObwR/3WCwV5l4XnojjP3r4EDgCtfcfF1G0s=; b=obXUw5jLc8yKYJRS62a8Lr8nB43paBN5naLvsj6XNVUqEieHRkCSZ3mG1aqzPWlgL4 W2tdKKUGtRZTD43w+kXSiJIqsoofYYzBQAtD9rqiqBC/vzfO4IrpblLwhtMIsYfvCCyG t1tUnpkfMkGK68XzYhqNuoQ2V1T97+W3cpxEUUXDg+iEDrhLaIQrIqVXGoxNwihETaxj n8NkOY1GWRi+9dz6jbG3MH/i5WnpqEoGVvNGzEpDuIdGmTJRWqb2q4ntEIyDvyIWzKQ2 x1uPrEmLIX+X7UwKnRiEMu+NaKce3pFx7kOr8/d3AATn7qRn5kMaJRMLtt5Tj2xN70FS f/bg== X-Gm-Message-State: APjAAAVVcXnLk/Sw0veomoXCCGZ4TbWauljzJK1t4RqOUT1RhgeTqQiS jJstm0s64PmGgVMpoJxDxCJ5lw== X-Google-Smtp-Source: APXvYqz3kD6ZasfSFZ7Pb80gPMNnehddSdOLQluBl+JrLUU25FOFIiWh/6JkpOC3eJSd8C6B9WnWgw== X-Received: by 2002:a63:1e59:: with SMTP id p25mr16476698pgm.270.1560189127458; Mon, 10 Jun 2019 10:52:07 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id l38sm131656pje.12.2019.06.10.10.52.06 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 10 Jun 2019 10:52:06 -0700 (PDT) From: Stephen Hemminger To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Stephen Hemminger Date: Mon, 10 Jun 2019 10:51:55 -0700 Message-Id: <20190610175155.21374-8-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190610175155.21374-1-stephen@networkplumber.org> References: <20190610175155.21374-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH v2 7/7] doc: update KNI documentation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Make the KNI documentation reflect modern kernel networking. Ifconfig has been superseded by iproute2 for 15 years. Iproute2 is well maintained, supports current feature set. Ethtool is no longer supported by KNI. Tshark is a better replacement for tcpdump. Signed-off-by: Stephen Hemminger --- .../sample_app_ug/kernel_nic_interface.rst | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/guides/sample_app_ug/kernel_nic_interface.rst b/doc/guides/sample_app_ug/kernel_nic_interface.rst index a7e549d5213a..422bd8c98465 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 (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,13 @@ 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 When the ``kni`` application is closed, all the KNI interfaces are deleted from the Linux kernel.