DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Cc: david.marchand@6wind.com, chaozhu@linux.vnet.ibm.com,
	yuanhan.liu@linux.intel.com, huawei.xie@intel.com
Subject: [dpdk-dev] [PATCH v2 0/7] virtio-net support on ppc64
Date: Tue, 17 May 2016 11:59:45 +0200	[thread overview]
Message-ID: <1463479192-2488-1-git-send-email-olivier.matz@6wind.com> (raw)
In-Reply-To: <1463143859-3105-1-git-send-email-olivier.matz@6wind.com>

This patchset allows virtio-net pmd to run on ppc64 processors.
The main thing that as missing was the support of ioports in EAL.
It also fixes some endianess issues in PCI config accesses in
legacy mode.

v1 -> v2:
  - fix read/write lengths management in virtio (this fixes
    the reading of mac address)
  - fix garbage in comment
  - move linux specific definition into a linux specific
    header
  - replay the test plan


This is validated with test-pmd:

=== HOST

mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 128 > /sys/devices/system/node/node0/hugepages/hugepages-16384kB/nr_hugepages 
qemu-system-ppc64le --enable-kvm -m 1G -mem-path "/mnt/huge" -cpu host -smp 3 \
  -serial telnet::58028,server,nowait -serial null \
  -device ne2k_pci,mac=de:ad:de:01:02:03,netdev=user.0,addr=03 \
  -netdev user,id=user.0,hostfwd=tcp::49680-:22 \
  -netdev type=tap,id=vhostnet0,script=no,vhost=on,queues=8 \
  -device virtio-net-pci,netdev=vhostnet0,ioeventfd=on,mq=on,vectors=17 \
  -hda /path/to/ubuntu-14.04-ppc64el.qcow2 \
  -vga none -display none
ip l set tap0 up
ip a a 1.1.1.1/24 dev tap0
# start guest, then:
ping 1.1.1.2

=== GUEST

cd dpdk.org/
make config T=ppc_64-power8-linuxapp-gcc
make
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
echo 64 > /sys/devices/system/node/node0/hugepages/hugepages-16384kB/nr_hugepages 
modprobe uio_pci_generic
python tools/dpdk_nic_bind.py -b uio_pci_generic 0000:00:00.0
./build/app/testpmd -l 0,1 --log-level 8 -- --total-num-mbufs=16384 -i --port-topology=chained
EAL: Detected 3 lcore(s)
EAL: Probing VFIO support...
EAL: PCI device 0000:00:00.0 on NUMA socket -1
EAL:   probe driver: 1af4:1000 rte_virtio_pmd
Interactive-mode selected
Configuring Port 0 (socket 0)
Port 0: 52:54:00:12:34:56
Checking link statuses...
Port 0 Link Up - speed 10000 Mbps - full-duplex
Done
testpmd> set fwd icmpecho
Set icmpecho packet forwarding mode
testpmd> set verbose 1
Change verbose level from 0 to 1
testpmd> start
icmp_echo_config_setup fwd_cores=1 fwd_ports=1 fwd_streams=1
  core=0:
  stream=0 port=0 rxq=0 txq=0
  icmpecho packet forwarding - CRC stripping disabled - packets/burst=32
  nb forwarding cores=1 - nb forwarding ports=1
  RX queues=1 - RX desc=128 - RX free threshold=0
  RX threshold registers: pthresh=0 hthresh=0 wthresh=0
  TX queues=1 - TX desc=512 - TX free threshold=0
  TX threshold registers: pthresh=0 hthresh=0 wthresh=0
  TX RS bit threshold=0 - TXQ flags=0xf00
testpmd>
Port 0 pkt-len=98 nb-segs=1
  ETH:  src=46:A9:44:17:62:F1 dst=52:54:00:12:34:56 type=0x0800
  IPV4: src=1.1.1.1 dst=1.1.1.2 proto=1 (ICMP)
  ICMP: echo request seq id=1

