DPDK usage discussions
 help / color / mirror / Atom feed
From: "Wiles, Keith" <keith.wiles@intel.com>
To: "Johnson, Brian" <brian.johnson@intel.com>
Cc: James Bensley <jwbensley@gmail.com>,
	"Rosen, Rami" <rami.rosen@intel.com>,
	 "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] Hard Crash with X710 and Pktgen
Date: Tue, 14 Nov 2017 20:20:48 +0000	[thread overview]
Message-ID: <199CE1B4-47DC-4ACB-BF21-509155591C2B@intel.com> (raw)
In-Reply-To: <FC4CB3BF-5564-451E-8309-9CD982B85E3E@intel.com>



Sent from my iPhone

On Nov 14, 2017, at 2:59 AM, Johnson, Brian <brian.johnson@intel.com<mailto:brian.johnson@intel.com>> wrote:

Do you have Intel VT-d enabled in the BIOS and intel_iommu=on iommu=pt in grub?

I have had some issues with enabling this where other devices such as RAID controllers cause the OS to no boot after applying these settings. Removing the grub line and upgrading the RAID firmware fixed the issue.

IOMMU<https://dpdk-guide.gitlab.io/dpdk-guide/setup/iommu.html#iommu>

An input-output memory management unit (IOMMU) is required for safely driving DMA-capable hardware from userspace and because of that it is a prerequisite for using VFIO. Not all systems have one though, so you’ll need to check that the hardware supports it and that it is enabled in the BIOS settings (VT-d or Virtualization Technology for Directed I/Oon Intel systems)

Finally, IOMMU needs to be excplitly enabled in the kernel as well. To do so, pass either intel_iommu=on (for Intel systems) or amd_iommu=on (for AMD systems) added to the kernel command line. In addition it is recommended to use iommu=pt option which improves IO performance for devices in the host.

Once the system boots up, check the contents of /sys/kernel/iommu_groups/ directory. If it is non-empty, you have successfully set up IOMMU.

To permanently add this to the kernel commandline, append it to GRUB_CMDLINE_LINUX in /etc/default/grub and then execute:

# grub2-mkconfig -o /boot/grub2/grub.cfg

Sent from my iPhone

On Nov 14, 2017, at 12:38 AM, James Bensley <jwbensley@gmail.com<mailto:jwbensley@gmail.com>> wrote:

Hi guys,

Thank you all for your responses!


I initially thought this was unlikely to be a Pktgen specific issue
however I thought it worth mentioning I am using Pktgen just in case.

On 14 November 2017 at 04:49, Muhammad Zain-ul-Abideen
<zain2294@gmail.com<mailto:zain2294@gmail.com>> wrote:
where is -p argument

Do you mean upper case "-P"? Lower case “p” isn’t an option in “Pktgen
–-help” output

Pktgen once used -p Portman value and is not used anymore I still see that option being used in some command lines.



On 13 November 2017 at 19:35, James Bensley <jwbensley@gmail.com<mailto:jwbensley@gmail.com>> wrote:
$ sudo ./app/x86_64-native-linuxapp-gcc/pktgen -l 2-6 -n 1 -w 09:00.0 -w 09:00.1 -v -- -P -m [3-4].0 [5-6].1


On 13 November 2017 at 21:49, Wiles, Keith <keith.wiles@intel.com<mailto:keith.wiles@intel.com>> wrote:
For the hard lockup problem try using testpmd application and see if that the same problem if not then it will be next week before I can look at.

Let me know if testpmd works or not.

Thanks for taking the time to reply whilst traveling Keith!

Sadly I’m getting the same behaviour with testpmd:

$ ./dpdk-devbind.py --status-dev net

Network devices using DPDK-compatible driver
============================================
0000:09:00.0 'Ethernet Controller X710 for 10GbE SFP+ 1572' drv=igb_uio unused=
0000:09:00.1 'Ethernet Controller X710 for 10GbE SFP+ 1572' drv=igb_uio unused=

Network devices using kernel driver
===================================
0000:02:00.0 'I350 Gigabit Network Connection 1521' if=eno1 drv=igb
unused=igb_uio *Active*
0000:02:00.1 'I350 Gigabit Network Connection 1521' if=eno2 drv=igb
unused=igb_uio
0000:06:00.0 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f0
drv=tg3 unused=igb_uio
0000:06:00.1 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f1
drv=tg3 unused=igb_uio
0000:06:00.2 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f2
drv=tg3 unused=igb_uio *Active*
0000:06:00.3 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f3
drv=tg3 unused=igb_uio

$ sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
EAL: Detected 16 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:09:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e

<< HARD LOCK-UP >>


$ ./dpdk-devbind.py --status-dev net

Network devices using DPDK-compatible driver
============================================
0000:09:00.0 'Ethernet Controller X710 for 10GbE SFP+ 1572'
drv=vfio-pci unused=igb_uio
0000:09:00.1 'Ethernet Controller X710 for 10GbE SFP+ 1572'
drv=vfio-pci unused=igb_uio

Network devices using kernel driver
===================================
0000:02:00.0 'I350 Gigabit Network Connection 1521' if=eno1 drv=igb
unused=igb_uio,vfio-pci *Active*
0000:02:00.1 'I350 Gigabit Network Connection 1521' if=eno2 drv=igb
unused=igb_uio,vfio-pci
0000:06:00.0 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f0
drv=tg3 unused=igb_uio,vfio-pci
0000:06:00.1 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f1
drv=tg3 unused=igb_uio,vfio-pci
0000:06:00.2 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f2
drv=tg3 unused=igb_uio,vfio-pci *Active*
0000:06:00.3 'NetXtreme BCM5719 Gigabit Ethernet PCIe 1657' if=ens3f3
drv=tg3 unused=igb_uio,vfio-pci

$ sudo ./testpmd -l 0-3 -n 4 -- -i --portmask=0x1 --nb-cores=2
EAL: Detected 16 lcore(s)
EAL: No free hugepages reported in hugepages-1048576kB
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:02:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:02:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1521 net_e1000_igb
EAL: PCI device 0000:09:00.0 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL:   0000:09:00.0 failed to select IOMMU type
EAL: Requested device 0000:09:00.0 cannot be used
EAL: PCI device 0000:09:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL:   0000:09:00.1 failed to select IOMMU type
EAL: Requested device 0000:09:00.1 cannot be used
EAL: No probed ethernet devices
Interactive-mode selected
USER1: create a new mbuf pool <mbuf_pool_socket_0>: n=171456,
size=2176, socket=0
Done


On 14 November 2017 at 06:29, Rosen, Rami <rami.rosen@intel.com<mailto:rami.rosen@intel.com>> wrote:
Second, I think the root cause for not finding the ports is around this message ("failed to select IOMMU type") in:
...
EAL:   probe driver: 8086:1572 net_i40e
EAL:   0000:09:00.0 failed to select IOMMU type
EAL: Requested device 0000:09:00.0 cannot be used
EAL: PCI device 0000:09:00.1 on NUMA socket 0
EAL:   probe driver: 8086:1572 net_i40e
EAL:   0000:09:00.1 failed to select IOMMU type
EAL: Requested device 0000:09:00.1 cannot be used
...

What does " find /sys/kernel/iommu_groups/ -type l"
give ?

Could it be that 0000:09:00.0 and 0000:09:00.1 belongs to an IOMMU group in which there are other devices ?

To me (a layman) this looks correct, do you agree?

$ find /sys/kernel/iommu_groups/ -type l | grep 09
/sys/kernel/iommu_groups/36/devices/0000:09:00.0
/sys/kernel/iommu_groups/37/devices/0000:09:00.1

$ find /sys/kernel/iommu_groups/ -type l | grep -E "36|37"
/sys/kernel/iommu_groups/36/devices/0000:09:00.0
/sys/kernel/iommu_groups/37/devices/0000:09:00.1

Cheers,
James.

  reply	other threads:[~2017-11-14 20:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 19:35 James Bensley
2017-11-13 21:49 ` Wiles, Keith
2017-11-14  4:49   ` Muhammad Zain-ul-Abideen
2017-11-14  6:29   ` Rosen, Rami
2017-11-14  8:37     ` James Bensley
2017-11-14 10:59       ` Johnson, Brian
2017-11-14 20:20         ` Wiles, Keith [this message]
2017-11-15 17:24           ` James Bensley
2017-11-15 18:04             ` James Bensley
2017-11-15 17:22         ` James Bensley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199CE1B4-47DC-4ACB-BF21-509155591C2B@intel.com \
    --to=keith.wiles@intel.com \
    --cc=brian.johnson@intel.com \
    --cc=jwbensley@gmail.com \
    --cc=rami.rosen@intel.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).