From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 9B87811C5 for ; Tue, 21 Mar 2017 13:33:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490099614; x=1521635614; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=yiWZKKXvX7QUOzxibehBZLifOq1XoSV+NU6t19R2gpY=; b=ArZVdtCDDWiF4ooRIcv+4rfK7zZJFsdSdetBB7A8yvNhaMjuZyh/aGvv E0hdU6vgEvpGDY9sIn+kGwLHkyXiXg==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Mar 2017 05:33:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,198,1486454400"; d="scan'208";a="79377420" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.122]) ([10.237.220.122]) by fmsmga006.fm.intel.com with ESMTP; 21 Mar 2017 05:33:30 -0700 To: Shijith Thotton References: <1487669225-30091-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-1-git-send-email-shijith.thotton@caviumnetworks.com> <1488454371-3342-47-git-send-email-shijith.thotton@caviumnetworks.com> Cc: dev@dpdk.org, john.mcnamara@intel.com, Jerin Jacob , Derek Chickles , Venkat Koppula , Srisivasubramanian S , Mallesham Jatharakonda From: Ferruh Yigit Message-ID: <9085133d-c06e-21f5-0b41-4a7d4281bb5e@intel.com> Date: Tue, 21 Mar 2017 12:33:30 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <1488454371-3342-47-git-send-email-shijith.thotton@caviumnetworks.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2 46/46] doc: add doc for liquidio 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, 21 Mar 2017 12:33:35 -0000 On 3/2/2017 11:32 AM, Shijith Thotton wrote: > Added doc/guides/nics/liquidio.rst and > doc/guides/nics/features/liquidio.ini. Updated release notes. > > Signed-off-by: Shijith Thotton > Signed-off-by: Jerin Jacob > Signed-off-by: Derek Chickles > Signed-off-by: Venkat Koppula > Signed-off-by: Srisivasubramanian S > Signed-off-by: Mallesham Jatharakonda <...> > --- /dev/null > +++ b/doc/guides/nics/features/liquidio.ini > @@ -0,0 +1,29 @@ > +; > +; Supported features of the 'LiquidIO' network poll mode driver. > +; > +; Refer to default.ini for the full list of available PMD features. > +; > +[Features] > +Link status = Y > +Link status event = Y > +MTU update = Y > +Jumbo frame = Y > +Scattered Rx = Y > +Allmulticast mode = Y > +RSS hash = Y > +RSS key update = Y > +RSS reta update = Y > +SR-IOV = Y This has been discussed before, but I am not still clear what does setting this feature in VF driver means. What is the intention here? > +VLAN filter = Y > +CRC offload = Y > +VLAN offload = P > +L3 checksum offload = Y > +L4 checksum offload = Y > +Inner L3 checksum = Y > +Inner L4 checksum = Y > +Basic stats = Y > +Extended stats = Y > +Linux UIO = Y > +Linux VFIO = Y > +x86-64 = Y Is other platforms not supported? If that is the case, PMD should not be enabled by default. > +Usage doc = Y Instead of features file in one patch, can you please split some into other patches? Each patch that implements the feature can update the relevant item in the doc? <...> > +.. _lio_driver-compilation: Thank you for the documentation but below part seems generic to all PMDs, and already documented in other PMDs. I am not sure about this part, what do you think only keeping LiquidIO related part? And perhaps we can prepare a common document that you can reference here. > + > +Driver Compilation > +------------------ > + > +To compile LiquidIO PMD for Linux x86_64 gcc target, run the following "make" > +command: > + > +.. code-block:: console > + > + cd > + make install T=x86_64-native-linuxapp-gcc > + > + > +Sample Application Notes > +------------------------ > + > +This section demonstrates how to launch ``testpmd`` with LiquidIO® CN23XX > +device managed by ``librte_pmd_lio`` in Linux operating system. > + > +#. Mount huge pages: > + > + .. code-block:: console > + > + mkdir /mnt/huge > + mount -t hugetlbfs nodev /mnt/huge > + > +#. Request huge pages: > + > + .. code-block:: console > + > + echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages/nr_hugepages > + > +#. Load ``vfio-pci`` driver: > + > + .. code-block:: console > + > + modprobe vfio-pci > + > +#. Bind the LiquidIO VFs to ``vfio-pci`` loaded in previous step: > + > + Setup VFIO permissions for regular users and then bind to ``vfio-pci``: > + > + .. code-block:: console > + > + sudo chmod a+x /dev/vfio > + > + sudo chmod 0666 /dev/vfio/* > + > + ./usertools/dpdk-devbind.py --bind vfio-pci 0000:03:00.3 0000:03:08.3 > + > +#. Start ``testpmd`` with basic parameters: > + > + .. code-block:: console > + > + ./build/app/testpmd -c 0xf -n 4 -- -i > + > + Example output: > + > + .. code-block:: console > + > + [...] > + EAL: PCI device 0000:03:00.3 on NUMA socket 0 > + EAL: probe driver: 177d:9712 net_liovf > + EAL: using IOMMU type 1 (Type 1) > + PMD: net_liovf[03:00.3]INFO: DEVICE : CN23XX VF > + EAL: PCI device 0000:03:08.3 on NUMA socket 0 > + EAL: probe driver: 177d:9712 net_liovf > + PMD: net_liovf[03:08.3]INFO: DEVICE : CN23XX VF > + Interactive-mode selected > + USER1: create a new mbuf pool : n=171456, size=2176, socket=0 > + Configuring Port 0 (socket 0) > + PMD: net_liovf[03:00.3]INFO: Starting port 0 > + Port 0: F2:A8:1B:5E:B4:66 > + Configuring Port 1 (socket 0) > + PMD: net_liovf[03:08.3]INFO: Starting port 1 > + Port 1: 32:76:CC:EE:56:D7 > + Checking link statuses... > + Port 0 Link Up - speed 10000 Mbps - full-duplex > + Port 1 Link Up - speed 10000 Mbps - full-duplex > + Done > + testpmd> > + > + > +SR-IOV: Prerequisites and Sample Application Notes > +-------------------------------------------------- > + > +This section provides instructions to configure SR-IOV with Linux OS. > + > +#. Verify SR-IOV and ARI capabilities are enabled on the adapter using ``lspci``: > + > + .. code-block:: console > + > + lspci -s -vvv > + > + Example output: > + > + .. code-block:: console > + > + [...] > + Capabilities: [148 v1] Alternative Routing-ID Interpretation (ARI) > + [...] > + Capabilities: [178 v1] Single Root I/O Virtualization (SR-IOV) > + [...] > + Kernel driver in use: LiquidIO > + > +#. Load the kernel module: > + > + .. code-block:: console > + > + modprobe liquidio > + > +#. Bring up the PF ports: > + > + .. code-block:: console > + > + ifconfig p4p1 up > + ifconfig p4p2 up > + > +#. Change PF MTU if required: > + > + .. code-block:: console > + > + ifconfig p4p1 mtu 9000 > + ifconfig p4p2 mtu 9000 > + > +#. Create VF device(s): > + > + Echo number of VFs to be created into ``"sriov_numvfs"`` sysfs entry > + of the parent PF. > + > + .. code-block:: console > + > + echo 1 > /sys/bus/pci/devices/0000:03:00.0/sriov_numvfs > + echo 1 > /sys/bus/pci/devices/0000:03:00.1/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 p4p1 vf 0 mac F2:A8:1B:5E:B4:66 > + > + > +#. Assign VF(s) to VM. > + > + The VF devices may be passed through to the guest VM using qemu or > + virt-manager or virsh etc. > + > + Example qemu guest launch command: > + > + .. code-block:: console > + > + ./qemu-system-x86_64 -name lio-vm -machine accel=kvm \ > + -cpu host -m 4096 -smp 4 \ > + -drive file=,if=none,id=disk1,format= \ > + -device virtio-blk-pci,scsi=off,drive=disk1,id=virtio-disk1,bootindex=1 \ > + -device vfio-pci,host=03:00.3 -device vfio-pci,host=03:08.3 > + > + > +#. Running testpmd > + > + Refer :ref:`notes above ` > + to compile and run ``testpmd`` application. > + Use ``igb_uio`` instead of ``vfio-pci`` in VM. > + > + > +Limitations > +----------- > + > +VF MTU > +~~~~~~ > + > +VF MTU is limited by PF MTU. Raise PF value before configuring VF for larger packet size. > + > +VLAN offload > +~~~~~~~~~~~~ > + > +Tx VLAN insertion is not supported and consequently VLAN offload feature is > +marked partial. > + > +Ring size > +~~~~~~~~~ > + > +Number of descriptors for Rx/Tx ring should be in the range 128 to 512. > + > +CRC striping > +~~~~~~~~~~~~ > + <...>