From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jingjing Wu Subject: =?utf-8?q?=5BPATCH_v2_2/2=5D_doc=3A_add_bifurcated_dri?= =?utf-8?q?ver_guide_on_i40e_nic?= Date: Thu, 23 Jun 2016 11:02:40 +0800 Message-ID: <1466650960-22561-1-git-send-email-jingjing.wu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, jingjing.wu@intel.com, yong.liu@intel.com, helin.zhang@intel.com To: john.mcnamara@intel.com Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 9DAB39AD3 for ; Thu, 23 Jun 2016 05:02:47 +0200 (CEST) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch describes how bifurcated driver is done and adds the user guide on i40e NICs. Signed-off-by: Jingjing Wu --- doc/guides/nics/i40e.rst | 140 +++++++++++++++++++++++++++++++++++++++++= ++++++ 1 file changed, 140 insertions(+) diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst index 934eb02..9fdf0e0 100644 --- a/doc/guides/nics/i40e.rst +++ b/doc/guides/nics/i40e.rst @@ -366,3 +366,143 @@ Delete all flow director rules on a port: =20 testpmd> flush_flow_director 0 =20 + +Bifurcated driver guide on I40E +------------------------------- + +The bifurcated driver is explained in :ref:`Bifurcated driver guide `. +And on Intel=C2=AE X710/XL710 series Ethernet Controllers, Bifurcated dr= iver can be achieved +by SR-IOV , cloud filter and L3 VEB switch. So the traffic can be direct= ed to queues by +cloud filter and L3 VEB switch's matching rule. + +* L3 VEB filter for non-tunnelled packets. It can direct a packet just= by the + Destination IP address to a queue in a VF. + +* Cloud filters for tunnelled packets have following types. + + * Inner mac + + * Inner mac + VNI + + * Outer mac + Inner mac + VNI + + * Inner mac + Inner vlan + VNI + + * Inner mac + Inner vlan + +The step procedure is as following: + +#. Boot system without iommu, or with =E2=80=9Ciommu=3Dpt=E2=80=9D. + +#. Build and insert i40e.ko module. + +#. Create Virtual Functions: + + .. code-block:: console + + echo 2 > /sys/bus/pci/devices/0000:01:00.0/sriov_numvfs + +#. Add udp port offload to NIC if using cloud filter: + + .. code-block:: console + + ip li add vxlan0 type vxlan id 42 group 239.1.1.1 local 10.16.43= .214 dev + ifconfig vxlan0 up + ip -d li show vxlan0 + + .. note:: + + Print =E2=80=9Cadd vxlan port 8472, index 0 success=E2=80=9D can= be found in system log. + +#. Enable and set flow filters: + + * L3 VEB filter, route whose dest IP =3D 192.168.50.108 to VF 0's = queue 2. + + .. code-block:: console + + ethtool -N flow-type ip4 dst-ip 192.168.50.108 \ + user-def 0xffffffff00000000 action 2 loc 8 + + * Inner mac, route whose inner dest mac =3D 0:0:0:0:9:0 to PF's qu= eue 6. + + .. code-block:: console + + ethtool -N flow-type ether dst 00:00:00:00:00:00 \ + m ff:ff:ff:ff:ff:ff src 00:00:00:00:09:00 m 00:00:00:00:= 00:00 \ + user-def 0xffffffff00000003 action 6 loc 1 + + * Inner mac + VNI, route whose inner dest mac =3D 0:0:0:0:9:0 and = VNI =3D 8 to PF's queue 4. + + .. code-block:: console + + ethtool -N flow-type ether dst 00:00:00:00:00:00 \ + m ff:ff:ff:ff:ff:ff src 00:00:00:00:09:00 m 00:00:00:00:= 00:00 \ + user-def 0x800000003 action 4 loc 4 + + * Outer mac + Inner mac + VNI, route whose outer mac=3D 68:05:ca:2= 4:03:8b, inner dest mac + =3D c2:1a:e1:53:bc:57, and VNI =3D 8 to PF's queue 2. + + .. code-block:: console + + ethtool -N flow-type ether dst 68:05:ca:24:03:8b \ + m 00:00:00:00:00:00 src c2:1a:e1:53:bc:57 m 00:00:00:00:= 00:00 \ + user-def 0x800000003 action 2 loc 2 + + * Inner mac + Inner vlan + VNI, route whose inner dest mac =3D 00:= 00:00:00:20:00, + inner vlan =3D 10, and VNI =3D 8 to VF 0's queue 1 + + .. code-block:: console + + ethtool -N flow-type ether dst 00:00:00:00:01:00 \ + m ff:ff:ff:ff:ff:ff src 00:00:00:00:20:00 m 00:00:00:00:= 00:00 \ + vlan 10 user-def 0x800000000 action 1 loc 5 + + * Inner mac + Inner vlan, route whose inner dest mac =3D 00:00:00:= 00:20:00, + and inner vlan =3D 10 to VF 0's queue 1 + + .. code-block:: console + + ethtool -N flow-type ether dst 00:00:00:00:01:00 \ + m ff:ff:ff:ff:ff:ff src 00:00:00:00:20:00 m 00:00:00:00:= 00:00 \ + vlan 10 user-def 0xffffffff00000000 action 1 loc 5 + + .. note:: + + * If the upper 32 bits of 'user-def' are 0xffffffff, then the = filter can + be used for programming an L3 VEB filter, otherwise the uppe= r 32 bits + of 'user-def' can carry the tenant ID/VNI if specified/requi= red. + + * Cloud filters can be defined with inner mac, outer mac, inne= r ip, inner vlan + and VNI as part of the cloud tuple. It is always the Destina= tion (not source) + mac/ip that these filters, filter on. For all these examples= dst and src mac + address fields are overloaded dst =3D=3D outer, src =3D=3D i= nner. + + * Filter will be directing a packet who matching the rule to a= vf id + specified in the lower 32 bit of user-def to queue specified= by 'action'. + + * If the vf id specified by the lower 32 bit of user-def is gr= eater than + or equal to max_vfs, then the filter is for the PF queues. + +#. Compile the DPDK and insert igb_uio or probe vfio-pci kernel modules= as normal. + +#. Bind virtual function: + + .. code-block:: console + + modprobe vfio-pci + dpdk_nic_bind.py -b vfio-pci 01:10.0 + dpdk_nic_bind.py -b vfio-pci 01:10.1 + +#. run DPDK application on VFs: + + .. code-block:: console + + testpmd -c 0xff -n 4 -- -i -w 01:10.0 -w 01:10.1 --forward-mode=3D= mac + +.. note:: + + * The above steps work on the i40e Linux kernel driver v1.5.16. + + * Ethtool's version used in this example is 3.18. And the mask =E2= =80=9Cff=E2=80=9D means not involved, while =E2=80=9C00=E2=80=9D or don=E2= =80=99t set mask means involved. + + * For more details of the configuration, can refer to the `cloud f= ilter test plan `_ \ No newline at end of file --=20 2.4.0