From patchwork Sat Jun 8 00:20:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 54561 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 6807A1BCDF; Sat, 8 Jun 2019 02:20:32 +0200 (CEST) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id 8CADB1BCA0 for ; Sat, 8 Jun 2019 02:20:21 +0200 (CEST) Received: by mail-pl1-f194.google.com with SMTP id e5so1396825pls.13 for ; Fri, 07 Jun 2019 17:20:21 -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=y68dwzlp/uKX/ODO60y/TWPyhj9crd49HaKpu5GVO5B197xLS0n0l+ROid+V6J5tgG X+P+i6C4emv+911Nts4fFP2mwMnGaWqU9FmuVd1KlQz/rNZeEm+rhc+N6xbIRZ3Y+KRl w6Tz784L2fbffRS2Ib9pyH2r5J1boMIbpL7aESoghjs6qjixu/p2SXkhfX25xSGeXRb3 MSxEN4DfZxlJvacvT5ipTuVKhCQON6+T+yuntS8SffU+4J11GWT2MthBEYcmGbzdn0VP o7xKqLhFa1Gi9exKle97yqLXIbWzth/kjW1Pwr6TESbrR7GCzmOCng9G/7tCSekkabfY 4bsQ== 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=fttdamlECm+JexC/x76yTrq2bm7qU7GdOLVMVDu3AtGX4v6YZmSOgtzycluAKYAy3R EiUbOw1LPAqa7r159rt4m4e6Wd7D5ACBkM44Xh4cUaECxsi8YZRt2d2vL/1D/wEgKe8W qwqJJsXQDTrr4VuKUfn/X+T6LNAoJQYlXkd/OAY76p3pWIPkYmXYoRPfHr/fmtnFQjyu M2VZRCA8GFtOj7yKKumyvECG4k4Gj/OJ51sbFcsTvUHgsVbnV5EJAfYefsj5GyKce6Wr lek4++TY4l0aG/Jjj3eUCZtWYk3Ig8SpwWS/iGwrjl5tIE83YbaJ9sWIaZAjA4A1ZJgw pgLg== X-Gm-Message-State: APjAAAWep2TCBEZU1dGjtF3ZVW3nm114hvJPsLsFXKGe/QbCChH+0+DD 6nUyAYHYHtXZf7n2q1u30CDIFc2vuVs= X-Google-Smtp-Source: APXvYqwl78dZq6+FChK+VUbHarjou18rwDUzEfI7PGqUZg9FVWOOL+6zJf6oh54N+VwWxABAENk6Ew== X-Received: by 2002:a17:902:67:: with SMTP id 94mr59568467pla.64.1559953220782; Fri, 07 Jun 2019 17:20:20 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id n184sm4012463pfn.21.2019.06.07.17.20.19 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 17:20:19 -0700 (PDT) From: Stephen Hemminger To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Stephen Hemminger Date: Fri, 7 Jun 2019 17:20:03 -0700 Message-Id: <20190608002003.19942-10-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190608002003.19942-1-stephen@networkplumber.org> References: <20190608002003.19942-1-stephen@networkplumber.org> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 9/9] 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.