From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by dpdk.org (Postfix) with ESMTP id E53BA2B9B for ; Thu, 6 Apr 2017 18:18:23 +0200 (CEST) Received: by mail-wr0-f182.google.com with SMTP id w11so63942183wrc.3 for ; Thu, 06 Apr 2017 09:18:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=64HQeqJKghrSHKIKEqhOVS+9lrpkBGHEc/iH+clGj/E=; b=d4m2jFu9zRM1JIdqAEbxCk58sNe5LiXsFUai4zs6ke/OvaQvLHL6qY38pY+gmQ8gRv 4UYKo79yNH00V6U0g1uoSV7neOKOvMDKERnL/HxcOCsP2JPcqzxMCsFdeANb7VzROVrG YSjDfWGP6r9leckXizNpiUEB9jEE0ItkUV3YCpCU3QFr3LM6Mnhj+dwXMeaFEATpcGnn 33BerCwZw9pdvUHmucV1ZrCpArXagrB91jbrSIC2Z8/LmdubE6j/gq/aiinyNt0EpQuT HOpvK7CmLQBGvnWoinXIQ4N2QKSpOqnAL4eJyHqgGSriSaoh4OXGNE0KFOZU2GKvrTXO H3iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=64HQeqJKghrSHKIKEqhOVS+9lrpkBGHEc/iH+clGj/E=; b=g622Invra3+qBMjBG9k143XXKyy/olYR+SrbsCBCFqdbM+PJv49lGC7VHnq+w6svCb nV7LMIB85ng18J6+GDx8BZj3zYaZR1uGgh0LiQSW7lmIwuYNyNqFVl4LRv8r/VUklb9N /jLzraigbyb8Fnzu2O/fL94LvPuNgHkSXTYkEF2S4IB+CdgLssL+f1tauMartSuUn/Ht QS1P553/mTwO1JopM52ow2+4Tzx19+RzYkd68Z5wOt0R5pf1nKUKarM7qgQzR72Ur/eH 1+GFvpNdb3kWjWtc11NC1QuUddqo5NqvdvJ6PLaf0lqleebwiCvuC/U65ut4b1HGUsoh hLYg== X-Gm-Message-State: AFeK/H3QxBaEIhXz5/f72eMDFE+BgjuCytlEE/ZxHzjKcX+03Wjvw4gJxMGV3wAU5hp5hIJMXLWIO0xBwf6yWA== X-Received: by 10.28.132.16 with SMTP id g16mr14984073wmd.87.1491495502499; Thu, 06 Apr 2017 09:18:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.173.176 with HTTP; Thu, 6 Apr 2017 09:18:21 -0700 (PDT) From: Shivaram Mysore Date: Thu, 6 Apr 2017 09:18:21 -0700 Message-ID: To: ovs-discuss@openvswitch.org, users@dpdk.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: [dpdk-users] identifying physical dpdk-ports for use with OVS X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 16:18:24 -0000 Hello, I wanted to just share info about how we can identify DPDK ports for use with OVS. Initially, when we do: # *dpdk-devbind --status* Network devices using kernel driver =================================== ... 0000:82:00.0 'I350 Gigabit Network Connection' if=enp130s0f0 drv=igb unused=vfio-pci 0000:82:00.1 'I350 Gigabit Network Connection' if=enp130s0f1 drv=igb unused=vfio-pci 0000:82:00.2 'I350 Gigabit Network Connection' if=enp130s0f2 drv=igb unused=vfio-pci 0000:82:00.3 'I350 Gigabit Network Connection' if=enp130s0f3 drv=igb unused=vfio-pci 0000:83:00.0 'I350 Gigabit Network Connection' if=ens2f0 drv=igb unused=vfio-pci 0000:83:00.1 'I350 Gigabit Network Connection' if=ens2f1 drv=igb unused=vfio-pci 0000:83:00.2 'I350 Gigabit Network Connection' if=ens2f2 drv=igb unused=vfio-pci 0000:83:00.3 'I350 Gigabit Network Connection' if=ens2f3 drv=igb unused=vfio-pci ... Then we do: # *dpdk-devbind --bind=vfio-pci 0000:82:00.0 0000:82:00.1 0000:82:00.2 0000:82:00.3 0000:83:00.0 0000:83:00.1 0000:83:00.2 0000:83:00.3* Now we do # *dpdk-devbind --status* Network devices using DPDK-compatible driver ============================================ 0000:82:00.0 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:82:00.1 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:82:00.2 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:82:00.3 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:83:00.0 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:83:00.1 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:83:00.2 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb 0000:83:00.3 'I350 Gigabit Network Connection' drv=vfio-pci unused=igb --- oops we lost information about interface name (ex. ens2f0). This is problem to identify physical ports if you don't have information about PCI/slot address info and interface name mapping. Also, doing a ip a on command line won't give you interface names as they are assigned to DPDK!! So, to identify port by blinking led we cannot do something like: # *ethtool -p enp130s0f0 5* Cannot identify NIC: No such device With the latest OVS (2.7), we can do (*note*: we no longer need "dpdk" prefix to port name): # ovs-vsctl add-port ovs-ip64-br0 enp130s0f0 -- set Interface enp130s0f0 type=dpdk options:dpdk-devargs=0000:82:00.0 # ovs-vsctl add-port ovs-ip64-br0 enp130s0f1 -- set Interface enp130s0f1 type=dpdk # options:dpdk-devargs=0000:82:00.1 # ovs-vsctl add-port ovs-ip64-br0 enp130s0f2 -- set Interface enp130s0f2 type=dpdk options:dpdk-devargs=0000:82:00.2 # ovs-vsctl add-port ovs-ip64-br0 enp130s0f3 -- set Interface enp130s0f3 type=dpdk options:dpdk-devargs=0000:82:00.3 # ovs-vsctl add-port ovs-ip64-br0 ens2f0 -- set Interface ens2f0 type=dpdk options:dpdk-devargs=0000:83:00.0 # ovs-vsctl add-port ovs-ip64-br0 ens2f1 -- set Interface ens2f1 type=dpdk options:dpdk-devargs=0000:83:00.1 # ovs-vsctl add-port ovs-ip64-br0 ens2f2 -- set Interface ens2f2 type=dpdk # options:dpdk-devargs=0000:83:00.2 # ovs-vsctl add-port ovs-ip64-br0 ens2f3 -- set Interface ens2f3 type=dpdk options:dpdk-devargs=0000:83:00.3 Which will result in: # *ovs-vsctl show* 92e46601-ca42-4743-8d7d-838c8fff515e Bridge "ovs-ip64-br0" Controller "tcp:10.20.5.5:6653" is_connected: true Controller "tcp:10.20.5.5:6654" is_connected: true Port "ens2f0" Interface "ens2f0" type: dpdk options: {dpdk-devargs="0000:83:00.0"} Port "enp130s0f2" Interface "enp130s0f2" type: dpdk options: {dpdk-devargs="0000:82:00.2"} Port "ovs-ip64-br0" Interface "ovs-ip64-br0" type: internal Port "ens2f1" Interface "ens2f1" type: dpdk options: {dpdk-devargs="0000:83:00.1"} Port "ens2f3" Interface "ens2f3" type: dpdk options: {dpdk-devargs="0000:83:00.3"} Port "enp130s0f0" Interface "enp130s0f0" type: dpdk options: {dpdk-devargs="0000:82:00.0"} Port "ens2f2" Interface "ens2f2" type: dpdk options: {dpdk-devargs="0000:83:00.2"} Port "enp130s0f1" Interface "enp130s0f1" type: dpdk options: {dpdk-devargs="0000:82:00.1"} Port "enp130s0f3" Interface "enp130s0f3" type: dpdk options: {dpdk-devargs="0000:82:00.3"} ovs_version: "2.7.0" Now we know what ports to connect to. Hope this helps /Shivaram