From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 112CD9612 for ; Fri, 13 May 2016 14:51:50 +0200 (CEST) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 3802228FC4; Fri, 13 May 2016 14:50:13 +0200 (CEST) From: Olivier Matz To: dev@dpdk.org Cc: david.marchand@6wind.com, chaozhu@linux.vnet.ibm.com Date: Fri, 13 May 2016 14:50:52 +0200 Message-Id: <1463143859-3105-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.8.0.rc3 Subject: [dpdk-dev] [PATCH 0/7] virtio-net support on ppc64 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2016 12:51:50 -0000 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. 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: 12:00:54:52:56:34 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=12:00:54:52:56:34 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=12:00:54:52:56:34 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 | 44 ++++++++++ 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 | 6 ++ lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 121 ++++++++++++++++++++++------ 7 files changed, 191 insertions(+), 53 deletions(-) -- 2.8.0.rc3