From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BN3-obe.outbound.protection.outlook.com (mail-bn3nam01on0082.outbound.protection.outlook.com [104.47.33.82]) by dpdk.org (Postfix) with ESMTP id 187F15689 for ; Tue, 11 Apr 2017 21:00:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=UqUXJFQVtdeUdY3vjlf2AJpIFAkFdnA0eFUSsfoSP7s=; b=ByjlY82NxWRiDDsgaGJTuMrYZ/6becnkAl6p/KwbxUR70IX5YSoOUDQY0Y/u1FvNlnxPNxmWXXa1SB9TLq8MQTryMN0wEAqoaKGZe0Bc87x0dEJyVNZvSphRAuD/cM94IJX+PsZKlWslOFMkykszMF+r0UTuNlX1W8wzvz3JZmI= Authentication-Results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=caviumnetworks.com; Received: from lio357.in.caveonetworks.com (14.140.2.178) by DM3PR07MB2284.namprd07.prod.outlook.com (10.164.33.158) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Tue, 11 Apr 2017 19:00:01 +0000 From: Shijith Thotton To: Ferruh Yigit , John McNamara , Rasesh Mody , Harish Patil Cc: dev@dpdk.org Date: Wed, 12 Apr 2017 00:26:49 +0530 Message-Id: <1491937010-16553-10-git-send-email-shijith.thotton@caviumnetworks.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1491937010-16553-1-git-send-email-shijith.thotton@caviumnetworks.com> References: <1491465117-11252-1-git-send-email-shijith.thotton@caviumnetworks.com> <1491937010-16553-1-git-send-email-shijith.thotton@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0027.INDPRD01.PROD.OUTLOOK.COM (10.164.147.34) To DM3PR07MB2284.namprd07.prod.outlook.com (10.164.33.158) X-MS-Office365-Filtering-Correlation-Id: ca2eafcb-6fe6-48ad-ada6-08d4810cf66f X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:DM3PR07MB2284; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 3:jY1IEaRIm2ExFQhivheDLSWAxd7esfxrI31dzqyxTxfhZRQ9FaJpSZEp8v8Lz21YastK+ft3yJg0hYilMYFod/VCx60m2rgmwW9uNld8ljVkDDTIvMRzdLIJF3kpdkBo4z4Q2fnk5mYsR8OjD0xAJK6bcasFVPO/8eA9tx8p3QRQDuPaj66obWRbNY5dMoSda31JpzhBxFEqSIXo/jljZi0bVx4SX7GYM3MRgUFSgnrTx5NnjTTmy6rf9Bsm016UhGwQ0N6e1U9bJ1jZqjstAtiERkaXIF359Ewy4+boJ9imTp48h20VQ4/EdXIFNABS0Dw/msBZ6TOxlowFxlrNTw==; 25:79m0jI5LT6PITfnfJCWbxfHJzs50FatXUt4Cd8BjolFDs9VY8bBz6jE6jzKVqoUcfico4/Y0qqBkGH7+IK3wxFLzVXgI+GOnBR16wQyX1k0fR+pwhjUlm9/ZvudBMCjCbfuDcYaotlGe3uHGGPQ5l2/qsQSyr10XZtASki8++WFlCMv9blkLrfPq2qQ3k1cMjRUHzy9qztC0o6da4Jsvhxo5AGTtilro9nVQNd9AnUQreJD3IlYIp5OIM8H3KyU3BpC147g05S39Ki7Tti+MyqBtt79YmJujsLD4ZGg60M1Biwot/fLlGZBTmj4HP6/ry03qkOHvw8gm7jaVlSCISBACcRMXSzu8RJm8CkOBveL1KnG0z31PqMWchfK+JMG+NXObahf0YS17Tg2VCM5REhVegxR06RTuGegPtR/5dG84OoQy7BUfPm7uEl8WWB3bMLmeC8SzN4wA2pt7a2SbDA== X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 31:dFjPzy0C2Up9kpqvtM5UiuJDA6YRhdXRNPq1+5DZA4v6TPe3UwVxRJJAVqO73I23JrzdZpKO0mfe21YVwcBmiJa9Nx5wbBK5//u24f2Ze5w8uQLmCdkYJFQdumnGLbD5QH0A5AYGnrefzbzFqYqApzZyzH/EyT/yjLQBwlUtCMn81v35oxiOnVZBlco3/b4QkFqAN6QkI1+VIQEoESlyM/7VV+0ih7Z9Gb+myl/OXvI=; 20:n832V/QIVEynt/yuuR+LjqjRqiJMyVidYJ2CCM0dkXqtT2fIVY8hG/ju7VHSmP+4LUVuqrGnG8l2oFq/hUyVfn2+UmUOhcJ/kt7cF9IS0j6kT8VxJisE+nuzyDCVp5YuZcBLPTGjAJ3SUP7ZROt5Qxfnin8vfe0633ecPCegBSD7bV7b/kpG12fjxrfusSQVeYuH4kaLKzwaH+Q7idi3XdIze1KKBfy/1N6CCWmitCwQGCBIqRyyjrnNmia1RLueHdFmTPC8BMgFJKsML/oYPF8xv91VXGiCeEM2W+9NioAByNKAwM4okonh/HyuDMl8GoPRzKAzySxORi/wDq+VdUYx4ud2dyeqJU9/+iiYXj69ErThg+FvjC4EmhX4+RIacKDh7pbGsuudc43QkpNSHEOgLZaCVy4kVVk/kJnUswu3HeJHt/SRZFIT4O8e1KqLqQdl/Xt/CYX76tbnLA5v8gTPzEzirz0O9r5aR7VKtdXxcBqQ2AnHBIuG2e0ydVXzOz90ymn3MO45Cb2su6sCtNypUCJYjnsCcR2hRCc3ydbiwyhqUDE7K+ThZz146ckPvo6OHXDiKEXhoTJfSjnFxs9uPZoi02ruhPakOP27ovo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(20161123555025)(20161123564025)(6072148); SRVR:DM3PR07MB2284; BCL:0; PCL:0; RULEID:; SRVR:DM3PR07MB2284; X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 4:W1N/w7ZimzPFTjn3T2E8frwUQiXgSQxcYW2CsiFN+cvZU7+vLEYJ7hnGjIkZe8gE3jnjIXD9ctsZv9DkA2ZtBbCo/3+kxqDy9MqJ3/wjFVQGj6dYjYqjqYYgzdkoOxDa7Jq29wciyrvP24G/ZdS6T57rYgm97sDtxw4bJscBGA44UxTXuxvCvaegeXKZ/9xhKGz0GD6c2MfUyehV52qKfdH5EARIbn90NgG1k001Sf0WVDaRchRtrXwFNstbqHrUrhTSJ7XVE3eMU3WW53vX4fsuQD7ovrXHE+dBoGvO4TJVf5cFeOuMUuOtiDbuygqBN3pc5u9UCYizjVcLPF2CXgn1sdwQ/q325BcWkF5rfkWw4F6GtggaeKX8gbZwTBXnRwWdLxMZie+NCpPsl0KFlrufaBnc2Q3A2T61fF1rnfdliIXSGeqkIkzK5V7NDp9aeWhAuYOYb24wBr/+HvZOZi8+qJh+n8+2uzRKKHZvwG0RXJrgO/nFKgLhpjFRyjLP8YciqTfxEBw7PJBWPAY5OvxD1lo8FhcfqqKxhCz7dAsycE6w/hz72QgtDnzMwxbn5ao2Bu57SYDMKNQld9l1Vk6NqJz4Vyjs80fTR8AbTIQNu2IU6fbnl5NwqpAwXCzzX0NFywEOeAMqjAJfNqR3QMANVY+d/l3Ek9LRSKCG8p9kYaVutDa+JR3Kj7CHC6eEEiyKmHHuBp+AIms8Fz9JKnfJcM98nHEwlUxXfdu1EHGZ/T3fX9R6yzjJwIBEmwHL X-Forefront-PRVS: 0274272F87 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39410400002)(39850400002)(39400400002)(5660300001)(6506006)(5003940100001)(66066001)(2950100002)(25786009)(42186005)(3846002)(6116002)(47776003)(6486002)(4720700003)(42882006)(6666003)(33646002)(5009440100003)(189998001)(305945005)(50466002)(81166006)(8676002)(36756003)(2906002)(6512007)(53936002)(4326008)(7736002)(38730400002)(48376002)(50226002)(76176999)(50986999)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR07MB2284; H:lio357.in.caveonetworks.com; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR07MB2284; 23:/7t6oSgn96C60aznKTaTajXfThXLA5D2XZKm+Zkb8?= =?us-ascii?Q?hsFbVr8DTrCwSFK+VF3Ofpx55HDm9i/a/6d/Nzx9pppITgS80U11l5Zj9RU2?= =?us-ascii?Q?Wyb5CpXLvsDvyOy/gBKIaCILf1E4mFH5mhVRCzny6HOt9zxTBX5z+xXojz4Y?= =?us-ascii?Q?ZJqjn+Jde3xBQlH8iSqTV6dQjO6Fp9B70A6H6zqz1AEVazLh+7XaZ/RiKvDO?= =?us-ascii?Q?bxywaymzksQAHTKkDJ09Lff4wPNyi8TXn1JoK4bkY1cdL/3p4pOu89pQ2T5s?= =?us-ascii?Q?/oR08kgA48MRd5Lzruw52VBIlomALil6t7HbsNyBq3Ez+Rhtc5nKI64cl5bU?= =?us-ascii?Q?usbcy0Cn9gGdULkBMB7E4mXZT3oIyY0w86qapsqYmT2C65/hRZTKSz17ZC6R?= =?us-ascii?Q?MmJngva/qB3ZEGosASnW7fO1356ZuWxWBDGlmhTNECdp/QXdXH1xeWeukkZz?= =?us-ascii?Q?R3CU2/NjqU+ib2DVTXNuXR3IqFs1kp7dp6Fh/SrsPHYwAD1j6ogKLPeLUJXs?= =?us-ascii?Q?jmXmhNFoS7+x6VuuI10xeDM/XcVxOBGz4yBZ7CYM0uUYmkVgqUODAA2DvUZf?= =?us-ascii?Q?0qcGrnY5/oHdf2PyezLu8AIg4wssPGt5Av4zCYY66J431dEEh9rOwzSBM2vP?= =?us-ascii?Q?HueoCvFhd97ii7tg2YUasezTGyQpkDNpQR3zgBdmBwBGKJcxsTsIIzR6CSNP?= =?us-ascii?Q?mOVgifp82j74f+ILvUrECyKXD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nCd4D8X0M1QkQwydlQ==; 24:Ni0aGObRcGAKXCKl2nvKARj/yMViXjQm3KMMyhb/5xcAPBi2q3V7mLE7i7rfz1yo8l18+1Y/+eJq1PnPaacZMZ66e+QL2oFtrOYKmZUJGwA= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM3PR07MB2284; 7:1G6hhDD6FD2gMCQvDQfWTBIOnK1pOziLwfM3cjXKvmnzRpbqDoMUaP25qUTbXw21/+YbZZM5r+QZXY0yQ5h5hIZ8ZYaTk8l6kdBeiHIUN9foxpc+WjfpySLsjX0jhjgT/sg2NCsy0IVNd4w50t64ABv0OD+B7jhMz6cdAPtAyXvS+5eTWuG3ORdR1tebTnzp4SIXWrUcKcDAlqHiVV3Aol7I6wikfOdJ6mAEEcyVfLJ3+2Vnhkhjgz1GTvYSPr09iSYODJ15TnwKJWIdl1mqo0+Eyyc3bH94ZrvZcc7rhwnzvjMdrYFnR/Sd9/WJerF+4ncljf1JB2Vi+KFrY9N+rg== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2017 19:00:01.7228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR07MB2284 Subject: [dpdk-dev] [PATCH v2 09/10] doc: refer PMD compile and test section from qede doc 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: , X-List-Received-Date: Tue, 11 Apr 2017 19:00:05 -0000 Refer the section which explains driver compilation and running of testpmd in Linux, instead of describing it in driver documentation. Signed-off-by: Shijith Thotton Acked-by: John McNamara --- doc/guides/nics/qede.rst | 176 ++++++++++++++++++----------------------------- 1 file changed, 66 insertions(+), 110 deletions(-) diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst index eacb3da..afe2df8 100644 --- a/doc/guides/nics/qede.rst +++ b/doc/guides/nics/qede.rst @@ -124,64 +124,96 @@ enabling debugging options may affect system performance. Empty string indicates driver will pick up the firmware file from the default location. -Driver Compilation -~~~~~~~~~~~~~~~~~~ +Driver compilation and testing +------------------------------ -To compile QEDE PMD for Linux x86_64 gcc target, run the following ``make`` -command:: +Refer to the document :ref:`compiling and testing a PMD for a NIC ` +for details. - cd - make config T=x86_64-native-linuxapp-gcc install +SR-IOV: Prerequisites and Sample Application Notes +-------------------------------------------------- -To compile QEDE PMD for Linux x86_64 clang target, run the following ``make`` -command:: +This section provides instructions to configure SR-IOV with Linux OS. - cd - make config T=x86_64-native-linuxapp-clang install +**Note**: librte_pmd_qede will be used to bind to SR-IOV VF device and Linux native kernel driver (QEDE) will function as SR-IOV PF driver. Requires PF driver to be 8.10.x.x or higher. -To compile QEDE PMD for FreeBSD x86_64 clang target, run the following ``gmake`` -command:: +#. Verify SR-IOV and ARI capability is enabled on the adapter using ``lspci``: - cd - gmake config T=x86_64-native-bsdapp-clang install + .. code-block:: console -To compile QEDE PMD for FreeBSD x86_64 gcc target, run the following ``gmake`` -command:: + lspci -s -vvv - cd - gmake config T=x86_64-native-bsdapp-gcc install -Wl,-rpath=\ - /usr/local/lib/gcc49 CC=gcc49 + Example output: + .. code-block:: console -Sample Application Notes -~~~~~~~~~~~~~~~~~~~~~~~~ + [...] + Capabilities: [1b8 v1] Alternative Routing-ID Interpretation (ARI) + [...] + Capabilities: [1c0 v1] Single Root I/O Virtualization (SR-IOV) + [...] + Kernel driver in use: igb_uio -This section demonstrates how to launch ``testpmd`` with QLogic 4xxxx -devices managed by ``librte_pmd_qede`` in Linux operating system. +#. Load the kernel module: -#. Request huge pages: + .. code-block:: console + + modprobe qede + + Example output: .. code-block:: console - echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/ \ - nr_hugepages + systemd-udevd[4848]: renamed network interface eth0 to ens5f0 + systemd-udevd[4848]: renamed network interface eth1 to ens5f1 -#. Load ``igb_uio`` driver: +#. Bring up the PF ports: .. code-block:: console - insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko + ifconfig ens5f0 up + ifconfig ens5f1 up + +#. Create VF device(s): + + Echo the number of VFs to be created into ``"sriov_numvfs"`` sysfs entry + of the parent PF. -#. Bind the QLogic 4xxxx adapters to ``igb_uio`` loaded in the - previous step: + Example output: .. code-block:: console - ./usertools/dpdk-devbind.py --bind igb_uio 0000:84:00.0 0000:84:00.1 \ - 0000:84:00.2 0000:84:00.3 + echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs -#. Start ``testpmd`` with basic parameters: - (Enable QEDE_DEBUG_INFO=y to view informational messages) + +#. Assign VF MAC address: + + Assign MAC address to the VF using iproute2 utility. The syntax is:: + + ip link set vf mac + + Example output: + + .. code-block:: console + + ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8 + + +#. PCI Passthrough: + + The VF devices may be passed through to the guest VM using ``virt-manager`` or + ``virsh``. QEDE PMD should be used to bind the VF devices in the guest VM + using the instructions from Driver compilation and testing section above. + + +#. Running testpmd + (Enable QEDE_DEBUG_INFO=y to view informational messages): + + Refer to the document + :ref:`compiling and testing a PMD for a NIC ` to run + ``testpmd`` application. + + Example output: .. code-block:: console @@ -236,79 +268,3 @@ devices managed by ``librte_pmd_qede`` in Linux operating system. Port 3 Link Up - speed 25000 Mbps - full-duplex Done testpmd> - - -SR-IOV: Prerequisites and Sample Application Notes -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This section provides instructions to configure SR-IOV with Linux OS. - -**Note**: librte_pmd_qede will be used to bind to SR-IOV VF device and Linux native kernel driver (QEDE) will function as SR-IOV PF driver. Requires PF driver to be 8.10.x.x or higher. - -#. Verify SR-IOV and ARI capability is enabled on the adapter using ``lspci``: - - .. code-block:: console - - lspci -s -vvv - - Example output: - - .. code-block:: console - - [...] - Capabilities: [1b8 v1] Alternative Routing-ID Interpretation (ARI) - [...] - Capabilities: [1c0 v1] Single Root I/O Virtualization (SR-IOV) - [...] - Kernel driver in use: igb_uio - -#. Load the kernel module: - - .. code-block:: console - - modprobe qede - - Example output: - - .. code-block:: console - - systemd-udevd[4848]: renamed network interface eth0 to ens5f0 - systemd-udevd[4848]: renamed network interface eth1 to ens5f1 - -#. Bring up the PF ports: - - .. code-block:: console - - ifconfig ens5f0 up - ifconfig ens5f1 up - -#. Create VF device(s): - - Echo the number of VFs to be created into ``"sriov_numvfs"`` sysfs entry - of the parent PF. - - Example output: - - .. code-block:: console - - echo 2 > /sys/devices/pci0000:00/0000:00:03.0/0000:81:00.0/sriov_numvfs - - -#. Assign VF MAC address: - - Assign MAC address to the VF using iproute2 utility. The syntax is:: - - ip link set vf mac - - Example output: - - .. code-block:: console - - ip link set ens5f0 vf 0 mac 52:54:00:2f:9d:e8 - - -#. PCI Passthrough: - - The VF devices may be passed through to the guest VM using ``virt-manager`` or - ``virsh``. QEDE PMD should be used to bind the VF devices in the guest VM - using the instructions outlined in the Application notes above. -- 1.8.3.1