Port 0 pkt-len=98 nb-segs=1
  ETH:  src=46:A9:44:17:62:F1 dst=52:54:00:12:34:56 type=0x0800
  IPV4: src=1.1.1.1 dst=1.1.1.2 proto=1 (ICMP)
  ICMP: echo request seq id=2


David Marchand (1):
  virtio: fix pci accesses for ppc64 in legacy mode

Olivier Matz (6):
  eal: fix typos in ioport API doxygen comments
  eal/linux: only call iopl on x86
  eal/linux: remove invalid comment
  eal/linux: split function parsing pci resources in sysfs
  eal/linux: mmap ioports on ppc64
  config: enable virtio-net pmd for ppc64

 config/defconfig_ppc_64-power8-linuxapp-gcc |   2 +-
 drivers/net/virtio/virtio_pci.c             |  68 ++++++++++++++++
 lib/librte_eal/common/include/rte_pci.h     |  13 +--
 lib/librte_eal/linuxapp/eal/eal.c           |   6 +-
 lib/librte_eal/linuxapp/eal/eal_pci.c       |  52 +++++++-----
 lib/librte_eal/linuxapp/eal/eal_pci_init.h  |  10 +++
 lib/librte_eal/linuxapp/eal/eal_pci_uio.c   | 121 ++++++++++++++++++++++------
 7 files changed, 217 insertions(+), 55 deletions(-)

-- 
2.8.0.rc3

  parent reply	other threads:[~2016-05-17 10:00 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-13 12:50 [dpdk-dev] [PATCH " Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 1/7] eal: fix typos in ioport API doxygen comments Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 2/7] eal/linux: only call iopl on x86 Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 3/7] eal/linux: remove invalid comment Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 4/7] eal/linux: split function parsing pci resources in sysfs Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 5/7] eal/linux: mmap ioports on ppc64 Olivier Matz
2016-05-13 14:33   ` David Marchand
2016-05-13 16:36     ` Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 6/7] virtio: fix pci accesses for ppc64 in legacy mode Olivier Matz
2016-05-13 14:28   ` David Marchand
2016-05-13 16:34     ` Olivier Matz
2016-05-13 12:50 ` [dpdk-dev] [PATCH 7/7] config: enable virtio-net pmd for ppc64 Olivier Matz
2016-05-17  9:59 ` Olivier Matz [this message]
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 1/7] eal: fix typos in ioport API doxygen comments Olivier Matz
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 2/7] eal/linux: only call iopl on x86 Olivier Matz
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 3/7] eal/linux: remove invalid comment Olivier Matz
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 4/7] eal/linux: split function parsing pci resources in sysfs Olivier Matz
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 5/7] eal/linux: mmap ioports on ppc64 Olivier Matz
2016-05-17 15:54     ` David Marchand
2016-05-18 11:17       ` Olivier Matz
2016-05-23 13:07       ` Yuanhan Liu
2016-05-23 13:40         ` Olivier Matz
2016-05-24  5:15           ` Yuanhan Liu
2016-05-30  8:45             ` Olivier Matz
2016-06-15 16:13               ` Thomas Monjalon
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 6/7] virtio: fix pci accesses for ppc64 in legacy mode Olivier Matz
2016-05-19  9:13     ` Chao Zhu
2016-05-20 12:11       ` Olivier Matz
2016-05-20 12:18         ` Olivier Matz
2016-05-24  6:28         ` Chao Zhu
2016-05-17  9:59   ` [dpdk-dev] [PATCH v2 7/7] config: enable virtio-net pmd for ppc64 Olivier Matz
2016-06-15 17:08   ` [dpdk-dev] [PATCH v2 0/7] virtio-net support on ppc64 Thomas Monjalon

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=1463479192-2488-1-git-send-email-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=chaozhu@linux.vnet.ibm.com \
    --cc=david.marchand@6wind.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xie@intel.com \
    --cc=yuanhan.liu@linux.intel.com \
    /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).