[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
On Fri, May 15, 2015 at 12:54:19PM +, Assaad, Sami (Sami) wrote: > Thanks Bruce for your reply. > > Yes, your idea of bringing the PF into the VM looks like an option. However, > how do you configure the physical interfaces within the VM supporting SRIOV? > I always believed that the VM needed to be associated with a virtual/emulated > interface card. With your suggestion, I would actually configure the physical > interface card/non-emulated within the VM. > > If you could provide me some example configuration commands, it would be > really appreciated. > You'd pass in the PF in the same way as the VF, just skip all the steps creating the VF on the host. To the system and hypervisor, both are just PCI devices! As for configuration, the setup and configuration of the PF in the guest is exactly the same as on the host - it's the same hardware with the same PCI bars. It's the IOMMU on your platform that takes care of memory isolation and address translation and that should work with either PF or VF. Regards, /Bruce > Thanks in advance. > > Best Regards, > Sami. > > -Original Message- > From: Bruce Richardson [mailto:bruce.richardson at intel.com] > Sent: Friday, May 15, 2015 5:27 AM > To: Stephen Hemminger > Cc: Assaad, Sami (Sami); dev at dpdk.org > Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > Pass-Through (SR-IOV)? > > On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > > On Thu, 14 May 2015 21:38:24 + > > "Assaad, Sami (Sami)" wrote: > > > > > Hello, > > > > > > My Hardware consists of the following: > > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU > > > E5-2680 v3 @ 2.50GHz) > > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > > > Software: > > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > > - DPDK 1.8 > > > > > > I want all the network traffic received on the two 10G ports to be > > > transmitted to my VM. The issue is that the Virtual Function / Physical > > > Functions have setup the internal virtual switch to only route Ethernet > > > packets with destination MAC address matching the VM virtual interface > > > MAC. How can I configure my virtual environment to provide all network > > > traffic to the VM...i.e. set the virtual functions for both PCI devices > > > in Promiscuous mode? > > > > > > [ If a l2fwd-vf example exists, this would actually solve this > > > problem ... Is there a DPDK l2fwd-vf example available? ] > > > > > > > > > Thanks in advance. > > > > > > Best Regards, > > > Sami Assaad. > > > > This is a host side (not DPDK) issue. > > > > Intel PF driver will not allow guest (VF) to go into promiscious > > mode since it would allow traffic stealing which is a security violation. > > Could you maybe try passing the PF directly into the VM, rather than a VF > based off it? Since you seem to want all traffic to go to the one VM, there > seems little point in creating a VF on the device, and should let the VM > control the whole NIC directly. > > Regards, > /Bruce Hi Bruce, I was provided two options: 1. Pass the PF directly into the VM 2. Use ixgbe VF mirroring I decided to first try your proposal of passing the PF directly into the VM. However, I ran into some issues. But prior to providing the problem details, the following is my server environment: I'm using CentOS 7 KVM/QEMU [root at ni-nfvhost01 qemu]# uname -a Linux ni-nfvhost01 3.10.0-229.1.2.el7.x86_64 #1 SMP Fri Mar 27 03:04:26 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux [root at ni-nfvhost01 qemu]# lspci -n -s 04:00.0 04:00.0 0200: 8086:1528 (rev 01) [root at ni-nfvhost01 qemu]# lspci | grep -i eth 02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 02:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 02:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 02:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01) 04:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01) 04:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10-Gigabit X540-AT2 (rev 01) - The following is my grub execution: [root at ni-nfvhost01 qemu]# cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-229.1.2.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun17 rd.lvm.lv=centos/root crashkernel=auto vconsole.keymap=us rhgb quiet iommu=pt intel_iommu=on hugepages=8192 This is the error I'm obtaining when the VM has one of the PCI devices associated to the Ethernet Controller card: [root at ni-nfvhost01 qemu]# qemu-system-x86_64 -m 2048 -vga std -vnc :0 -net none -enable-kvm -device vfio-pci,host=04:00.0,id=net0 qemu-system-x86_64: -device vfio-pci,host=04:00.0,id=net0: vfio: failed to set iommu for container: Operation not
[dpdk-dev] Linux top command output
Hi, I have a query-why Linux top command does not show the NUMA pages allocated by a DPDK process in Resident Memory? Is it a missing functionality in Linux top command or some limitation, Please excuse my ignorance if I missed something very obvious? As an example if I allocated 512 NUMA pages for a DPDK application with each page of 2MB size then I would expect that in top command, when memory stats are display I would see "RES" memory of 1GB. Regards Suyash Karmarkar
[dpdk-dev] performance issue with ovs + dpdk2.0 with vhost
Hi , If do not enable dpdk, plian ovs can pass about 120,000 pps but once I make ovs to use dpdk the main reason in doing this is to get more performance I am seeing that it is passing only 1000 pps. So I guess the drop from 120,000 to just 1000 means I am missing something. Regards, Ravi -Original Message- From: Traynor, Kevin [mailto:kevin.tray...@intel.com] Sent: Friday, May 15, 2015 12:02 PM To: Rao, Ravi; therbert at redhat.com; dev at dpdk.org Subject: RE: [dpdk-dev] performance issue with ovs + dpdk2.0 with vhost > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ravi Rao > Sent: Friday, May 15, 2015 5:12 PM > To: therbert at redhat.com; dev at dpdk.org > Subject: Re: [dpdk-dev] performance issue with ovs + dpdk2.0 with > vhost > > Hi, > This is what I am trying to Do. > Below is the setup.. > > | +--+ | >| guest| | >| | | >| | | guest >| eth0 L3fwd eth1 | | >| | | | | >+---+--+---+ __| >^ : >| | >: v __ > +-+--+-+ | > | | ovs-br0 | | > | +--+ | | > | ^ : | | > | +--+ +-+ | | host > | : v | | > | +--++--+ | | > | | dpdk0 | ovs-dpdk | dpdk1 | | | > +---+--++--+---+ __| > ^ : > | | > : v > +--+ > | | > |traffic generator | > | | > +--+| > > > Step1: Use the latest ovs and dpdk2.0 to get the ovs running with 2 > dpdk interfaces that are bound to 2 10GB physical interfaces > #** Inser the required Modules > cd /root/dpdk-2.0.0 > modprobe uio > modprobe cuse > rmmod igb_uio > rmmod rte_kni > insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko > > # Assign the dpdk capable interfaces to igb_uio driver > tools/dpdk_nic_bind.py --status tools/dpdk_nic_bind.py -b igb_uio > :02:00.0 tools/dpdk_nic_bind.py -b igb_uio :02:00.1 > tools/dpdk_nic_bind.py --status > > #--- Setup the openVswitch > cd /root/ovs > pkill -9 ovs > mkdir -p /usr/local/etc/openvswitch > mkdir -p /usr/local/var/run/openvswitch rm -rf > /usr/local/etc/openvswitch/conf.db > ovsdb/ovsdb-tool create /usr/local/etc/openvswitch/conf.db > vswitchd/vswitch.ovsschema > > #Start ovsdb-server > ovsdb/ovsdb-server > --remote=punix:/usr/local/var/run/openvswitch/db.sock > --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile > --detach utilities/ovs-vsctl --no-wait init > > #Start vswitchd: > export DB_SOCK=/usr/local/var/run/openvswitch/db.sock > rm /dev/vhost-net > vswitchd/ovs-vswitchd --dpdk -c 0x3 -n 4 --socket-mem 1024,0 -- > unix:$DB_SOCK --pidfile --detach > > #Add bridge & ports > utilities/ovs-vsctl add-br ovs-br0 -- set bridge ovs-br0 > datapath_type=netdev utilities/ovs-vsctl add-port ovs-br0 dpdk0 -- set > Interface dpdk0 type=dpdk utilities/ovs-vsctl add-port ovs-br0 dpdk1 > -- set Interface dpdk1 type=dpdk > > Step2: Create the dpdkvhost interfaces and bring up the guestVM using > QEMU export DPDK_DIR=/root/dpdk-2.0.0 insmod > $DPDK_DIR/lib/librte_vhost/eventfd_link/eventfd_link.ko > cd /root/ovs > utilities/ovs-vsctl add-port ovs-br0 dpdkvhost0 -- set Interface > dpdkvhost0 type=dpdkvhost > utilities/ovs-vsctl add-port ovs-br0 dpdkvhost1 -- set Interface > dpdkvhost1 type=dpdkvhost > > # Start the guest ubuntu VM1 from a terminal that is logged in as > root > qemu-system-x86_64 --enable-kvm -k fr -m 1G \ > -cpu host -smp cores=2,threads=1,sockets=1 \ > -serial telnet::,server,nowait -monitor > telnet::,server,nowait \ > -hda /root/VMs/images/ubuntu-14.04-template.qcow2 \ > -object > memory-backend-file,id=mem,size=1G,mem-path=/mnt/huge_1GB,share=on \ > -numa node,memdev=mem \ > -netdev > type=tap,id=dpdkvhost0,script=no,downscript=no,ifname=dpdkvhost0,vhost=on \ > -device > virtio-net- > pci,netdev=dpdkvhost0,mac=52:54:00:12:34:56,csum=off,gso=off,guest_tso > 4=off,g > uest_tso6=off,guest_ecn=off > \ >
[dpdk-dev] [PATCH v2] vhost: flush used->idx update before reading avail->flags
On Fri, May 15, 2015 at 04:43:33PM +0300, Nikita Kalyazin wrote: > Hi, > > > Maybe I missed a part of the discussion, but is there any special purpose for > using rte_mb (both read and write fence) here rather than rte_wmb (write > fence only)? The fence is between write of used->idx and read of avail->flags, so rte_wmb won't do anything useful. > -- > > Best regards, > > Nikita Kalyazin, > n.kalyazin at samsung.com > > Software Engineer > CE OS Group > Samsung R&D Institute Russia > Tel: +7 (495) 797-25-00 #3816 > Tel: +7 (495) 797-25-03 > Office #1501, 12-1, Dvintsev str., > Moscow, 127018, Russia > > On Wed, May 13, 2015 at 12:46:30PM +0200, Thomas Monjalon wrote: > > 2015-04-29 19:11, Huawei Xie: > > > update of used->idx and read of avail->flags could be reordered. > > > memory fence should be used to ensure the order, otherwise guest could > > > see a stale used->idx value after it toggles the interrupt suppression > > > flag. > > > After guest sets the interrupt suppression flag, it will check if there > > > is more buffer to process through used->idx. If it sees a stale value, it > > > will exit the processing while host willn't send interrupt to guest. > > > > > > Signed-off-by: Huawei Xie > > > > Applied with following title, thanks > > vhost: fix virtio freeze due to missed interrupt > >
[dpdk-dev] [PATCH] examples: add ip version check for l3fwd app
Added optional ip version check to l3fwd app to allow to detect the ip version if mbuf ol_flags are not set in case of running in a VM with emulated network controllers Signed-off-by: Andrey Chilikin --- examples/l3fwd/main.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c index e32512e..4d4e5bc 100644 --- a/examples/l3fwd/main.c +++ b/examples/l3fwd/main.c @@ -76,6 +76,8 @@ #define APP_LOOKUP_LPM 1 #define DO_RFC_1812_CHECKS +#define DO_IP_VERSION_CHECK 0 + #ifndef APP_LOOKUP_METHOD #define APP_LOOKUP_METHOD APP_LOOKUP_LPM #endif @@ -953,6 +955,15 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint8_t portid, struct lcore_conf *qcon void *d_addr_bytes; uint8_t dst_port; +#if DO_IP_VERSION_CHECK + if (!(m->ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV6_HDR))) { + uint8_t ip_ver = *(uint8_t *)(rte_pktmbuf_mtod(m, unsigned char *) + + sizeof(struct ether_hdr)) >> 4; + if (ip_ver == 4) + m->ol_flags |= PKT_RX_IPV4_HDR; + } +#endif + eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *); if (m->ol_flags & PKT_RX_IPV4_HDR) { @@ -1071,6 +1082,17 @@ get_dst_port(const struct lcore_conf *qconf, struct rte_mbuf *pkt, struct ipv6_hdr *ipv6_hdr; struct ether_hdr *eth_hdr; +#if DO_IP_VERSION_CHECK + if (!(pkt->ol_flags & (PKT_RX_IPV4_HDR | PKT_RX_IPV6_HDR))) { + uint8_t ip_ver = *(uint8_t *)(rte_pktmbuf_mtod(pkt, unsigned char *) + + sizeof(struct ether_hdr)) >> 4; + if (ip_ver == 4) + pkt->ol_flags |= PKT_RX_IPV4_HDR; + else if (ip_ver == 6) + pkt->ol_flags |= PKT_RX_IPV6_HDR; + } +#endif + if (pkt->ol_flags & PKT_RX_IPV4_HDR) { if (rte_lpm_lookup(qconf->ipv4_lookup_struct, dst_ipv4, &next_hop) != 0) -- 1.7.4.1
[dpdk-dev] performance issue with ovs + dpdk2.0 with vhost
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Ravi Rao > Sent: Friday, May 15, 2015 5:12 PM > To: therbert at redhat.com; dev at dpdk.org > Subject: Re: [dpdk-dev] performance issue with ovs + dpdk2.0 with vhost > > Hi, > This is what I am trying to Do. > Below is the setup.. > > | +--+ | >| guest| | >| | | >| | | guest >| eth0 L3fwd eth1 | | >| | | | | >+---+--+---+ __| >^ : >| | >: v __ > +-+--+-+ | > | | ovs-br0 | | > | +--+ | | > | ^ : | | > | +--+ +-+ | | host > | : v | | > | +--++--+ | | > | | dpdk0 | ovs-dpdk | dpdk1 | | | > +---+--++--+---+ __| > ^ : > | | > : v > +--+ > | | > |traffic generator | > | | > +--+| > > > Step1: Use the latest ovs and dpdk2.0 to get the ovs running with 2 dpdk > interfaces that are bound to 2 10GB physical interfaces > #** Inser the required Modules > cd /root/dpdk-2.0.0 > modprobe uio > modprobe cuse > rmmod igb_uio > rmmod rte_kni > insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko > > # Assign the dpdk capable interfaces to igb_uio driver > tools/dpdk_nic_bind.py --status > tools/dpdk_nic_bind.py -b igb_uio :02:00.0 > tools/dpdk_nic_bind.py -b igb_uio :02:00.1 > tools/dpdk_nic_bind.py --status > > #--- Setup the openVswitch > cd /root/ovs > pkill -9 ovs > mkdir -p /usr/local/etc/openvswitch > mkdir -p /usr/local/var/run/openvswitch > rm -rf /usr/local/etc/openvswitch/conf.db > ovsdb/ovsdb-tool create /usr/local/etc/openvswitch/conf.db > vswitchd/vswitch.ovsschema > > #Start ovsdb-server > ovsdb/ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock > --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach > utilities/ovs-vsctl --no-wait init > > #Start vswitchd: > export DB_SOCK=/usr/local/var/run/openvswitch/db.sock > rm /dev/vhost-net > vswitchd/ovs-vswitchd --dpdk -c 0x3 -n 4 --socket-mem 1024,0 -- > unix:$DB_SOCK --pidfile --detach > > #Add bridge & ports > utilities/ovs-vsctl add-br ovs-br0 -- set bridge ovs-br0 > datapath_type=netdev > utilities/ovs-vsctl add-port ovs-br0 dpdk0 -- set Interface dpdk0 type=dpdk > utilities/ovs-vsctl add-port ovs-br0 dpdk1 -- set Interface dpdk1 type=dpdk > > Step2: Create the dpdkvhost interfaces and bring up the guestVM using QEMU > export DPDK_DIR=/root/dpdk-2.0.0 > insmod $DPDK_DIR/lib/librte_vhost/eventfd_link/eventfd_link.ko > cd /root/ovs > utilities/ovs-vsctl add-port ovs-br0 dpdkvhost0 -- set Interface > dpdkvhost0 type=dpdkvhost > utilities/ovs-vsctl add-port ovs-br0 dpdkvhost1 -- set Interface > dpdkvhost1 type=dpdkvhost > > # Start the guest ubuntu VM1 from a terminal that is logged in as root > qemu-system-x86_64 --enable-kvm -k fr -m 1G \ > -cpu host -smp cores=2,threads=1,sockets=1 \ > -serial telnet::,server,nowait -monitor > telnet::,server,nowait \ > -hda /root/VMs/images/ubuntu-14.04-template.qcow2 \ > -object > memory-backend-file,id=mem,size=1G,mem-path=/mnt/huge_1GB,share=on \ > -numa node,memdev=mem \ > -netdev > type=tap,id=dpdkvhost0,script=no,downscript=no,ifname=dpdkvhost0,vhost=on \ > -device > virtio-net- > pci,netdev=dpdkvhost0,mac=52:54:00:12:34:56,csum=off,gso=off,guest_tso4=off,g > uest_tso6=off,guest_ecn=off > \ > -netdev > type=tap,id=dpdkvhost1,script=no,downscript=no,ifname=dpdkvhost1,vhost=on \ > -device > virtio-net- > pci,netdev=dpdkvhost1,mac=52:54:00:12:34:57,csum=off,gso=off,guest_tso4=off,g > uest_tso6=off,guest_ecn=off > \ > -device ne2k_pci,mac=DE:AD:DE:01:02:03,netdev=user.0 -netdev > user,id=user.0,hostfwd=tcp::-:22 & > > # Add flows between ports > utilities/ovs-ofctl del-flows ovs-br0 > utilities/ovs-ofctl add-flow ovs-br0 in_port=1,action=output:3 > utilities/ovs-ofctl add-flow ovs-br0 in_port=2,action=output:4 > utilities/o
[dpdk-dev] [PATCH] fm10k: support XEN domain0
On Fri, 15 May 2015 16:56:02 +0800 Shaopeng He wrote: > fm10k was failing to run in XEN domain0, as the physical > memory for DMA should be allocated and translated > in a different way for XEN domain0. So > rte_memzone_reserve_bounded() should be used for DMA > memory allocation, and rte_mem_phy2mch() should be used > for DMA memory address translation to support running > fm10k PMD in XEN domain0. > > Signed-off-by: Shaopeng He I agree with Thomas that this code has spread everywhere and should be in a common spot. Also, we discovered as part of the Xen net-front driver that it should be a runtime determination, not a config option!
[dpdk-dev] [PATCH v2 19/19] doc: update source organisation text for drivers
Since the PMDs have moved to the drivers directory, update the docs that cover the source code organisation of DPDK Signed-off-by: Bruce Richardson --- doc/guides/prog_guide/source_org.rst | 37 +--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/doc/guides/prog_guide/source_org.rst b/doc/guides/prog_guide/source_org.rst index 1bce0b8..4f6f489 100644 --- a/doc/guides/prog_guide/source_org.rst +++ b/doc/guides/prog_guide/source_org.rst @@ -79,22 +79,37 @@ The lib directory contains:: +-- librte_mempool # memory pool manager (fixedsized objects) +-- librte_meter# QoS metering library +-- librte_net # various IP-related headers -+-- librte_pmd_bond # bonding poll mode driver -+-- librte_pmd_e1000# 1GbE poll mode drivers (igb and em) -+-- librte_pmd_fm10k# Host interface PMD driver for FM1 Series -+-- librte_pmd_ixgbe# 10GbE poll mode driver -+-- librte_pmd_i40e # 40GbE poll mode driver -+-- librte_pmd_mlx4 # Mellanox ConnectX-3 poll mode driver -+-- librte_pmd_pcap # PCAP poll mode driver -+-- librte_pmd_ring # ring poll mode driver -+-- librte_pmd_virtio # virtio poll mode driver -+-- librte_pmd_vmxnet3 # VMXNET3 poll mode driver -+-- librte_pmd_xenvirt # Xen virtio poll mode driver +-- librte_power# power management library +-- librte_ring # software rings (act as lockless FIFOs) +-- librte_sched# QoS scheduler and dropper library +-- librte_timer# timer library +Drivers +--- + +Drivers are special libraries which provide poll-mode driver implementations for +devices - either hardware devices or pseudo/virtual devices. They are contained +in the "drivers" subdirectory, classified by type, and each compiles to a +library with the format "librte_pmd_X.a" where "X" is the driver name. + +The drivers directory has a net subdirectory which contains:: + +drivers/net ++-- af_packet # poll mode driver based on linux af_packet ++-- bonding# bonding poll mode driver ++-- e1000 # 1GbE poll mode drivers (igb and em) ++-- enic # Cisco VIC Ethernet NIC Poll-mode Driver ++-- fm10k # Host interface PMD driver for FM1 Series ++-- i40e # 40GbE poll mode driver ++-- ixgbe # 10GbE poll mode driver ++-- mlx4 # Mellanox ConnectX-3 poll mode driver ++-- null # NULL poll mode driver for testing ++-- pcap # PCAP poll mode driver ++-- ring # ring poll mode driver ++-- virtio # virtio poll mode driver ++-- vmxnet3# VMXNET3 poll mode driver ++-- xenvirt# Xen virtio poll mode driver + Applications -- 2.1.0
[dpdk-dev] [PATCH v2 18/19] doc: update GSG doc for new drivers subdirectory
Update the directory list in the GSG to reflect recent changes of PMDs to the drivers directory Signed-off-by: Bruce Richardson --- doc/guides/linux_gsg/build_dpdk.rst | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst index e3a0b46..2680e66 100644 --- a/doc/guides/linux_gsg/build_dpdk.rst +++ b/doc/guides/linux_gsg/build_dpdk.rst @@ -45,12 +45,14 @@ First, uncompress the archive and move to the uncompressed DPDK source directory user at host:~$ unzip DPDK-.zip user at host:~$ cd DPDK- user at host:~/DPDK-$ ls - app/ config/ examples/ lib/ LICENSE.GPL LICENSE.LGPL Makefile mk/ scripts/ tools/ + app/ config/ drivers/ examples/ lib/ LICENSE.GPL LICENSE.LGPL Makefile mk/ scripts/ tools/ The DPDK is composed of several directories: * lib: Source code of DPDK libraries +* drivers: Source code of DPDK poll-mode drivers + * app: Source code of DPDK applications (automatic tests) * examples: Source code of DPDK application examples @@ -153,9 +155,9 @@ In addition, the make clean command can be used to remove any existing compiled Browsing the Installed DPDK Environment Target -- -Once a target is created it contains all libraries and header files for the DPDK environment that are required to build customer applications. +Once a target is created it contains all libraries, including poll-mode drivers, and header files for the DPDK environment that are required to build customer applications. In addition, the test and testpmd applications are built under the build/app directory, which may be used for testing. -A kmod directory is also present that contains kernel modules which may be loaded if needed: +A kmod directory is also present that contains kernel modules which may be loaded if needed. .. code-block:: console -- 2.1.0
[dpdk-dev] [PATCH v2 17/19] maintainers: update maintainers with driver paths
Following the move of the PMDs to the drivers directory, update the maintainers file appropriately. Signed-off-by: Bruce Richardson --- MAINTAINERS | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0477e7d..9362c19 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -132,7 +132,7 @@ F: lib/librte_eal/linuxapp/xen_dom0/ F: lib/librte_eal/linuxapp/eal/*xen* F: lib/librte_eal/linuxapp/eal/include/exec-env/rte_dom0_common.h F: lib/librte_mempool/rte_dom0_mempool.c -F: lib/librte_pmd_xenvirt/ +F: drivers/net/xenvirt/ F: doc/guides/xen/ F: app/test-pmd/mempool_* F: examples/vhost_xen/ @@ -192,7 +192,7 @@ Drivers Link bonding M: Declan Doherty -F: lib/librte_pmd_bond/ +F: drivers/net/bonding/ F: doc/guides/prog_guide/link_bonding_poll_mode_drv_lib.rst F: app/test/test_link_bonding* F: examples/bond/ @@ -208,40 +208,40 @@ F: doc/guides/sample_app_ug/kernel_nic_interface.rst Linux AF_PACKET M: John W. Linville -F: lib/librte_pmd_af_packet/ +F: drivers/net/af_packet/ Cisco enic -F: lib/librte_pmd_enic/ +F: drivers/net/enic/ Intel e1000 -F: lib/librte_pmd_e1000/ +F: drivers/net/e1000/ F: doc/guides/nics/e1000em.rst F: doc/guides/nics/intel_vf.rst Intel ixgbe M: Helin Zhang M: Konstantin Ananyev -F: lib/librte_pmd_ixgbe/ +F: drivers/net/ixgbe/ F: doc/guides/nics/ixgbe.rst F: doc/guides/nics/intel_vf.rst Intel i40e M: Helin Zhang -F: lib/librte_pmd_i40e/ +F: drivers/net/i40e/ F: doc/guides/nics/intel_vf.rst Intel fm10k M: Jing Chen -F: lib/librte_pmd_fm10k/ +F: drivers/net/fm10k/ Mellanox mlx4 M: Adrien Mazarguil -F: lib/librte_pmd_mlx4/ +F: drivers/net/mlx4/ F: doc/guides/nics/mlx4.rst RedHat virtio M: Changchun Ouyang -F: lib/librte_pmd_virtio/ +F: drivers/net/virtio/ F: doc/guides/nics/virtio.rst F: lib/librte_vhost/ F: doc/guides/prog_guide/vhost_lib.rst @@ -250,24 +250,24 @@ F: doc/guides/sample_app_ug/vhost.rst VMware vmxnet3 M: Yong Wang -F: lib/librte_pmd_vmxnet3/ +F: drivers/net/vmxnet3/ F: doc/guides/nics/vmxnet3.rst PCAP PMD M: Nicol?s Pernas Maradei M: John McNamara -F: lib/librte_pmd_pcap/ +F: drivers/net/pcap/ F: doc/guides/nics/pcap_ring.rst Ring PMD M: Bruce Richardson -F: lib/librte_pmd_ring/ +F: drivers/net/ring/ F: doc/guides/nics/pcap_ring.rst F: app/test/test_pmd_ring.c Null PMD M: Tetsuya Mukawa -F: lib/librte_pmd_null/ +F: drivers/net/null/ Packet processing -- 2.1.0
[dpdk-dev] [PATCH v2 16/19] xenvirt: move xenvirt PMD to drivers/net
Move xenvirt PMD to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile | 2 +- drivers/net/xenvirt/Makefile | 62 ++ drivers/net/xenvirt/rte_eth_xenvirt.c | 714 + drivers/net/xenvirt/rte_eth_xenvirt.h | 62 ++ drivers/net/xenvirt/rte_eth_xenvirt_version.map| 7 + drivers/net/xenvirt/rte_mempool_gntalloc.c | 298 + drivers/net/xenvirt/rte_xen_lib.c | 428 drivers/net/xenvirt/rte_xen_lib.h | 113 drivers/net/xenvirt/virtio_logs.h | 70 ++ drivers/net/xenvirt/virtqueue.h| 280 lib/Makefile | 1 - lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_xenvirt/Makefile| 62 -- lib/librte_pmd_xenvirt/rte_eth_xenvirt.c | 714 - lib/librte_pmd_xenvirt/rte_eth_xenvirt.h | 62 -- lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map | 7 - lib/librte_pmd_xenvirt/rte_mempool_gntalloc.c | 298 - lib/librte_pmd_xenvirt/rte_xen_lib.c | 428 lib/librte_pmd_xenvirt/rte_xen_lib.h | 113 lib/librte_pmd_xenvirt/virtio_logs.h | 70 -- lib/librte_pmd_xenvirt/virtqueue.h | 280 21 files changed, 2036 insertions(+), 2037 deletions(-) create mode 100644 drivers/net/xenvirt/Makefile create mode 100644 drivers/net/xenvirt/rte_eth_xenvirt.c create mode 100644 drivers/net/xenvirt/rte_eth_xenvirt.h create mode 100644 drivers/net/xenvirt/rte_eth_xenvirt_version.map create mode 100644 drivers/net/xenvirt/rte_mempool_gntalloc.c create mode 100644 drivers/net/xenvirt/rte_xen_lib.c create mode 100644 drivers/net/xenvirt/rte_xen_lib.h create mode 100644 drivers/net/xenvirt/virtio_logs.h create mode 100644 drivers/net/xenvirt/virtqueue.h delete mode 100644 lib/librte_pmd_xenvirt/Makefile delete mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt.c delete mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt.h delete mode 100644 lib/librte_pmd_xenvirt/rte_eth_xenvirt_version.map delete mode 100644 lib/librte_pmd_xenvirt/rte_mempool_gntalloc.c delete mode 100644 lib/librte_pmd_xenvirt/rte_xen_lib.c delete mode 100644 lib/librte_pmd_xenvirt/rte_xen_lib.h delete mode 100644 lib/librte_pmd_xenvirt/virtio_logs.h delete mode 100644 lib/librte_pmd_xenvirt/virtqueue.h diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 1940393..1e6648a 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -44,7 +44,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt +DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += xenvirt include $(RTE_SDK)/mk/rte.sharelib.mk include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/net/xenvirt/Makefile b/drivers/net/xenvirt/Makefile new file mode 100644 index 000..f0c796c --- /dev/null +++ b/drivers/net/xenvirt/Makefile @@ -0,0 +1,62 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# li
[dpdk-dev] [PATCH v2 15/19] xmvnet3: move vmxnet3 PMD to drivers/net
Move vmxnet3 PMD to drivers/net directory. As part of the move, rename the "vmxnet3" subdirectory, containing the original FreeBSD drivers, from "vmxnet3" to the more standard name "base", to indicate it contains the base drivers used for the implementation. Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/vmxnet3/Makefile | 84 ++ drivers/net/vmxnet3/base/README| 50 + drivers/net/vmxnet3/base/includeCheck.h| 40 + drivers/net/vmxnet3/base/upt1_defs.h | 117 +++ drivers/net/vmxnet3/base/vmware_pack_begin.h | 32 + drivers/net/vmxnet3/base/vmware_pack_end.h | 32 + drivers/net/vmxnet3/base/vmxnet3_defs.h| 751 ++ drivers/net/vmxnet3/base/vmxnet3_osdep.h | 48 + drivers/net/vmxnet3/rte_pmd_vmxnet3_version.map|4 + drivers/net/vmxnet3/vmxnet3_ethdev.c | 779 ++ drivers/net/vmxnet3/vmxnet3_ethdev.h | 183 drivers/net/vmxnet3/vmxnet3_logs.h | 74 ++ drivers/net/vmxnet3/vmxnet3_ring.h | 183 drivers/net/vmxnet3/vmxnet3_rxtx.c | 1068 lib/Makefile |1 - lib/librte_pmd_vmxnet3/Makefile| 84 -- lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map |4 - lib/librte_pmd_vmxnet3/vmxnet3/README | 50 - lib/librte_pmd_vmxnet3/vmxnet3/includeCheck.h | 40 - lib/librte_pmd_vmxnet3/vmxnet3/upt1_defs.h | 117 --- lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_begin.h | 32 - lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_end.h | 32 - lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_defs.h | 751 -- lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_osdep.h | 48 - lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c| 779 -- lib/librte_pmd_vmxnet3/vmxnet3_ethdev.h| 183 lib/librte_pmd_vmxnet3/vmxnet3_logs.h | 74 -- lib/librte_pmd_vmxnet3/vmxnet3_ring.h | 183 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 1068 30 files changed, 3446 insertions(+), 3447 deletions(-) create mode 100644 drivers/net/vmxnet3/Makefile create mode 100644 drivers/net/vmxnet3/base/README create mode 100644 drivers/net/vmxnet3/base/includeCheck.h create mode 100644 drivers/net/vmxnet3/base/upt1_defs.h create mode 100644 drivers/net/vmxnet3/base/vmware_pack_begin.h create mode 100644 drivers/net/vmxnet3/base/vmware_pack_end.h create mode 100644 drivers/net/vmxnet3/base/vmxnet3_defs.h create mode 100644 drivers/net/vmxnet3/base/vmxnet3_osdep.h create mode 100644 drivers/net/vmxnet3/rte_pmd_vmxnet3_version.map create mode 100644 drivers/net/vmxnet3/vmxnet3_ethdev.c create mode 100644 drivers/net/vmxnet3/vmxnet3_ethdev.h create mode 100644 drivers/net/vmxnet3/vmxnet3_logs.h create mode 100644 drivers/net/vmxnet3/vmxnet3_ring.h create mode 100644 drivers/net/vmxnet3/vmxnet3_rxtx.c delete mode 100644 lib/librte_pmd_vmxnet3/Makefile delete mode 100644 lib/librte_pmd_vmxnet3/rte_pmd_vmxnet3_version.map delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/README delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/includeCheck.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/upt1_defs.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_begin.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmware_pack_end.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_defs.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3/vmxnet3_osdep.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.c delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_ethdev.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_logs.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_ring.h delete mode 100644 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 48dd328..1940393 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -43,7 +43,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio -#DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 +DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt include $(RTE_SDK)/mk/rte.sharelib.mk diff --git a/drivers/net/vmxnet3/Makefile b/drivers/net/vmxnet3/Makefile new file mode 100644 index 000..901cee1 --- /dev/null +++ b/drivers/net/vmxnet3/Makefile @@ -0,0 +1,84 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +#
[dpdk-dev] [PATCH v2 14/19] virtio: move virtio PMD to drivers/net
Move virtio PMD to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/virtio/Makefile | 60 + drivers/net/virtio/rte_pmd_virtio_version.map|4 + drivers/net/virtio/virtio_ethdev.c | 1504 ++ drivers/net/virtio/virtio_ethdev.h | 124 ++ drivers/net/virtio/virtio_logs.h | 70 + drivers/net/virtio/virtio_pci.c | 147 +++ drivers/net/virtio/virtio_pci.h | 270 drivers/net/virtio/virtio_ring.h | 163 +++ drivers/net/virtio/virtio_rxtx.c | 815 drivers/net/virtio/virtqueue.c | 70 + drivers/net/virtio/virtqueue.h | 325 + lib/Makefile |1 - lib/librte_pmd_virtio/Makefile | 60 - lib/librte_pmd_virtio/rte_pmd_virtio_version.map |4 - lib/librte_pmd_virtio/virtio_ethdev.c| 1504 -- lib/librte_pmd_virtio/virtio_ethdev.h| 124 -- lib/librte_pmd_virtio/virtio_logs.h | 70 - lib/librte_pmd_virtio/virtio_pci.c | 147 --- lib/librte_pmd_virtio/virtio_pci.h | 270 lib/librte_pmd_virtio/virtio_ring.h | 163 --- lib/librte_pmd_virtio/virtio_rxtx.c | 815 lib/librte_pmd_virtio/virtqueue.c| 70 - lib/librte_pmd_virtio/virtqueue.h| 325 - 24 files changed, 3553 insertions(+), 3554 deletions(-) create mode 100644 drivers/net/virtio/Makefile create mode 100644 drivers/net/virtio/rte_pmd_virtio_version.map create mode 100644 drivers/net/virtio/virtio_ethdev.c create mode 100644 drivers/net/virtio/virtio_ethdev.h create mode 100644 drivers/net/virtio/virtio_logs.h create mode 100644 drivers/net/virtio/virtio_pci.c create mode 100644 drivers/net/virtio/virtio_pci.h create mode 100644 drivers/net/virtio/virtio_ring.h create mode 100644 drivers/net/virtio/virtio_rxtx.c create mode 100644 drivers/net/virtio/virtqueue.c create mode 100644 drivers/net/virtio/virtqueue.h delete mode 100644 lib/librte_pmd_virtio/Makefile delete mode 100644 lib/librte_pmd_virtio/rte_pmd_virtio_version.map delete mode 100644 lib/librte_pmd_virtio/virtio_ethdev.c delete mode 100644 lib/librte_pmd_virtio/virtio_ethdev.h delete mode 100644 lib/librte_pmd_virtio/virtio_logs.h delete mode 100644 lib/librte_pmd_virtio/virtio_pci.c delete mode 100644 lib/librte_pmd_virtio/virtio_pci.h delete mode 100644 lib/librte_pmd_virtio/virtio_ring.h delete mode 100644 lib/librte_pmd_virtio/virtio_rxtx.c delete mode 100644 lib/librte_pmd_virtio/virtqueue.c delete mode 100644 lib/librte_pmd_virtio/virtqueue.h diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 267d386..48dd328 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -42,7 +42,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring -#DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio +DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/net/virtio/Makefile b/drivers/net/virtio/Makefile new file mode 100644 index 000..21ff7e5 --- /dev/null +++ b/drivers/net/virtio/Makefile @@ -0,0 +1,60 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA,
[dpdk-dev] [PATCH v2 13/19] ring pmd: move ring PMD to the drivers directory
Move ring PMD to drivers directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile | 2 +- drivers/net/ring/Makefile| 61 +++ drivers/net/ring/rte_eth_ring.c | 579 +++ drivers/net/ring/rte_eth_ring.h | 57 +++ drivers/net/ring/rte_eth_ring_version.map| 9 + lib/Makefile | 1 - lib/librte_eal/bsdapp/eal/Makefile | 2 +- lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_ring/Makefile | 61 --- lib/librte_pmd_ring/rte_eth_ring.c | 579 --- lib/librte_pmd_ring/rte_eth_ring.h | 57 --- lib/librte_pmd_ring/rte_eth_ring_version.map | 9 - 12 files changed, 709 insertions(+), 710 deletions(-) create mode 100644 drivers/net/ring/Makefile create mode 100644 drivers/net/ring/rte_eth_ring.c create mode 100644 drivers/net/ring/rte_eth_ring.h create mode 100644 drivers/net/ring/rte_eth_ring_version.map delete mode 100644 lib/librte_pmd_ring/Makefile delete mode 100644 lib/librte_pmd_ring/rte_eth_ring.c delete mode 100644 lib/librte_pmd_ring/rte_eth_ring.h delete mode 100644 lib/librte_pmd_ring/rte_eth_ring_version.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index d9cba6c..267d386 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -41,7 +41,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring +DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += ring #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/net/ring/Makefile b/drivers/net/ring/Makefile new file mode 100644 index 000..e442d0b --- /dev/null +++ b/drivers/net/ring/Makefile @@ -0,0 +1,61 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_ring.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +EXPORT_MAP := rte_eth_ring_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_RING) += rte_eth_ring.c + +# +# Export include files +# +SYMLINK-y-include += rte_eth_ring.h + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += lib/librte_eal lib/librte_ring +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += lib/librte_mbuf lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c new file mode 100644 index 000..6832f01 --- /dev/null +++ b/drivers/net/ring/rte_eth_ring.c @@ -0,0 +1,579 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the followin
[dpdk-dev] [PATCH v2 12/19] pcap: move pcap pmd to drivers/net
Move pcap pmd to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile | 2 +- drivers/net/pcap/Makefile| 63 ++ drivers/net/pcap/rte_eth_pcap.c | 994 +++ drivers/net/pcap/rte_pmd_pcap_version.map| 4 + lib/Makefile | 1 - lib/librte_eal/bsdapp/eal/Makefile | 4 +- lib/librte_eal/linuxapp/eal/Makefile | 2 +- lib/librte_pmd_pcap/Makefile | 63 -- lib/librte_pmd_pcap/rte_eth_pcap.c | 994 --- lib/librte_pmd_pcap/rte_pmd_pcap_version.map | 4 - 10 files changed, 1065 insertions(+), 1066 deletions(-) create mode 100644 drivers/net/pcap/Makefile create mode 100644 drivers/net/pcap/rte_eth_pcap.c create mode 100644 drivers/net/pcap/rte_pmd_pcap_version.map delete mode 100644 lib/librte_pmd_pcap/Makefile delete mode 100644 lib/librte_pmd_pcap/rte_eth_pcap.c delete mode 100644 lib/librte_pmd_pcap/rte_pmd_pcap_version.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index bbed6f8..d9cba6c 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -40,8 +40,8 @@ DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null +DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += pcap #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/net/pcap/Makefile b/drivers/net/pcap/Makefile new file mode 100644 index 000..0775dbc --- /dev/null +++ b/drivers/net/pcap/Makefile @@ -0,0 +1,63 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2014 6WIND S.A. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_pcap.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +EXPORT_MAP := rte_pmd_pcap_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += rte_eth_pcap.c + +# +# Export include files +# +SYMLINK-y-include += + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c new file mode 100644 index 000..ff9b534 --- /dev/null +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -0,0 +1,994 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2014 Intel Corporation. All rights reserved. + * Copyright(c) 2014 6WIND S.A. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the ab
[dpdk-dev] [PATCH v2 11/19] null pmd: move null PMD to drivers/net directory
Move null PMD to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile | 2 +- drivers/net/null/Makefile| 62 +++ drivers/net/null/rte_eth_null.c | 585 +++ drivers/net/null/rte_pmd_null_version.map| 4 + lib/Makefile | 1 - lib/librte_pmd_null/Makefile | 62 --- lib/librte_pmd_null/rte_eth_null.c | 585 --- lib/librte_pmd_null/rte_pmd_null_version.map | 4 - 8 files changed, 652 insertions(+), 653 deletions(-) create mode 100644 drivers/net/null/Makefile create mode 100644 drivers/net/null/rte_eth_null.c create mode 100644 drivers/net/null/rte_pmd_null_version.map delete mode 100644 lib/librte_pmd_null/Makefile delete mode 100644 lib/librte_pmd_null/rte_eth_null.c delete mode 100644 lib/librte_pmd_null/rte_pmd_null_version.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index b73a0bc..bbed6f8 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -39,12 +39,12 @@ DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 +DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += null #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += librte_pmd_null include $(RTE_SDK)/mk/rte.sharelib.mk include $(RTE_SDK)/mk/rte.subdir.mk diff --git a/drivers/net/null/Makefile b/drivers/net/null/Makefile new file mode 100644 index 000..6472015 --- /dev/null +++ b/drivers/net/null/Makefile @@ -0,0 +1,62 @@ +# BSD LICENSE +# +# Copyright (C) IGEL Co.,Ltd. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of IGEL Co.,Ltd. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_null.a + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +EXPORT_MAP := rte_pmd_null_version.map + +LIBABIVER := 1 + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += rte_eth_null.c + +# +# Export include files +# +SYMLINK-y-include += + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_NULL) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c new file mode 100644 index 000..5895065 --- /dev/null +++ b/drivers/net/null/rte_eth_null.c @@ -0,0 +1,585 @@ +/*- + * BSD LICENSE + * + * Copyright (C) IGEL Co.,Ltd. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation a
[dpdk-dev] [PATCH v2 10/19] mlx4: move mlx4 PMD to drivers/net directory
move mlx4 PMD to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/mlx4/Makefile| 121 + drivers/net/mlx4/mlx4.c | 4686 ++ drivers/net/mlx4/mlx4.h | 157 + drivers/net/mlx4/rte_pmd_mlx4_version.map|4 + lib/Makefile |1 - lib/librte_pmd_mlx4/Makefile | 121 - lib/librte_pmd_mlx4/mlx4.c | 4686 -- lib/librte_pmd_mlx4/mlx4.h | 157 - lib/librte_pmd_mlx4/rte_pmd_mlx4_version.map |4 - 10 files changed, 4969 insertions(+), 4970 deletions(-) create mode 100644 drivers/net/mlx4/Makefile create mode 100644 drivers/net/mlx4/mlx4.c create mode 100644 drivers/net/mlx4/mlx4.h create mode 100644 drivers/net/mlx4/rte_pmd_mlx4_version.map delete mode 100644 lib/librte_pmd_mlx4/Makefile delete mode 100644 lib/librte_pmd_mlx4/mlx4.c delete mode 100644 lib/librte_pmd_mlx4/mlx4.h delete mode 100644 lib/librte_pmd_mlx4/rte_pmd_mlx4_version.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 001270d..b73a0bc 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -38,7 +38,7 @@ DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += enic DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += fm10k DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += i40e DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += ixgbe -#DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += librte_pmd_mlx4 +DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile new file mode 100644 index 000..97b364a --- /dev/null +++ b/drivers/net/mlx4/Makefile @@ -0,0 +1,121 @@ +# BSD LICENSE +# +# Copyright 2012-2015 6WIND S.A. +# Copyright 2012 Mellanox. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of 6WIND S.A. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# Library name. +LIB = librte_pmd_mlx4.a + +# Sources. +SRCS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += mlx4.c + +# Dependencies. +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_eal +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_mempool +DEPDIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += lib/librte_malloc + +# Basic CFLAGS. +CFLAGS += -O3 +CFLAGS += -std=gnu99 -Wall -Wextra +CFLAGS += -g +CFLAGS += -I. +CFLAGS += -D_XOPEN_SOURCE=600 +CFLAGS += $(WERROR_FLAGS) + +# A few warnings cannot be avoided in external headers. +CFLAGS += -Wno-error=cast-qual + +EXPORT_MAP := rte_pmd_mlx4_version.map +LIBABIVER := 1 + +# DEBUG which is usually provided on the command-line may enable +# CONFIG_RTE_LIBRTE_MLX4_DEBUG. +ifeq ($(DEBUG),1) +CONFIG_RTE_LIBRTE_MLX4_DEBUG := y +endif + +# User-defined CFLAGS. +ifeq ($(CONFIG_RTE_LIBRTE_MLX4_DEBUG),y) +CFLAGS += -pedantic -UNDEBUG -DPEDANTIC +else +CFLAGS += -DNDEBUG -UPEDANTIC +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N +CFLAGS += -DMLX4_PMD_SGE_WR_N=$(CONFIG_RTE_LIBRTE_MLX4_SGE_WR_N) +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE +CFLAGS += -DMLX4_PMD_MAX_INLINE=$(CONFIG_RTE_LIBRTE_MLX4_MAX_INLINE) +endif + +ifdef CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE +CFLAGS += -DMLX4_PMD_TX_MP_CACHE=$(CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE
[dpdk-dev] [PATCH v2 09/19] ixbge: move ixgbe PMD to drivers/net directory
move ixgbe PMD to drivers/net directory. As part of the move, we rename the ixgbe directory, containing the ixgbe "base driver" code, from "ixgbe" to "base". Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/ixgbe/Makefile | 126 + drivers/net/ixgbe/base/README | 67 + drivers/net/ixgbe/base/ixgbe_82598.c | 1435 +++ drivers/net/ixgbe/base/ixgbe_82598.h | 52 + drivers/net/ixgbe/base/ixgbe_82599.c | 2713 + drivers/net/ixgbe/base/ixgbe_82599.h | 65 + drivers/net/ixgbe/base/ixgbe_api.c | 1477 +++ drivers/net/ixgbe/base/ixgbe_api.h | 206 + drivers/net/ixgbe/base/ixgbe_common.c | 4940 drivers/net/ixgbe/base/ixgbe_common.h | 183 + drivers/net/ixgbe/base/ixgbe_dcb.c | 714 drivers/net/ixgbe/base/ixgbe_dcb.h | 174 + drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 360 ++ drivers/net/ixgbe/base/ixgbe_dcb_82598.h | 99 + drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 593 +++ drivers/net/ixgbe/base/ixgbe_dcb_82599.h | 153 + drivers/net/ixgbe/base/ixgbe_mbx.c | 789 drivers/net/ixgbe/base/ixgbe_mbx.h | 150 + drivers/net/ixgbe/base/ixgbe_osdep.h | 155 + drivers/net/ixgbe/base/ixgbe_phy.c | 2583 + drivers/net/ixgbe/base/ixgbe_phy.h | 181 + drivers/net/ixgbe/base/ixgbe_type.h| 3858 ++ drivers/net/ixgbe/base/ixgbe_vf.c | 724 drivers/net/ixgbe/base/ixgbe_vf.h | 140 + drivers/net/ixgbe/base/ixgbe_x540.c| 1040 + drivers/net/ixgbe/base/ixgbe_x540.h| 66 + drivers/net/ixgbe/base/ixgbe_x550.c| 2113 ++ drivers/net/ixgbe/base/ixgbe_x550.h| 91 + drivers/net/ixgbe/ixgbe_82599_bypass.c | 314 ++ drivers/net/ixgbe/ixgbe_bypass.c | 414 ++ drivers/net/ixgbe/ixgbe_bypass.h | 68 + drivers/net/ixgbe/ixgbe_bypass_api.h | 299 ++ drivers/net/ixgbe/ixgbe_bypass_defines.h | 160 + drivers/net/ixgbe/ixgbe_ethdev.c | 4453 + drivers/net/ixgbe/ixgbe_ethdev.h | 400 ++ drivers/net/ixgbe/ixgbe_fdir.c | 1144 ++ drivers/net/ixgbe/ixgbe_logs.h | 78 + drivers/net/ixgbe/ixgbe_pf.c | 629 +++ drivers/net/ixgbe/ixgbe_rxtx.c | 4780 +++ drivers/net/ixgbe/ixgbe_rxtx.h | 293 ++ drivers/net/ixgbe/ixgbe_rxtx_vec.c | 792 drivers/net/ixgbe/rte_pmd_ixgbe_version.map|4 + lib/Makefile |1 - lib/librte_pmd_ixgbe/Makefile | 126 - lib/librte_pmd_ixgbe/ixgbe/README | 67 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 1435 --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 52 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 2713 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.h | 65 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 1477 --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 206 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 4940 lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 183 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.c | 714 lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.h | 174 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.c | 360 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.h | 99 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 593 --- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.h | 153 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_mbx.c | 789 lib/librte_pmd_ixgbe/ixgbe/ixgbe_mbx.h | 150 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 155 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 2583 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 181 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h| 3858 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c | 724 lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.h | 140 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c| 1040 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.h| 66 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c| 2113 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h| 91 - lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c | 314 -- lib/librte_pmd_ixgbe/ixgbe_bypass.c| 414 -- lib/librte_pmd_ixgbe/ixgbe_bypass.h| 68 - lib/librte_pmd_ixgbe/ixgbe_bypass_api.h| 299 -- lib/librte_pmd_ixgbe/ixgbe_bypass_defines.h| 160 - lib/librte_pmd_ixgbe/ixgbe_ethdev.c| 4453 - lib/librte_pmd_ixgbe/ixgbe_ethdev.h| 400 -- lib/librte_pmd_
[dpdk-dev] [PATCH v2 08/19] i40e: move i40e PMD to drivers/net directory
Move i40e PMD to drivers/net directory. As part of the move, rename the "i40e" directory, containing the "base driver" code, from "i40e" to "base". Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/i40e/Makefile| 105 + drivers/net/i40e/base/i40e_adminq.c | 1084 + drivers/net/i40e/base/i40e_adminq.h | 157 + drivers/net/i40e/base/i40e_adminq_cmd.h | 2179 ++ drivers/net/i40e/base/i40e_alloc.h | 65 + drivers/net/i40e/base/i40e_common.c | 4793 + drivers/net/i40e/base/i40e_dcb.c | 479 +++ drivers/net/i40e/base/i40e_dcb.h | 161 + drivers/net/i40e/base/i40e_diag.c| 178 + drivers/net/i40e/base/i40e_diag.h| 61 + drivers/net/i40e/base/i40e_hmc.c | 373 ++ drivers/net/i40e/base/i40e_hmc.h | 243 ++ drivers/net/i40e/base/i40e_lan_hmc.c | 1417 +++ drivers/net/i40e/base/i40e_lan_hmc.h | 200 + drivers/net/i40e/base/i40e_nvm.c | 940 + drivers/net/i40e/base/i40e_osdep.h | 197 + drivers/net/i40e/base/i40e_prototype.h | 430 ++ drivers/net/i40e/base/i40e_register.h| 3377 +++ drivers/net/i40e/base/i40e_status.h | 107 + drivers/net/i40e/base/i40e_type.h| 1425 +++ drivers/net/i40e/base/i40e_virtchnl.h| 373 ++ drivers/net/i40e/i40e_ethdev.c | 5716 ++ drivers/net/i40e/i40e_ethdev.h | 567 +++ drivers/net/i40e/i40e_ethdev_vf.c| 1893 + drivers/net/i40e/i40e_fdir.c | 1361 ++ drivers/net/i40e/i40e_logs.h | 78 + drivers/net/i40e/i40e_pf.c | 1063 + drivers/net/i40e/i40e_pf.h | 127 + drivers/net/i40e/i40e_rxtx.c | 2709 drivers/net/i40e/i40e_rxtx.h | 211 + drivers/net/i40e/rte_pmd_i40e_version.map|4 + lib/Makefile |1 - lib/librte_pmd_i40e/Makefile | 105 - lib/librte_pmd_i40e/i40e/i40e_adminq.c | 1084 - lib/librte_pmd_i40e/i40e/i40e_adminq.h | 157 - lib/librte_pmd_i40e/i40e/i40e_adminq_cmd.h | 2179 -- lib/librte_pmd_i40e/i40e/i40e_alloc.h| 65 - lib/librte_pmd_i40e/i40e/i40e_common.c | 4793 - lib/librte_pmd_i40e/i40e/i40e_dcb.c | 479 --- lib/librte_pmd_i40e/i40e/i40e_dcb.h | 161 - lib/librte_pmd_i40e/i40e/i40e_diag.c | 178 - lib/librte_pmd_i40e/i40e/i40e_diag.h | 61 - lib/librte_pmd_i40e/i40e/i40e_hmc.c | 373 -- lib/librte_pmd_i40e/i40e/i40e_hmc.h | 243 -- lib/librte_pmd_i40e/i40e/i40e_lan_hmc.c | 1417 --- lib/librte_pmd_i40e/i40e/i40e_lan_hmc.h | 200 - lib/librte_pmd_i40e/i40e/i40e_nvm.c | 940 - lib/librte_pmd_i40e/i40e/i40e_osdep.h| 197 - lib/librte_pmd_i40e/i40e/i40e_prototype.h| 430 -- lib/librte_pmd_i40e/i40e/i40e_register.h | 3377 --- lib/librte_pmd_i40e/i40e/i40e_status.h | 107 - lib/librte_pmd_i40e/i40e/i40e_type.h | 1425 --- lib/librte_pmd_i40e/i40e/i40e_virtchnl.h | 373 -- lib/librte_pmd_i40e/i40e_ethdev.c| 5716 -- lib/librte_pmd_i40e/i40e_ethdev.h| 567 --- lib/librte_pmd_i40e/i40e_ethdev_vf.c | 1893 - lib/librte_pmd_i40e/i40e_fdir.c | 1361 -- lib/librte_pmd_i40e/i40e_logs.h | 78 - lib/librte_pmd_i40e/i40e_pf.c| 1063 - lib/librte_pmd_i40e/i40e_pf.h| 127 - lib/librte_pmd_i40e/i40e_rxtx.c | 2709 lib/librte_pmd_i40e/i40e_rxtx.h | 211 - lib/librte_pmd_i40e/rte_pmd_i40e_version.map |4 - 64 files changed, 32074 insertions(+), 32075 deletions(-) create mode 100644 drivers/net/i40e/Makefile create mode 100644 drivers/net/i40e/base/i40e_adminq.c create mode 100644 drivers/net/i40e/base/i40e_adminq.h create mode 100644 drivers/net/i40e/base/i40e_adminq_cmd.h create mode 100644 drivers/net/i40e/base/i40e_alloc.h create mode 100644 drivers/net/i40e/base/i40e_common.c create mode 100644 drivers/net/i40e/base/i40e_dcb.c create mode 100644 drivers/net/i40e/base/i40e_dcb.h create mode 100644 drivers/net/i40e/base/i40e_diag.c create mode 100644 drivers/net/i40e/base/i40e_diag.h create mode 100644 drivers/net/i40e/base/i40e_hmc.c create mode 100644 drivers/net/i40e/base/i40e_hmc.h create mode 100644 drivers/net/i40e/base/i40e_lan_hmc.c create mode 100644 drivers/net/i40e/base/i40e_lan_hmc.h create mode 100644 drivers/net/i40e/base/i40e_nvm.c create mode 100644 drivers/net/i40e/base/i40e_osdep.h create mode 100644 drivers/net/i40e/base/i40e_prototype.h create mode 100644 drivers/net/i40e/base/i40e_register
[dpdk-dev] [PATCH v2 07/19] fm10k: move fm10k PMD to drivers/net directory
move fm10k PMD to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/fm10k/Makefile | 102 ++ drivers/net/fm10k/base/fm10k_api.c | 341 drivers/net/fm10k/base/fm10k_api.h | 61 + drivers/net/fm10k/base/fm10k_common.c | 572 +++ drivers/net/fm10k/base/fm10k_common.h | 52 + drivers/net/fm10k/base/fm10k_mbx.c | 2185 drivers/net/fm10k/base/fm10k_mbx.h | 329 drivers/net/fm10k/base/fm10k_osdep.h | 148 ++ drivers/net/fm10k/base/fm10k_pf.c | 1992 + drivers/net/fm10k/base/fm10k_pf.h | 155 ++ drivers/net/fm10k/base/fm10k_tlv.c | 914 ++ drivers/net/fm10k/base/fm10k_tlv.h | 199 +++ drivers/net/fm10k/base/fm10k_type.h| 937 ++ drivers/net/fm10k/base/fm10k_vf.c | 641 +++ drivers/net/fm10k/base/fm10k_vf.h | 91 + drivers/net/fm10k/fm10k.h | 292 drivers/net/fm10k/fm10k_ethdev.c | 1872 drivers/net/fm10k/fm10k_logs.h | 80 + drivers/net/fm10k/fm10k_rxtx.c | 461 + drivers/net/fm10k/rte_pmd_fm10k_version.map|4 + lib/Makefile |1 - lib/librte_pmd_fm10k/Makefile | 102 -- lib/librte_pmd_fm10k/base/fm10k_api.c | 341 lib/librte_pmd_fm10k/base/fm10k_api.h | 61 - lib/librte_pmd_fm10k/base/fm10k_common.c | 572 --- lib/librte_pmd_fm10k/base/fm10k_common.h | 52 - lib/librte_pmd_fm10k/base/fm10k_mbx.c | 2185 lib/librte_pmd_fm10k/base/fm10k_mbx.h | 329 lib/librte_pmd_fm10k/base/fm10k_osdep.h| 148 -- lib/librte_pmd_fm10k/base/fm10k_pf.c | 1992 - lib/librte_pmd_fm10k/base/fm10k_pf.h | 155 -- lib/librte_pmd_fm10k/base/fm10k_tlv.c | 914 -- lib/librte_pmd_fm10k/base/fm10k_tlv.h | 199 --- lib/librte_pmd_fm10k/base/fm10k_type.h | 937 -- lib/librte_pmd_fm10k/base/fm10k_vf.c | 641 --- lib/librte_pmd_fm10k/base/fm10k_vf.h | 91 - lib/librte_pmd_fm10k/fm10k.h | 292 lib/librte_pmd_fm10k/fm10k_ethdev.c| 1872 lib/librte_pmd_fm10k/fm10k_logs.h | 80 - lib/librte_pmd_fm10k/fm10k_rxtx.c | 461 - lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map |4 - 42 files changed, 11429 insertions(+), 11430 deletions(-) create mode 100644 drivers/net/fm10k/Makefile create mode 100644 drivers/net/fm10k/base/fm10k_api.c create mode 100644 drivers/net/fm10k/base/fm10k_api.h create mode 100644 drivers/net/fm10k/base/fm10k_common.c create mode 100644 drivers/net/fm10k/base/fm10k_common.h create mode 100644 drivers/net/fm10k/base/fm10k_mbx.c create mode 100644 drivers/net/fm10k/base/fm10k_mbx.h create mode 100644 drivers/net/fm10k/base/fm10k_osdep.h create mode 100644 drivers/net/fm10k/base/fm10k_pf.c create mode 100644 drivers/net/fm10k/base/fm10k_pf.h create mode 100644 drivers/net/fm10k/base/fm10k_tlv.c create mode 100644 drivers/net/fm10k/base/fm10k_tlv.h create mode 100644 drivers/net/fm10k/base/fm10k_type.h create mode 100644 drivers/net/fm10k/base/fm10k_vf.c create mode 100644 drivers/net/fm10k/base/fm10k_vf.h create mode 100644 drivers/net/fm10k/fm10k.h create mode 100644 drivers/net/fm10k/fm10k_ethdev.c create mode 100644 drivers/net/fm10k/fm10k_logs.h create mode 100644 drivers/net/fm10k/fm10k_rxtx.c create mode 100644 drivers/net/fm10k/rte_pmd_fm10k_version.map delete mode 100644 lib/librte_pmd_fm10k/Makefile delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_api.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_common.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_mbx.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_osdep.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_pf.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_pf.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_tlv.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_tlv.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_type.h delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_vf.c delete mode 100644 lib/librte_pmd_fm10k/base/fm10k_vf.h delete mode 100644 lib/librte_pmd_fm10k/fm10k.h delete mode 100644 lib/librte_pmd_fm10k/fm10k_ethdev.c delete mode 100644 lib/librte_pmd_fm10k/fm10k_logs.h delete mode 100644 lib/librte_pmd_fm10k/fm10k_rxtx.c delete mode 100644 lib/librte_pmd_fm10k/rte_pmd_fm10k_version.map diff --git a
[dpdk-dev] [PATCH v2 06/19] enic: move enic PMD to drivers/net directory
move enic PMD to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/enic/LICENSE | 27 + drivers/net/enic/Makefile| 71 ++ drivers/net/enic/enic.h | 200 + drivers/net/enic/enic_clsf.c | 259 ++ drivers/net/enic/enic_compat.h | 147 drivers/net/enic/enic_ethdev.c | 640 +++ drivers/net/enic/enic_main.c | 1117 ++ drivers/net/enic/enic_res.c | 219 + drivers/net/enic/enic_res.h | 168 drivers/net/enic/rte_pmd_enic_version.map|4 + drivers/net/enic/vnic/cq_desc.h | 126 +++ drivers/net/enic/vnic/cq_enet_desc.h | 261 ++ drivers/net/enic/vnic/rq_enet_desc.h | 76 ++ drivers/net/enic/vnic/vnic_cq.c | 117 +++ drivers/net/enic/vnic/vnic_cq.h | 151 drivers/net/enic/vnic/vnic_dev.c | 1054 drivers/net/enic/vnic/vnic_dev.h | 212 + drivers/net/enic/vnic/vnic_devcmd.h | 774 ++ drivers/net/enic/vnic/vnic_enet.h| 78 ++ drivers/net/enic/vnic/vnic_intr.c| 78 ++ drivers/net/enic/vnic/vnic_intr.h| 126 +++ drivers/net/enic/vnic/vnic_nic.h | 88 ++ drivers/net/enic/vnic/vnic_resource.h| 97 +++ drivers/net/enic/vnic/vnic_rq.c | 245 ++ drivers/net/enic/vnic/vnic_rq.h | 282 +++ drivers/net/enic/vnic/vnic_rss.c | 85 ++ drivers/net/enic/vnic/vnic_rss.h | 61 ++ drivers/net/enic/vnic/vnic_stats.h | 86 ++ drivers/net/enic/vnic/vnic_wq.c | 245 ++ drivers/net/enic/vnic/vnic_wq.h | 283 +++ drivers/net/enic/vnic/wq_enet_desc.h | 114 +++ lib/Makefile |1 - lib/librte_pmd_enic/LICENSE | 27 - lib/librte_pmd_enic/Makefile | 71 -- lib/librte_pmd_enic/enic.h | 200 - lib/librte_pmd_enic/enic_clsf.c | 259 -- lib/librte_pmd_enic/enic_compat.h| 147 lib/librte_pmd_enic/enic_ethdev.c| 640 --- lib/librte_pmd_enic/enic_main.c | 1117 -- lib/librte_pmd_enic/enic_res.c | 219 - lib/librte_pmd_enic/enic_res.h | 168 lib/librte_pmd_enic/rte_pmd_enic_version.map |4 - lib/librte_pmd_enic/vnic/cq_desc.h | 126 --- lib/librte_pmd_enic/vnic/cq_enet_desc.h | 261 -- lib/librte_pmd_enic/vnic/rq_enet_desc.h | 76 -- lib/librte_pmd_enic/vnic/vnic_cq.c | 117 --- lib/librte_pmd_enic/vnic/vnic_cq.h | 151 lib/librte_pmd_enic/vnic/vnic_dev.c | 1054 lib/librte_pmd_enic/vnic/vnic_dev.h | 212 - lib/librte_pmd_enic/vnic/vnic_devcmd.h | 774 -- lib/librte_pmd_enic/vnic/vnic_enet.h | 78 -- lib/librte_pmd_enic/vnic/vnic_intr.c | 78 -- lib/librte_pmd_enic/vnic/vnic_intr.h | 126 --- lib/librte_pmd_enic/vnic/vnic_nic.h | 88 -- lib/librte_pmd_enic/vnic/vnic_resource.h | 97 --- lib/librte_pmd_enic/vnic/vnic_rq.c | 245 -- lib/librte_pmd_enic/vnic/vnic_rq.h | 282 --- lib/librte_pmd_enic/vnic/vnic_rss.c | 85 -- lib/librte_pmd_enic/vnic/vnic_rss.h | 61 -- lib/librte_pmd_enic/vnic/vnic_stats.h| 86 -- lib/librte_pmd_enic/vnic/vnic_wq.c | 245 -- lib/librte_pmd_enic/vnic/vnic_wq.h | 283 --- lib/librte_pmd_enic/vnic/wq_enet_desc.h | 114 --- 64 files changed, 7492 insertions(+), 7493 deletions(-) create mode 100644 drivers/net/enic/LICENSE create mode 100644 drivers/net/enic/Makefile create mode 100644 drivers/net/enic/enic.h create mode 100644 drivers/net/enic/enic_clsf.c create mode 100644 drivers/net/enic/enic_compat.h create mode 100644 drivers/net/enic/enic_ethdev.c create mode 100644 drivers/net/enic/enic_main.c create mode 100644 drivers/net/enic/enic_res.c create mode 100644 drivers/net/enic/enic_res.h create mode 100644 drivers/net/enic/rte_pmd_enic_version.map create mode 100644 drivers/net/enic/vnic/cq_desc.h create mode 100644 drivers/net/enic/vnic/cq_enet_desc.h create mode 100644 drivers/net/enic/vnic/rq_enet_desc.h create mode 100644 drivers/net/enic/vnic/vnic_cq.c create mode 100644 drivers/net/enic/vnic/vnic_cq.h create mode 100644 drivers/net/enic/vnic/vnic_dev.c create mode 100644 drivers/net/enic/vnic/vnic_dev.h create mode 100644 drivers/net/enic/vnic/vnic_devcmd.h create mode 100644 drivers/net/enic/vnic/vnic_enet.h create mode 100644 drivers/net/enic/vnic/vnic_intr.c create mod
[dpdk-dev] [PATCH v2 05/19] e1000: move e1000 pmd to drivers/net directory
Move e1000 pmd to drivers/net directory As part of move, rename "e1000" subdirectory, which contains the code from the "base driver", to "base". Signed-off-by: Bruce Richardson --- drivers/net/Makefile |2 +- drivers/net/e1000/Makefile | 99 + drivers/net/e1000/base/README | 39 + drivers/net/e1000/base/e1000_80003es2lan.c | 1514 +++ drivers/net/e1000/base/e1000_80003es2lan.h | 100 + drivers/net/e1000/base/e1000_82540.c | 717 drivers/net/e1000/base/e1000_82541.c | 1268 ++ drivers/net/e1000/base/e1000_82541.h | 91 + drivers/net/e1000/base/e1000_82542.c | 588 +++ drivers/net/e1000/base/e1000_82543.c | 1553 +++ drivers/net/e1000/base/e1000_82543.h | 56 + drivers/net/e1000/base/e1000_82571.c | 2026 + drivers/net/e1000/base/e1000_82571.h | 65 + drivers/net/e1000/base/e1000_82575.c | 3639 drivers/net/e1000/base/e1000_82575.h | 520 +++ drivers/net/e1000/base/e1000_api.c | 1357 ++ drivers/net/e1000/base/e1000_api.h | 167 + drivers/net/e1000/base/e1000_defines.h | 1498 +++ drivers/net/e1000/base/e1000_hw.h | 1026 + drivers/net/e1000/base/e1000_i210.c| 1000 + drivers/net/e1000/base/e1000_i210.h| 110 + drivers/net/e1000/base/e1000_ich8lan.c | 5260 drivers/net/e1000/base/e1000_ich8lan.h | 313 ++ drivers/net/e1000/base/e1000_mac.c | 2247 ++ drivers/net/e1000/base/e1000_mac.h | 95 + drivers/net/e1000/base/e1000_manage.c | 573 +++ drivers/net/e1000/base/e1000_manage.h | 95 + drivers/net/e1000/base/e1000_mbx.c | 777 drivers/net/e1000/base/e1000_mbx.h | 105 + drivers/net/e1000/base/e1000_nvm.c | 1377 +++ drivers/net/e1000/base/e1000_nvm.h | 98 + drivers/net/e1000/base/e1000_osdep.c | 83 + drivers/net/e1000/base/e1000_osdep.h | 183 + drivers/net/e1000/base/e1000_phy.c | 4273 +++ drivers/net/e1000/base/e1000_phy.h | 327 ++ drivers/net/e1000/base/e1000_regs.h| 685 +++ drivers/net/e1000/base/e1000_vf.c | 586 +++ drivers/net/e1000/base/e1000_vf.h | 295 ++ drivers/net/e1000/e1000_ethdev.h | 340 ++ drivers/net/e1000/e1000_logs.h | 78 + drivers/net/e1000/em_ethdev.c | 1530 +++ drivers/net/e1000/em_rxtx.c| 1865 + drivers/net/e1000/igb_ethdev.c | 3656 drivers/net/e1000/igb_pf.c | 511 +++ drivers/net/e1000/igb_rxtx.c | 2397 +++ drivers/net/e1000/rte_pmd_e1000_version.map|4 + lib/Makefile |1 - lib/librte_pmd_e1000/Makefile | 99 - lib/librte_pmd_e1000/e1000/README | 39 - lib/librte_pmd_e1000/e1000/e1000_80003es2lan.c | 1514 --- lib/librte_pmd_e1000/e1000/e1000_80003es2lan.h | 100 - lib/librte_pmd_e1000/e1000/e1000_82540.c | 717 lib/librte_pmd_e1000/e1000/e1000_82541.c | 1268 -- lib/librte_pmd_e1000/e1000/e1000_82541.h | 91 - lib/librte_pmd_e1000/e1000/e1000_82542.c | 588 --- lib/librte_pmd_e1000/e1000/e1000_82543.c | 1553 --- lib/librte_pmd_e1000/e1000/e1000_82543.h | 56 - lib/librte_pmd_e1000/e1000/e1000_82571.c | 2026 - lib/librte_pmd_e1000/e1000/e1000_82571.h | 65 - lib/librte_pmd_e1000/e1000/e1000_82575.c | 3639 lib/librte_pmd_e1000/e1000/e1000_82575.h | 520 --- lib/librte_pmd_e1000/e1000/e1000_api.c | 1357 -- lib/librte_pmd_e1000/e1000/e1000_api.h | 167 - lib/librte_pmd_e1000/e1000/e1000_defines.h | 1498 --- lib/librte_pmd_e1000/e1000/e1000_hw.h | 1026 - lib/librte_pmd_e1000/e1000/e1000_i210.c| 1000 - lib/librte_pmd_e1000/e1000/e1000_i210.h| 110 - lib/librte_pmd_e1000/e1000/e1000_ich8lan.c | 5260 lib/librte_pmd_e1000/e1000/e1000_ich8lan.h | 313 -- lib/librte_pmd_e1000/e1000/e1000_mac.c | 2247 -- lib/librte_pmd_e1000/e1000/e1000_mac.h | 95 - lib/librte_pmd_e1000/e1000/e1000_manage.c | 573 --- lib/librte_pmd_e1000/e1000/e1000_manage.h | 95 - lib/librte_pmd_e1000/e1000/e1000_mbx.c | 777 lib/librte_pmd_e1000/e1000/e1000_mbx.h | 105 - lib/librte_pmd_e1000/e1000/e1000_nvm.c | 1377 --- lib/librte_pmd_e1000/e1000/e1000_nvm.h | 98 - lib/librte_pmd_e1000/e1000/e1000_osdep.c | 83 - lib/librte_pmd_e1000/e1000/e1000_osdep.h | 183 - lib/librte_pmd_e1000/e100
[dpdk-dev] [PATCH v2 04/19] bond: Move bonded ethdev pmd to drivers/net
Move bonded ethdev pmd to drivers/net Signed-off-by: Bruce Richardson --- doc/api/doxy-api.conf |2 +- drivers/net/Makefile |2 +- drivers/net/bonding/Makefile | 68 + drivers/net/bonding/rte_eth_bond.h| 366 drivers/net/bonding/rte_eth_bond_8023ad.c | 1216 +++ drivers/net/bonding/rte_eth_bond_8023ad.h | 222 ++ drivers/net/bonding/rte_eth_bond_8023ad_private.h | 308 +++ drivers/net/bonding/rte_eth_bond_alb.c| 287 +++ drivers/net/bonding/rte_eth_bond_alb.h| 142 ++ drivers/net/bonding/rte_eth_bond_api.c| 840 drivers/net/bonding/rte_eth_bond_args.c | 278 +++ drivers/net/bonding/rte_eth_bond_pmd.c| 2269 + drivers/net/bonding/rte_eth_bond_private.h| 287 +++ drivers/net/bonding/rte_eth_bond_version.map | 22 + lib/Makefile |1 - lib/librte_pmd_bond/Makefile | 68 - lib/librte_pmd_bond/rte_eth_bond.h| 366 lib/librte_pmd_bond/rte_eth_bond_8023ad.c | 1216 --- lib/librte_pmd_bond/rte_eth_bond_8023ad.h | 222 -- lib/librte_pmd_bond/rte_eth_bond_8023ad_private.h | 308 --- lib/librte_pmd_bond/rte_eth_bond_alb.c| 287 --- lib/librte_pmd_bond/rte_eth_bond_alb.h| 142 -- lib/librte_pmd_bond/rte_eth_bond_api.c| 840 lib/librte_pmd_bond/rte_eth_bond_args.c | 278 --- lib/librte_pmd_bond/rte_eth_bond_pmd.c| 2269 - lib/librte_pmd_bond/rte_eth_bond_private.h| 287 --- lib/librte_pmd_bond/rte_eth_bond_version.map | 22 - 27 files changed, 6307 insertions(+), 6308 deletions(-) create mode 100644 drivers/net/bonding/Makefile create mode 100644 drivers/net/bonding/rte_eth_bond.h create mode 100644 drivers/net/bonding/rte_eth_bond_8023ad.c create mode 100644 drivers/net/bonding/rte_eth_bond_8023ad.h create mode 100644 drivers/net/bonding/rte_eth_bond_8023ad_private.h create mode 100644 drivers/net/bonding/rte_eth_bond_alb.c create mode 100644 drivers/net/bonding/rte_eth_bond_alb.h create mode 100644 drivers/net/bonding/rte_eth_bond_api.c create mode 100644 drivers/net/bonding/rte_eth_bond_args.c create mode 100644 drivers/net/bonding/rte_eth_bond_pmd.c create mode 100644 drivers/net/bonding/rte_eth_bond_private.h create mode 100644 drivers/net/bonding/rte_eth_bond_version.map delete mode 100644 lib/librte_pmd_bond/Makefile delete mode 100644 lib/librte_pmd_bond/rte_eth_bond.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_8023ad.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_8023ad.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_8023ad_private.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_alb.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_api.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_args.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_pmd.c delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_private.h delete mode 100644 lib/librte_pmd_bond/rte_eth_bond_version.map diff --git a/doc/api/doxy-api.conf b/doc/api/doxy-api.conf index 50b0105..cb1c2f8 100644 --- a/doc/api/doxy-api.conf +++ b/doc/api/doxy-api.conf @@ -49,7 +49,7 @@ INPUT = doc/api/doxy-api-index.md \ lib/librte_pipeline \ lib/librte_port \ lib/librte_power \ - lib/librte_pmd_bond \ + drivers/net/bonding \ lib/librte_reorder \ lib/librte_ring \ lib/librte_sched \ diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 9cfa390..91fa0fb 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -32,13 +32,13 @@ include $(RTE_SDK)/mk/rte.vars.mk DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet +DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += bonding #DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000 #DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe #DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e #DIRS-$(CONFIG_RTE_LIBRTE_FM10K_PMD) += librte_pmd_fm10k #DIRS-$(CONFIG_RTE_LIBRTE_MLX4_PMD) += librte_pmd_mlx4 #DIRS-$(CONFIG_RTE_LIBRTE_ENIC_PMD) += librte_pmd_enic -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio diff --git a/drivers/net/bonding/Makefile b/drivers/net/bonding/Makefile new file mode 100644 index 000..83ccce3 --- /dev/null +++ b/drivers/net/bonding/Makefile @@ -0,0 +1,68 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2014 Intel
[dpdk-dev] [PATCH v2 03/19] af_packet: move af_packet pmd to drivers/net directory
move af_packet pmd to drivers/net directory Signed-off-by: Bruce Richardson --- drivers/net/Makefile | 2 +- drivers/net/af_packet/Makefile | 64 ++ drivers/net/af_packet/rte_eth_af_packet.c | 847 + drivers/net/af_packet/rte_eth_af_packet.h | 53 ++ .../net/af_packet/rte_pmd_af_packet_version.map| 7 + lib/Makefile | 3 +- lib/librte_eal/linuxapp/eal/Makefile | 4 +- lib/librte_pmd_af_packet/Makefile | 64 -- lib/librte_pmd_af_packet/rte_eth_af_packet.c | 847 - lib/librte_pmd_af_packet/rte_eth_af_packet.h | 53 -- .../rte_pmd_af_packet_version.map | 7 - 11 files changed, 975 insertions(+), 976 deletions(-) create mode 100644 drivers/net/af_packet/Makefile create mode 100644 drivers/net/af_packet/rte_eth_af_packet.c create mode 100644 drivers/net/af_packet/rte_eth_af_packet.h create mode 100644 drivers/net/af_packet/rte_pmd_af_packet_version.map delete mode 100644 lib/librte_pmd_af_packet/Makefile delete mode 100644 lib/librte_pmd_af_packet/rte_eth_af_packet.c delete mode 100644 lib/librte_pmd_af_packet/rte_eth_af_packet.h delete mode 100644 lib/librte_pmd_af_packet/rte_pmd_af_packet_version.map diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 2e1a0d0..9cfa390 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -31,6 +31,7 @@ include $(RTE_SDK)/mk/rte.vars.mk +DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += af_packet #DIRS-$(CONFIG_RTE_LIBRTE_E1000_PMD) += librte_pmd_e1000 #DIRS-$(CONFIG_RTE_LIBRTE_IXGBE_PMD) += librte_pmd_ixgbe #DIRS-$(CONFIG_RTE_LIBRTE_I40E_PMD) += librte_pmd_i40e @@ -40,7 +41,6 @@ include $(RTE_SDK)/mk/rte.vars.mk #DIRS-$(CONFIG_RTE_LIBRTE_PMD_BOND) += librte_pmd_bond #DIRS-$(CONFIG_RTE_LIBRTE_PMD_RING) += librte_pmd_ring #DIRS-$(CONFIG_RTE_LIBRTE_PMD_PCAP) += librte_pmd_pcap -#DIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += librte_pmd_af_packet #DIRS-$(CONFIG_RTE_LIBRTE_VIRTIO_PMD) += librte_pmd_virtio #DIRS-$(CONFIG_RTE_LIBRTE_VMXNET3_PMD) += librte_pmd_vmxnet3 #DIRS-$(CONFIG_RTE_LIBRTE_PMD_XENVIRT) += librte_pmd_xenvirt diff --git a/drivers/net/af_packet/Makefile b/drivers/net/af_packet/Makefile new file mode 100644 index 000..f0bf537 --- /dev/null +++ b/drivers/net/af_packet/Makefile @@ -0,0 +1,64 @@ +# BSD LICENSE +# +# Copyright(c) 2014 John W. Linville +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2014 6WIND S.A. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +include $(RTE_SDK)/mk/rte.vars.mk + +# +# library name +# +LIB = librte_pmd_af_packet.a + +EXPORT_MAP := rte_pmd_af_packet_version.map + +LIBABIVER := 1 + +CFLAGS += -O3 +CFLAGS += $(WERROR_FLAGS) + +# +# all source are stored in SRCS-y +# +SRCS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += rte_eth_af_packet.c + +# +# Export include files +# +SYMLINK-y-include += rte_eth_af_packet.h + +# this lib depends upon: +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_mbuf +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_ether +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_malloc +DEPDIRS-$(CONFIG_RTE_LIBRTE_PMD_AF_PACKET) += lib/librte_kvargs + +include $(RTE_SDK)/mk/rte.lib.mk diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c new f
[dpdk-dev] [PATCH v2 02/19] drivers: create drivers and drivers/net directory
Add a new top-level "drivers" directory to which all PMDs will be moved for easier maintenance of both lib folder and drivers themselves. This new directory is a dependency of all the apps in the app folder, so the makefiles for each app are updated. To the new top-level directory add a "net" subdirectory to classify more specifically our existing PMDs as ethernet drivers Signed-off-by: Bruce Richardson --- GNUmakefile| 4 ++-- app/dump_cfg/Makefile | 4 ++-- app/test-acl/Makefile | 4 ++-- app/test-pipeline/Makefile | 4 ++-- app/test-pmd/Makefile | 4 ++-- app/test/Makefile | 4 ++-- drivers/Makefile | 36 + drivers/net/Makefile | 50 ++ 8 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 drivers/Makefile create mode 100644 drivers/net/Makefile diff --git a/GNUmakefile b/GNUmakefile index d04c20b..b59e4b6 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,6 +40,6 @@ export RTE_SDK # directory list # -ROOTDIRS-y := lib app +ROOTDIRS-y := lib drivers app include $(RTE_SDK)/mk/rte.sdkroot.mk diff --git a/app/dump_cfg/Makefile b/app/dump_cfg/Makefile index 3257127..8d91a54 100644 --- a/app/dump_cfg/Makefile +++ b/app/dump_cfg/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -40,6 +40,6 @@ CFLAGS += $(WERROR_FLAGS) SRCS-y := main.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-acl/Makefile b/app/test-acl/Makefile index 43dfdcb..46ec449 100644 --- a/app/test-acl/Makefile +++ b/app/test-acl/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ CFLAGS += $(WERROR_FLAGS) SRCS-y := main.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-pipeline/Makefile b/app/test-pipeline/Makefile index aa6df0c..4bab6dc 100644 --- a/app/test-pipeline/Makefile +++ b/app/test-pipeline/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -57,7 +57,7 @@ SRCS-y += pipeline_lpm_ipv6.c SRCS-$(CONFIG_RTE_LIBRTE_ACL) += pipeline_acl.c # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test-pmd/Makefile b/app/test-pmd/Makefile index dcf26f4..72426f3 100644 --- a/app/test-pmd/Makefile +++ b/app/test-pmd/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -66,7 +66,7 @@ endif CFLAGS_cmdline.o := -D_GNU_SOURCE # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers include $(RTE_SDK)/mk/rte.app.mk diff --git a/app/test/Makefile b/app/test/Makefile index 4aca77c..3c777bf 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -159,7 +159,7 @@ endif endif # this application needs libraries first -DEPDIRS-y += lib +DEPDIRS-y += lib drivers # Link against shared libraries when needed ifeq ($(CONFIG_RTE_LIBRTE_PMD_BOND),y) diff --git a/drivers/Makefile b/drivers/Makefile new file mode 100644 index 000..b60eb5e --- /dev/null +++ b/drivers/Makefile @@ -0,0 +1,36 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the ab
[dpdk-dev] [PATCH v2 01/19] pmds: Use relative rather than absolute paths
In the Makefiles for the PMDs, the paths to the files are often specified using the full path from $(RTE_SDK) variable. These paths can be shortened, and make more flexible in case of a future path change by specifying the paths using $(SRCDIR) instead. Signed-off-by: Bruce Richardson --- lib/librte_pmd_e1000/Makefile | 4 ++-- lib/librte_pmd_enic/Makefile| 6 +++--- lib/librte_pmd_fm10k/Makefile | 4 ++-- lib/librte_pmd_i40e/Makefile| 4 ++-- lib/librte_pmd_ixgbe/Makefile | 4 ++-- lib/librte_pmd_vmxnet3/Makefile | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/librte_pmd_e1000/Makefile b/lib/librte_pmd_e1000/Makefile index 8c8fed8..158bc81 100644 --- a/lib/librte_pmd_e1000/Makefile +++ b/lib/librte_pmd_e1000/Makefile @@ -60,10 +60,10 @@ endif # Add extra flags for base driver files (also known as shared code) # to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_e1000/e1000/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/e1000/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_e1000/e1000 +VPATH += $(SRCDIR)/e1000 # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_enic/Makefile b/lib/librte_pmd_enic/Makefile index 251a898..bfc0994 100644 --- a/lib/librte_pmd_enic/Makefile +++ b/lib/librte_pmd_enic/Makefile @@ -41,12 +41,12 @@ EXPORT_MAP := rte_pmd_enic_version.map LIBABIVER := 1 -CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/vnic/ -CFLAGS += -I$(RTE_SDK)/lib/librte_pmd_enic/ +CFLAGS += -I$(SRCDIR)/vnic/ +CFLAGS += -I$(SRCDIR) CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -Wno-strict-aliasing -VPATH += $(RTE_SDK)/lib/librte_pmd_enic/src +VPATH += $(SRCDIR)/src # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_fm10k/Makefile b/lib/librte_pmd_fm10k/Makefile index 7516d37..7395933 100644 --- a/lib/librte_pmd_fm10k/Makefile +++ b/lib/librte_pmd_fm10k/Makefile @@ -76,10 +76,10 @@ endif # # Add extra flags for base driver source files to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_fm10k/base/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/base/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_fm10k/base +VPATH += $(SRCDIR)/base # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_i40e/Makefile b/lib/librte_pmd_i40e/Makefile index 64bab16..050dd44 100644 --- a/lib/librte_pmd_i40e/Makefile +++ b/lib/librte_pmd_i40e/Makefile @@ -75,10 +75,10 @@ endif CFLAGS_i40e_lan_hmc.o += -Wno-error endif -OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_i40e/i40e/*.c))) +OBJS_BASE_DRIVER=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/i40e/*.c))) $(foreach obj, $(OBJS_BASE_DRIVER), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_i40e/i40e +VPATH += $(SRCDIR)/i40e # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_ixgbe/Makefile b/lib/librte_pmd_ixgbe/Makefile index fbf6966..e0f8916 100644 --- a/lib/librte_pmd_ixgbe/Makefile +++ b/lib/librte_pmd_ixgbe/Makefile @@ -82,10 +82,10 @@ endif # Add extra flags for base driver files (also known as shared code) # to disable warnings in them # -BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe/*.c))) +BASE_DRIVER_OBJS=$(patsubst %.c,%.o,$(notdir $(wildcard $(SRCDIR)/ixgbe/*.c))) $(foreach obj, $(BASE_DRIVER_OBJS), $(eval CFLAGS_$(obj)+=$(CFLAGS_BASE_DRIVER))) -VPATH += $(RTE_SDK)/lib/librte_pmd_ixgbe/ixgbe +VPATH += $(SRCDIR)/ixgbe # # all source are stored in SRCS-y diff --git a/lib/librte_pmd_vmxnet3/Makefile b/lib/librte_pmd_vmxnet3/Makefile index fc616c4..48177a3 100644 --- a/lib/librte_pmd_vmxnet3/Makefile +++ b/lib/librte_pmd_vmxnet3/Makefile @@ -64,7 +64,7 @@ CFLAGS_BASE_DRIVER += -Wno-strict-aliasing -Wno-format-extra-args endif -VPATH += $(RTE_SDK)/lib/librte_pmd_vmxnet3/vmxnet3 +VPATH += $(SRCDIR)/vmxnet3 EXPORT_MAP := rte_pmd_vmxnet3_version.map -- 2.1.0
[dpdk-dev] [PATCH v2 00/19] Move PMDs to drivers directory
As covered previously in an RFC, this patchset creates a new top-level drivers folder and moves the PMDs into it. Moving the drivers involves a lot of code - too big for a single patch, so each driver is moved separately in its own patchset. Some doc updates are done as part of this patchset - based on the results of git grep, but may be incomplete, so flag any doc areas that I may have missed, please. Changes in V2: * use drivers/net rather than just drivers * rename e1000, ixgbe, i40e and vmxnet3 base driver code dir to "base" * update copyright dates to 2015 on modified files Bruce Richardson (19): pmds: Use relative rather than absolute paths drivers: create drivers and drivers/net directory af_packet: move af_packet pmd to drivers/net directory bond: Move bonded ethdev pmd to drivers/net e1000: move e1000 pmd to drivers/net directory enic: move enic PMD to drivers/net directory fm10k: move fm10k PMD to drivers/net directory i40e: move i40e PMD to drivers/net directory ixbge: move ixgbe PMD to drivers/net directory mlx4: move mlx4 PMD to drivers/net directory null pmd: move null PMD to drivers/net directory pcap: move pcap pmd to drivers/net ring pmd: move ring PMD to the drivers directory virtio: move virtio PMD to drivers/net xmvnet3: move vmxnet3 PMD to drivers/net xenvirt: move xenvirt PMD to drivers/net maintainers: update maintainers with driver paths doc: update GSG doc for new drivers subdirectory doc: update source organisation text for drivers GNUmakefile|4 +- MAINTAINERS| 28 +- app/dump_cfg/Makefile |4 +- app/test-acl/Makefile |4 +- app/test-pipeline/Makefile |4 +- app/test-pmd/Makefile |4 +- app/test/Makefile |4 +- doc/api/doxy-api.conf |2 +- doc/guides/linux_gsg/build_dpdk.rst|8 +- doc/guides/prog_guide/source_org.rst | 37 +- drivers/Makefile | 36 + drivers/net/Makefile | 50 + drivers/net/af_packet/Makefile | 64 + drivers/net/af_packet/rte_eth_af_packet.c | 847 +++ drivers/net/af_packet/rte_eth_af_packet.h | 53 + .../net/af_packet/rte_pmd_af_packet_version.map|7 + drivers/net/bonding/Makefile | 68 + drivers/net/bonding/rte_eth_bond.h | 366 ++ drivers/net/bonding/rte_eth_bond_8023ad.c | 1216 + drivers/net/bonding/rte_eth_bond_8023ad.h | 222 + drivers/net/bonding/rte_eth_bond_8023ad_private.h | 308 ++ drivers/net/bonding/rte_eth_bond_alb.c | 287 + drivers/net/bonding/rte_eth_bond_alb.h | 142 + drivers/net/bonding/rte_eth_bond_api.c | 840 +++ drivers/net/bonding/rte_eth_bond_args.c| 278 + drivers/net/bonding/rte_eth_bond_pmd.c | 2269 drivers/net/bonding/rte_eth_bond_private.h | 287 + drivers/net/bonding/rte_eth_bond_version.map | 22 + drivers/net/e1000/Makefile | 99 + drivers/net/e1000/base/README | 39 + drivers/net/e1000/base/e1000_80003es2lan.c | 1514 ++ drivers/net/e1000/base/e1000_80003es2lan.h | 100 + drivers/net/e1000/base/e1000_82540.c | 717 +++ drivers/net/e1000/base/e1000_82541.c | 1268 + drivers/net/e1000/base/e1000_82541.h | 91 + drivers/net/e1000/base/e1000_82542.c | 588 ++ drivers/net/e1000/base/e1000_82543.c | 1553 ++ drivers/net/e1000/base/e1000_82543.h | 56 + drivers/net/e1000/base/e1000_82571.c | 2026 +++ drivers/net/e1000/base/e1000_82571.h | 65 + drivers/net/e1000/base/e1000_82575.c | 3639 + drivers/net/e1000/base/e1000_82575.h | 520 ++ drivers/net/e1000/base/e1000_api.c | 1357 + drivers/net/e1000/base/e1000_api.h | 167 + drivers/net/e1000/base/e1000_defines.h | 1498 + drivers/net/e1000/base/e1000_hw.h | 1026 drivers/net/e1000/base/e1000_i210.c| 1000 drivers/net/e1000/base/e1000_i210.h| 110 + drivers/net/e1000/base/e1000_ich8lan.c | 5260 ++ drivers/net/e1000/base/e1000_ich8lan.h | 313 ++ drivers/net/e1000/base/e1000_mac.c | 2247 drivers/net/e1000/base/e1000_mac.h | 95 + drivers/net/e1000/base/e1000_manage.c | 573 ++ drivers/net/e1000/base/e1000_manage.h | 95 + drivers/net/e1000/base/e1000_mbx.c | 777 +++ drivers/net/e
[dpdk-dev] [PATCH] fm10k: support XEN domain0
fm10k was failing to run in XEN domain0, as the physical memory for DMA should be allocated and translated in a different way for XEN domain0. So rte_memzone_reserve_bounded() should be used for DMA memory allocation, and rte_mem_phy2mch() should be used for DMA memory address translation to support running fm10k PMD in XEN domain0. Signed-off-by: Shaopeng He --- lib/librte_pmd_fm10k/fm10k_ethdev.c | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_pmd_fm10k/fm10k_ethdev.c b/lib/librte_pmd_fm10k/fm10k_ethdev.c index 275c19c..c85c856 100644 --- a/lib/librte_pmd_fm10k/fm10k_ethdev.c +++ b/lib/librte_pmd_fm10k/fm10k_ethdev.c @@ -1004,7 +1004,11 @@ fm10k_rx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id, return (-ENOMEM); } q->hw_ring = mz->addr; +#ifdef RTE_LIBRTE_XEN_DOM0 + q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr); +#else q->hw_ring_phys_addr = mz->phys_addr; +#endif dev->data->rx_queues[queue_id] = q; return 0; @@ -1150,7 +1154,11 @@ fm10k_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_id, return (-ENOMEM); } q->hw_ring = mz->addr; +#ifdef RTE_LIBRTE_XEN_DOM0 + q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr); +#else q->hw_ring_phys_addr = mz->phys_addr; +#endif /* * allocate memory for the RS bit tracker. Enough slots to hold the -- 1.9.3
[dpdk-dev] [PATCH 01/10] examples/tep_termination:initialize the VXLAN sample
On Fri, 15 May 2015 14:08:52 +0800 Jijiang Liu wrote: > + while (dev_ll != NULL) { > + /*get virtio device ID*/ Really minor style nit. Please put whitespace in comments. Do this instead. /* get virtio device ID */ Also, the name virtio is confusing since it can be confused with KVM virtio.
[dpdk-dev] [PATCH 01/10] examples/tep_termination:initialize the VXLAN sample
I agree that this is great to see a real example of this On Fri, 15 May 2015 14:08:52 +0800 Jijiang Liu wrote: > +static unsigned > +check_ports_num(unsigned nb_ports) > +{ > + unsigned valid_nb_ports = nb_ports; > + unsigned portid; > + > + if (nb_ports > nb_ports) { > + RTE_LOG(INFO, VHOST_PORT, "\nSpecified port number(%u) exceeds > total system port number(%u)\n", > + nb_ports, nb_ports); > + nb_ports = nb_ports; This looks repetative, and wrong, is it something to shut up a compiler warning? or something that happened as result of global replace?
[dpdk-dev] [PATCH v2] vhost: flush used->idx update before reading avail->flags
Hi, Maybe I missed a part of the discussion, but is there any special purpose for using rte_mb (both read and write fence) here rather than rte_wmb (write fence only)? -- Best regards, Nikita Kalyazin, n.kalyazin at samsung.com Software Engineer CE OS Group Samsung R&D Institute Russia Tel: +7 (495) 797-25-00 #3816 Tel: +7 (495) 797-25-03 Office #1501, 12-1, Dvintsev str., Moscow, 127018, Russia On Wed, May 13, 2015 at 12:46:30PM +0200, Thomas Monjalon wrote: > 2015-04-29 19:11, Huawei Xie: > > update of used->idx and read of avail->flags could be reordered. > > memory fence should be used to ensure the order, otherwise guest could see > > a stale used->idx value after it toggles the interrupt suppression flag. > > After guest sets the interrupt suppression flag, it will check if there is > > more buffer to process through used->idx. If it sees a stale value, it will > > exit the processing while host willn't send interrupt to guest. > > > > Signed-off-by: Huawei Xie > > Applied with following title, thanks > vhost: fix virtio freeze due to missed interrupt >
[dpdk-dev] bond: mode 4 promiscuous mode
Hey guys, Can we in function bond_mode_8023ad_activate_slave() try to add to the slave bond and LACP multicast MACs first? And then we would fall back into promiscuous mode if the adding has failed. In other words: if (rte_eth_dev_mac_addr_add(slave_id, bond_mac) != 0 || rte_eth_dev_mac_addr_add(slave_id, lacp_mac) != 0) { ... rte_eth_promiscuous_enable(slave_id) } Seems to work fine on my setup, but I might miss something. Regards, Andriy
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
2015-05-13 16:58, Bruce Richardson: > On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote: > > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote: > > > 2015-05-13 11:01, Bruce Richardson: > > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote: > > > >> 2015-05-12 19:04, Bruce Richardson: > > > >>> drivers/e1000/e1000/e1000_hw.h | 1026 > > > >> > > > >> As explained in a previous comment, > > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html > > > >> I think this path would be better: > > > >>drivers/net/e1000/base/e1000_hw.h > > > > > > > > Two reasons why I didn't create the "net" subfolder: > > > > 1. I initally forgot to consider it :-( > > > > 2. While we may at some future point have other device driver types, > > > > are we really > > > > needing to start categorising PMDs at this point? > > > > > > > > As for the base driver part, I was viewing that as a something that > > > > should be > > > > a separate patch set, since it's unrelated to moving things to the > > > > drivers > > > > subdir. > > > > > > I understand your points and I partially agree. > > > However, file moves may be perturbing because it change habits > > > and may complicate a bit the git history browsing. > > > So I think it's better to minimize such moves and do altogether. > > > > > Ok. I'll see about renaming the base code directories as part of the overall > > move process [Unless there are objections from any of the driver > > maintainers]. > > > > As for drivers vs drivers/net, I suppose there is no real difference in what > > the path actually is, so I can make that change too. However, I still think > > I > > prefer the shorter path. Anyone else any opinions on this [before I start > > reworking this again]? > > A further thought on the splitting up of drivers. What about devices which > provide > more than one type of offload, how would the PMD for such a device be > classified? Other projects (e.g. Linux) would have the same classification problem. How do they solve it? Is it possible to split code in different directories or different drivers?
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
2015-05-15 13:36, Bruce Richardson: > On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote: > > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote: > > > 2015-05-13 11:01, Bruce Richardson: > > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote: > > > >> 2015-05-12 19:04, Bruce Richardson: > > > >>> drivers/e1000/e1000/e1000_hw.h | 1026 > > > >> > > > >> As explained in a previous comment, > > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html > > > >> I think this path would be better: > > > >>drivers/net/e1000/base/e1000_hw.h > > > > > > > > Two reasons why I didn't create the "net" subfolder: > > > > 1. I initally forgot to consider it :-( > > > > 2. While we may at some future point have other device driver types, > > > > are we really > > > > needing to start categorising PMDs at this point? > > > > > > > > As for the base driver part, I was viewing that as a something that > > > > should be > > > > a separate patch set, since it's unrelated to moving things to the > > > > drivers > > > > subdir. > > > > > > I understand your points and I partially agree. > > > However, file moves may be perturbing because it change habits > > > and may complicate a bit the git history browsing. > > > So I think it's better to minimize such moves and do altogether. > > > > > Ok. I'll see about renaming the base code directories as part of the overall > > move process [Unless there are objections from any of the driver > > maintainers]. > > > > As for drivers vs drivers/net, I suppose there is no real difference in what > > the path actually is, so I can make that change too. However, I still think > > I > > prefer the shorter path. Anyone else any opinions on this [before I start > > reworking this again]? > > > > /Bruce > > Hi Thomas, > > a specific question on how you want the rename of the "base" driver > directories. > Can I take it from your question that you want the base driver renaming to be > merged into a single commit with the rest of the move for the driver? For > example, > as part of the patch move from "lib/librte_pmd_e1000" to "drivers/net/e1000" > we > also rename the "e1000" subdir to "base". Yes, to minimize number of patches moving files (and breaking history for some tools). > The slight problem with this approach - of trying to do both moves in a single > patch is that the rename of the subdirectory "e1000" involves changes to > other > files in the librte_pmd_e1000 directory which are being moved, so we can't > have a clean patch that just moves files and doesn't touch those files which > are > being moved. Therefore, from a patch cleanliness point of view, the renames > to the base directory should be a separate patch, which I can make part of > this > series. The changes are only in Makefile and include lines, right? I think it's not a big deal to have small changes. But maybe it will make difficult to read the move with some tools. Feel free to adopt the solution you prefer if nobody else has an experienced opinion.
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
On Fri, May 15, 2015 at 02:54:50PM +0200, Thomas Monjalon wrote: > 2015-05-13 16:58, Bruce Richardson: > > On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote: > > > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote: > > > > 2015-05-13 11:01, Bruce Richardson: > > > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote: > > > > >> 2015-05-12 19:04, Bruce Richardson: > > > > >>> drivers/e1000/e1000/e1000_hw.h | 1026 > > > > >> > > > > >> As explained in a previous comment, > > > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html > > > > >> I think this path would be better: > > > > >>drivers/net/e1000/base/e1000_hw.h > > > > > > > > > > Two reasons why I didn't create the "net" subfolder: > > > > > 1. I initally forgot to consider it :-( > > > > > 2. While we may at some future point have other device driver types, > > > > > are we really > > > > > needing to start categorising PMDs at this point? > > > > > > > > > > As for the base driver part, I was viewing that as a something that > > > > > should be > > > > > a separate patch set, since it's unrelated to moving things to the > > > > > drivers > > > > > subdir. > > > > > > > > I understand your points and I partially agree. > > > > However, file moves may be perturbing because it change habits > > > > and may complicate a bit the git history browsing. > > > > So I think it's better to minimize such moves and do altogether. > > > > > > > Ok. I'll see about renaming the base code directories as part of the > > > overall > > > move process [Unless there are objections from any of the driver > > > maintainers]. > > > > > > As for drivers vs drivers/net, I suppose there is no real difference in > > > what > > > the path actually is, so I can make that change too. However, I still > > > think I > > > prefer the shorter path. Anyone else any opinions on this [before I start > > > reworking this again]? > > > > A further thought on the splitting up of drivers. What about devices which > > provide > > more than one type of offload, how would the PMD for such a device be > > classified? > > Other projects (e.g. Linux) would have the same classification problem. > How do they solve it? Is it possible to split code in different directories > or different drivers? > No idea, possibly some of the resident linux kernel experts on-list can inform us. However, this is likely a solved problem, so I'm going to rework the patchset to use drivers/net for now, and thereby allow future-proofing for other device types. /Bruce
[dpdk-dev] [PATCH 10/10] examples/tep_termination:add the configuration for encapsulation and the decapsulation
The two flags are enabled by default, but sometimes we want to know the performance influence of the encapsulation and decapsulation operations, and I think we should add the two options. Signed-off-by: Jijiang Liu --- examples/tep_termination/main.c| 36 examples/tep_termination/vxlan_setup.c | 13 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 04f517c..44fb0fb 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -113,6 +113,8 @@ #define CMD_LINE_OPT_TX_CHECKSUM "tx-checksum" #define CMD_LINE_OPT_TSO_SEGSZ "tso-segsz" #define CMD_LINE_OPT_FILTER_TYPE "filter-type" +#define CMD_LINE_OPT_ENCAP "encap" +#define CMD_LINE_OPT_DECAP "decap" #define CMD_LINE_OPT_RX_RETRY "rx-retry" #define CMD_LINE_OPT_RX_RETRY_DELAY "rx-retry-delay" #define CMD_LINE_OPT_RX_RETRY_NUM "rx-retry-num" @@ -146,6 +148,12 @@ uint8_t tx_checksum; /* TSO segment size */ uint16_t tso_segsz = 0; +/* enable/disable decapsulation */ +uint8_t rx_decap = 1; + +/* enable/disable encapsulation */ +uint8_t tx_encap = 1; + /* RX filter type for tunneling packet */ uint8_t filter_idx; @@ -275,6 +283,8 @@ tep_termination_usage(const char *prgname) " --nb-devices[1-64]: The number of virtIO device\n" " --tx-checksum [0|1]: inner Tx checksum offload\n" " --tso-segsz [0-N]: TSO segment size\n" + " --decap [0|1]: tunneling packet decapsulation\n" + " --encap [0|1]: tunneling packet encapsulation\n" " --filter-type[1-3]: filter type for tunneling packet\n" " 1: Inner MAC&VLAN and tenent ID\n" " 2: Inner MAC and tenent ID\n" @@ -306,6 +316,8 @@ tep_termination_parse_args(int argc, char **argv) {CMD_LINE_OPT_UDP_PORT, required_argument, NULL, 0}, {CMD_LINE_OPT_TX_CHECKSUM, required_argument, NULL, 0}, {CMD_LINE_OPT_TSO_SEGSZ, required_argument, NULL, 0}, + {CMD_LINE_OPT_DECAP, required_argument, NULL, 0}, + {CMD_LINE_OPT_ENCAP, required_argument, NULL, 0}, {CMD_LINE_OPT_FILTER_TYPE, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_DELAY, required_argument, NULL, 0}, @@ -401,6 +413,30 @@ tep_termination_parse_args(int argc, char **argv) burst_rx_retry_num = ret; } + /* Enable/disable encapsulation on RX. */ + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_DECAP, + sizeof(CMD_LINE_OPT_DECAP))) { + ret = parse_num_opt(optarg, 1); + if (ret == -1) { + RTE_LOG(INFO, VHOST_CONFIG, "Invalid argument for decap [0|1]\n"); + tep_termination_usage(prgname); + return -1; + } else + rx_decap = ret; + } + + /* Enable/disable encapsulation on TX. */ + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_ENCAP, + sizeof(CMD_LINE_OPT_ENCAP))) { + ret = parse_num_opt(optarg, 1); + if (ret == -1) { + RTE_LOG(INFO, VHOST_CONFIG, "Invalid argument for encap [0|1]\n"); + tep_termination_usage(prgname); + return -1; + } else + tx_encap = ret; + } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_TX_CHECKSUM, sizeof(CMD_LINE_OPT_TX_CHECKSUM))) { ret = parse_num_opt(optarg, 1); diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index 141df25..e912dfc 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -78,6 +78,8 @@ extern uint16_t num_devices; extern uint16_t udp_port; extern uint8_t ports[RTE_MAX_ETHPORTS]; extern uint8_t filter_idx; +extern uint8_t rx_decap; +extern uint8_t tx_encap; extern uint16_t tso_segsz; extern uint32_t enable_stats; extern struct device_statistics dev_statistics[MAX_DEVICES]; @@ -231,7 +233,12 @@ vxlan_port_init(uint8_t port, struct rte_mempool *mbuf_pool) static int vxlan_rx_process(struct rte_mbuf *pkt) { - return decapsulation(pkt); +
[dpdk-dev] [PATCH 09/10] examples/tep_termination:add bad Rx checksum statistics of inner IP and L4
The number of packets with bad RX IP and L4 checksum in inner header is recorded. Signed-off-by: Jijiang Liu --- examples/tep_termination/main.c| 10 +- examples/tep_termination/main.h|4 examples/tep_termination/vxlan_setup.c |8 3 files changed, 21 insertions(+), 1 deletions(-) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 144f8c8..04f517c 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -1004,7 +1004,7 @@ print_stats(void) { struct virtio_net_data_ll *dev_ll; uint64_t tx_dropped, rx_dropped; - uint64_t tx, tx_total, rx, rx_total; + uint64_t tx, tx_total, rx, rx_total, rx_ip_csum, rx_l4_csum; uint32_t device_fh; const char clr[] = { 27, '[', '2', 'J', '\0' }; const char top_left[] = { 27, '[', '1', ';', '1', 'H', '\0' }; @@ -1029,12 +1029,18 @@ print_stats(void) rx = rte_atomic64_read( &dev_statistics[device_fh].rx_atomic); rx_dropped = rx_total - rx; + rx_ip_csum = rte_atomic64_read( + &dev_statistics[device_fh].rx_bad_ip_csum); + rx_l4_csum = rte_atomic64_read( + &dev_statistics[device_fh].rx_bad_l4_csum); printf("\nStatistics for device %"PRIu32" --" "\nTX total:%"PRIu64"" "\nTX dropped: %"PRIu64"" "\nTX successful: %"PRIu64"" "\nRX total:%"PRIu64"" + "\nRX bad IP csum: %"PRIu64"" + "\nRX bad L4 csum: %"PRIu64"" "\nRX dropped: %"PRIu64"" "\nRX successful: %"PRIu64"", device_fh, @@ -1042,6 +1048,8 @@ print_stats(void) tx_dropped, tx, rx_total, + rx_ip_csum, + rx_l4_csum, rx_dropped, rx); diff --git a/examples/tep_termination/main.h b/examples/tep_termination/main.h index 74c3d98..5cf1157 100644 --- a/examples/tep_termination/main.h +++ b/examples/tep_termination/main.h @@ -69,6 +69,10 @@ struct device_statistics { uint64_t rx_total; uint64_t tx; rte_atomic64_t rx_atomic; + /**< Bad inner IP csum for tunneling pkt */ + rte_atomic64_t rx_bad_ip_csum; + /**< Bad inner L4 csum for tunneling pkt */ + rte_atomic64_t rx_bad_l4_csum; } __rte_cache_aligned; /** diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index af7eea9..141df25 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -79,6 +79,8 @@ extern uint16_t udp_port; extern uint8_t ports[RTE_MAX_ETHPORTS]; extern uint8_t filter_idx; extern uint16_t tso_segsz; +extern uint32_t enable_stats; +extern struct device_statistics dev_statistics[MAX_DEVICES]; /* ethernet addresses of ports */ extern struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; @@ -423,6 +425,12 @@ vxlan_rx_pkts (struct virtio_net *dev, struct rte_mbuf **pkts_burst, uint32_t rx struct rte_mbuf *pkts_valid[rx_count]; for (i = 0; i < rx_count; i++) { + if (enable_stats) { + rte_atomic64_add(&dev_statistics[dev->device_fh].rx_bad_ip_csum, + (pkts_burst[i]->ol_flags & PKT_RX_IP_CKSUM_BAD) != 0); + rte_atomic64_add(&dev_statistics[dev->device_fh].rx_bad_ip_csum, + (pkts_burst[i]->ol_flags & PKT_RX_L4_CKSUM_BAD) != 0); + } ret = vxlan_rx_process(pkts_burst[i]); if (unlikely(ret < 0)) continue; -- 1.7.7.6
[dpdk-dev] [PATCH 08/10] examples/tep_termination:add TSO offload configuration
If the 'tso-segsz' is not 0, which means TSO offload is enabled. Signed-off-by: Jijiang Liu --- examples/tep_termination/main.c| 17 + examples/tep_termination/vxlan.c |6 ++ examples/tep_termination/vxlan.h |1 + examples/tep_termination/vxlan_setup.c |8 4 files changed, 32 insertions(+), 0 deletions(-) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index ffce0b6..144f8c8 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -111,6 +111,7 @@ #define CMD_LINE_OPT_NB_DEVICES "nb-devices" #define CMD_LINE_OPT_UDP_PORT "udp-port" #define CMD_LINE_OPT_TX_CHECKSUM "tx-checksum" +#define CMD_LINE_OPT_TSO_SEGSZ "tso-segsz" #define CMD_LINE_OPT_FILTER_TYPE "filter-type" #define CMD_LINE_OPT_RX_RETRY "rx-retry" #define CMD_LINE_OPT_RX_RETRY_DELAY "rx-retry-delay" @@ -142,6 +143,9 @@ uint16_t udp_port; /* enable/disable inner TX checksum */ uint8_t tx_checksum; +/* TSO segment size */ +uint16_t tso_segsz = 0; + /* RX filter type for tunneling packet */ uint8_t filter_idx; @@ -270,6 +274,7 @@ tep_termination_usage(const char *prgname) " --udp-port: UDP destination port for VXLAN packet\n" " --nb-devices[1-64]: The number of virtIO device\n" " --tx-checksum [0|1]: inner Tx checksum offload\n" + " --tso-segsz [0-N]: TSO segment size\n" " --filter-type[1-3]: filter type for tunneling packet\n" " 1: Inner MAC&VLAN and tenent ID\n" " 2: Inner MAC and tenent ID\n" @@ -300,6 +305,7 @@ tep_termination_parse_args(int argc, char **argv) {CMD_LINE_OPT_NB_DEVICES, required_argument, NULL, 0}, {CMD_LINE_OPT_UDP_PORT, required_argument, NULL, 0}, {CMD_LINE_OPT_TX_CHECKSUM, required_argument, NULL, 0}, + {CMD_LINE_OPT_TSO_SEGSZ, required_argument, NULL, 0}, {CMD_LINE_OPT_FILTER_TYPE, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_DELAY, required_argument, NULL, 0}, @@ -347,6 +353,17 @@ tep_termination_parse_args(int argc, char **argv) enable_retry = ret; } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_TSO_SEGSZ, + sizeof(CMD_LINE_OPT_TSO_SEGSZ))) { + ret = parse_num_opt(optarg, INT16_MAX); + if (ret == -1) { + RTE_LOG(INFO, VHOST_CONFIG, "Invalid argument for TCP segment size [0-N]\n"); + tep_termination_usage(prgname); + return -1; + } else + tso_segsz = ret; + } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_UDP_PORT, sizeof(CMD_LINE_OPT_UDP_PORT))) { ret = parse_num_opt(optarg, INT16_MAX); diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index 786281c..4283307 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -47,6 +47,7 @@ extern uint8_t tx_checksum; extern struct vxlan_conf vxdev; extern struct ipv4_hdr app_ip_hdr[VXLAN_N_PORTS]; extern struct ether_hdr app_l2_hdr[VXLAN_N_PORTS]; +extern uint16_t tso_segsz; /* We cannot use rte_cpu_to_be_16() on a constant in a switch/case */ #if RTE_BYTE_ORDER == RTE_LITTLE_ENDIAN @@ -156,6 +157,10 @@ process_inner_cksums(struct ether_hdr *eth_hdr, union tunnel_offload_info *info) ol_flags |= PKT_TX_TCP_CKSUM; tcp_hdr->cksum = get_psd_sum(l3_hdr, ethertype, ol_flags); + if (tso_segsz != 0) { + ol_flags |= PKT_TX_TCP_SEG; + info->tso_segsz = tso_segsz; + } } else if (l4_proto == IPPROTO_SCTP) { sctp_hdr = (struct sctp_hdr *)((char *)l3_hdr + info->l3_len); @@ -235,6 +240,7 @@ encapsulation(struct rte_mbuf *m, uint8_t vport_id) m->outer_l3_len = sizeof(struct ipv4_hdr); m->ol_flags |= ol_flags; + m->tso_segsz = tx_offload.tso_segsz; /*VXLAN HEADER*/ vxlan->vx_flags = rte_cpu_to_be_32(VXLAN_HF_VNI); diff --git a/examples/tep_termination/vxlan.h b/examples/tep_termination/vxlan.h index f000b93..dfe7063 100644 --- a/examples/tep_termination/vxlan.h +++ b/examples/tep_termination/vxlan.h @@ -64,6 +64,7 @@ union tunnel_offload_info { uint64_t l2_len:7; /**< L2 (MAC) Header Length. */ uint64_t l3_len:9; /**< L3 (IP) Head
[dpdk-dev] [PATCH 07/10] examples/tep_termination:add Tx checksum offload configuration for inner header
For VXLAN packet, the inner Tx checksum offload means inner IPv4 and inner L4(TCP/UDP/SCTP). Signed-off-by: Jijiang Liu --- examples/tep_termination/main.c | 17 examples/tep_termination/vxlan.c | 80 ++ 2 files changed, 97 insertions(+), 0 deletions(-) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index c9ad83f..ffce0b6 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -110,6 +110,7 @@ #define CMD_LINE_OPT_NB_DEVICES "nb-devices" #define CMD_LINE_OPT_UDP_PORT "udp-port" +#define CMD_LINE_OPT_TX_CHECKSUM "tx-checksum" #define CMD_LINE_OPT_FILTER_TYPE "filter-type" #define CMD_LINE_OPT_RX_RETRY "rx-retry" #define CMD_LINE_OPT_RX_RETRY_DELAY "rx-retry-delay" @@ -138,6 +139,9 @@ struct vpool { /* VXLAN UDP destination port */ uint16_t udp_port; +/* enable/disable inner TX checksum */ +uint8_t tx_checksum; + /* RX filter type for tunneling packet */ uint8_t filter_idx; @@ -265,6 +269,7 @@ tep_termination_usage(const char *prgname) RTE_LOG(INFO, VHOST_CONFIG, "%s [EAL options] -- -p PORTMASK\n" " --udp-port: UDP destination port for VXLAN packet\n" " --nb-devices[1-64]: The number of virtIO device\n" + " --tx-checksum [0|1]: inner Tx checksum offload\n" " --filter-type[1-3]: filter type for tunneling packet\n" " 1: Inner MAC&VLAN and tenent ID\n" " 2: Inner MAC and tenent ID\n" @@ -294,6 +299,7 @@ tep_termination_parse_args(int argc, char **argv) static struct option long_option[] = { {CMD_LINE_OPT_NB_DEVICES, required_argument, NULL, 0}, {CMD_LINE_OPT_UDP_PORT, required_argument, NULL, 0}, + {CMD_LINE_OPT_TX_CHECKSUM, required_argument, NULL, 0}, {CMD_LINE_OPT_FILTER_TYPE, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_DELAY, required_argument, NULL, 0}, @@ -378,6 +384,17 @@ tep_termination_parse_args(int argc, char **argv) burst_rx_retry_num = ret; } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_TX_CHECKSUM, + sizeof(CMD_LINE_OPT_TX_CHECKSUM))) { + ret = parse_num_opt(optarg, 1); + if (ret == -1) { + RTE_LOG(INFO, VHOST_CONFIG, "Invalid argument for tx-checksum [0|1]\n"); + tep_termination_usage(prgname); + return -1; + } else + tx_checksum = ret; + } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_FILTER_TYPE, sizeof(CMD_LINE_OPT_FILTER_TYPE))) { ret = parse_num_opt(optarg, 3); diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c index 59b5e2a..786281c 100644 --- a/examples/tep_termination/vxlan.c +++ b/examples/tep_termination/vxlan.c @@ -43,6 +43,7 @@ #include "main.h" #include "vxlan.h" +extern uint8_t tx_checksum; extern struct vxlan_conf vxdev; extern struct ipv4_hdr app_ip_hdr[VXLAN_N_PORTS]; extern struct ether_hdr app_l2_hdr[VXLAN_N_PORTS]; @@ -54,6 +55,15 @@ extern struct ether_hdr app_l2_hdr[VXLAN_N_PORTS]; #define _htons(x) (x) #endif +static uint16_t +get_psd_sum(void *l3_hdr, uint16_t ethertype, uint64_t ol_flags) +{ + if (ethertype == rte_cpu_to_be_16(ETHER_TYPE_IPv4)) + return rte_ipv4_phdr_cksum(l3_hdr, ol_flags); + else /* assume ethertype == ETHER_TYPE_IPv6 */ + return rte_ipv6_phdr_cksum(l3_hdr, ol_flags); +} + /* * * Parse an ethernet header to fill the ethertype, outer_l2_len, outer_l3_len and * ipproto. This function is able to recognize IPv4/IPv6 with one optional vlan @@ -95,6 +105,67 @@ parse_ethernet(struct ether_hdr *eth_hdr, union tunnel_offload_info *info, } +/** + * Calculate the checksum of a packet in hardware + */ +static uint64_t +process_inner_cksums(struct ether_hdr *eth_hdr, union tunnel_offload_info *info) +{ + void *l3_hdr = NULL; + uint16_t ethertype, l4_proto; + struct ipv4_hdr *ipv4_hdr; + struct ipv6_hdr *ipv6_hdr; + struct udp_hdr *udp_hdr; + struct tcp_hdr *tcp_hdr; + struct sctp_hdr *sctp_hdr; + uint64_t ol_flags = 0; + + info->l2_len = sizeof(struct ether_hdr); + ethertype = eth_hdr->ether_type; + + if (ethertype == _htons(ETHER_TYPE_VLAN)) { + struct vlan_hdr *vlan_hdr = (struct vlan_hdr *)(eth_hdr + 1); + info->l2_len += sizeof(struct vlan_hdr
[dpdk-dev] [PATCH 06/10] examples/tep_termination:add tunnel filter type configuration
The follwoing filter types are supported for VXLAN, 1> Inner MAC&VLAN and tenent ID 2> Inner MAC and tenent ID, and Outer MAC 3> Inner MAC and tenent ID Signed-off-by: Jijiang Liu --- examples/tep_termination/main.c| 20 examples/tep_termination/vxlan_setup.c | 52 +++- 2 files changed, 71 insertions(+), 1 deletions(-) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index c2d3088..c9ad83f 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -110,6 +110,7 @@ #define CMD_LINE_OPT_NB_DEVICES "nb-devices" #define CMD_LINE_OPT_UDP_PORT "udp-port" +#define CMD_LINE_OPT_FILTER_TYPE "filter-type" #define CMD_LINE_OPT_RX_RETRY "rx-retry" #define CMD_LINE_OPT_RX_RETRY_DELAY "rx-retry-delay" #define CMD_LINE_OPT_RX_RETRY_NUM "rx-retry-num" @@ -137,6 +138,9 @@ struct vpool { /* VXLAN UDP destination port */ uint16_t udp_port; +/* RX filter type for tunneling packet */ +uint8_t filter_idx; + /* overlay packet operation */ struct ol_switch_ops overlay_options = { .port_configure = vxlan_port_init, @@ -261,6 +265,10 @@ tep_termination_usage(const char *prgname) RTE_LOG(INFO, VHOST_CONFIG, "%s [EAL options] -- -p PORTMASK\n" " --udp-port: UDP destination port for VXLAN packet\n" " --nb-devices[1-64]: The number of virtIO device\n" + " --filter-type[1-3]: filter type for tunneling packet\n" + " 1: Inner MAC&VLAN and tenent ID\n" + " 2: Inner MAC and tenent ID\n" + " 3: Outer MAC, Inner MAC and tenent ID\n" " -p PORTMASK: Set mask for ports to be used by application\n" " --rx-retry [0|1]: disable/enable(default) retries on rx." "Enable retry if destintation queue is full\n" @@ -286,6 +294,7 @@ tep_termination_parse_args(int argc, char **argv) static struct option long_option[] = { {CMD_LINE_OPT_NB_DEVICES, required_argument, NULL, 0}, {CMD_LINE_OPT_UDP_PORT, required_argument, NULL, 0}, + {CMD_LINE_OPT_FILTER_TYPE, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_DELAY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_NUM, required_argument, NULL, 0}, @@ -369,6 +378,17 @@ tep_termination_parse_args(int argc, char **argv) burst_rx_retry_num = ret; } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_FILTER_TYPE, + sizeof(CMD_LINE_OPT_FILTER_TYPE))) { + ret = parse_num_opt(optarg, 3); + if (ret == -1) { + RTE_LOG(INFO, VHOST_CONFIG, "Invalid argument for filter type [1-3]\n"); + tep_termination_usage(prgname); + return -1; + } else + filter_idx = ret - 1; + } + /* Enable/disable stats. */ if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_STATS, sizeof(CMD_LINE_OPT_STATS))) { diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index f6efa90..85668ba 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -77,6 +77,7 @@ extern uint16_t num_devices; extern uint16_t udp_port; extern uint8_t ports[RTE_MAX_ETHPORTS]; +extern uint8_t filter_idx; /* ethernet addresses of ports */ extern struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS]; @@ -99,6 +100,11 @@ uint8_t vxlan_overlay_ips[2][4] = { {192, 168, 10, 1}, {192, 168, 30, 1} }; /* remote VTEP MAC address */ uint8_t peer_mac[6] = {0x00, 0x11, 0x01, 0x00, 0x00, 0x01}; +/* VXLAN RX filter type */ +uint8_t tep_filter_type[] = {RTE_TUNNEL_FILTER_IMAC_IVLAN_TENID, + RTE_TUNNEL_FILTER_IMAC_TENID, + RTE_TUNNEL_FILTER_OMAC_TENID_IMAC,}; + /* Options for configuring ethernet port */ static const struct rte_eth_conf port_conf = { .rxmode = { @@ -238,11 +244,12 @@ vxlan_tx_process(uint8_t vport_id, struct rte_mbuf *pkt) int vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m) { - int i; + int i, ret; struct ether_hdr *pkt_hdr; struct virtio_net_data_ll *dev_ll; struct virtio_net *dev = vdev->dev; uint64_t portid = dev->device_fh; + struct rte_eth_tunnel_filter_conf tunnel_filter_conf; dev_ll = ll_root_used; @@ -270,6 +277,28 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m)
[dpdk-dev] [PATCH 05/10] examples/tep_termination:add UDP port configuration for UDP tunneling packet
The port number of UDP tunneling packet is configurable, which has 16 entries in total for i40e. Signed-off-by: Jijiang Liu --- examples/tep_termination/main.c| 18 +- examples/tep_termination/vxlan_setup.c | 13 - 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index 7fd9ae5..c2d3088 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -109,6 +109,7 @@ #define MAC_ADDR_CMP 0xULL #define CMD_LINE_OPT_NB_DEVICES "nb-devices" +#define CMD_LINE_OPT_UDP_PORT "udp-port" #define CMD_LINE_OPT_RX_RETRY "rx-retry" #define CMD_LINE_OPT_RX_RETRY_DELAY "rx-retry-delay" #define CMD_LINE_OPT_RX_RETRY_NUM "rx-retry-num" @@ -133,6 +134,9 @@ struct vpool { uint32_t buf_size; } vpool_array[MAX_QUEUES+MAX_QUEUES]; +/* VXLAN UDP destination port */ +uint16_t udp_port; + /* overlay packet operation */ struct ol_switch_ops overlay_options = { .port_configure = vxlan_port_init, @@ -255,6 +259,7 @@ static void tep_termination_usage(const char *prgname) { RTE_LOG(INFO, VHOST_CONFIG, "%s [EAL options] -- -p PORTMASK\n" + " --udp-port: UDP destination port for VXLAN packet\n" " --nb-devices[1-64]: The number of virtIO device\n" " -p PORTMASK: Set mask for ports to be used by application\n" " --rx-retry [0|1]: disable/enable(default) retries on rx." @@ -280,6 +285,7 @@ tep_termination_parse_args(int argc, char **argv) const char *prgname = argv[0]; static struct option long_option[] = { {CMD_LINE_OPT_NB_DEVICES, required_argument, NULL, 0}, + {CMD_LINE_OPT_UDP_PORT, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_DELAY, required_argument, NULL, 0}, {CMD_LINE_OPT_RX_RETRY_NUM, required_argument, NULL, 0}, @@ -326,6 +332,17 @@ tep_termination_parse_args(int argc, char **argv) enable_retry = ret; } + if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_UDP_PORT, + sizeof(CMD_LINE_OPT_UDP_PORT))) { + ret = parse_num_opt(optarg, INT16_MAX); + if (ret == -1) { + RTE_LOG(INFO, VHOST_CONFIG, "Invalid argument for UDP port [0-N]\n"); + tep_termination_usage(prgname); + return -1; + } else + udp_port = ret; + } + /* Specify the retries delay time (in useconds) on RX. */ if (!strncmp(long_option[option_index].name, CMD_LINE_OPT_RX_RETRY_DELAY, sizeof(CMD_LINE_OPT_RX_RETRY_DELAY))) { @@ -1074,7 +1091,6 @@ main(int argc, char *argv[]) rte_eal_remote_launch(switch_worker, mbuf_pool, lcore_id); } - rte_vhost_feature_disable(1ULL << VIRTIO_NET_F_MRG_RXBUF); /* Register CUSE device to handle IOCTLs. */ diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c index 71414eb..f6efa90 100644 --- a/examples/tep_termination/vxlan_setup.c +++ b/examples/tep_termination/vxlan_setup.c @@ -75,6 +75,7 @@ #define RTE_TEST_TX_DESC_DEFAULT 512 extern uint16_t num_devices; +extern uint16_t udp_port; extern uint8_t ports[RTE_MAX_ETHPORTS]; /* ethernet addresses of ports */ @@ -141,9 +142,12 @@ vxlan_port_init(uint8_t port, struct rte_mempool *mbuf_pool) uint16_t rx_rings, tx_rings = (uint16_t)rte_lcore_count(); const uint16_t rx_ring_size = RTE_TEST_RX_DESC_DEFAULT; const uint16_t tx_ring_size = RTE_TEST_TX_DESC_DEFAULT; + struct rte_eth_udp_tunnel tunnel_udp; struct rte_eth_rxconf *rxconf; struct rte_eth_txconf *txconf; + struct vxlan_conf *pconf = &vxdev; + pconf->dst_port = udp_port; rte_eth_dev_info_get (port, &dev_info); dev_info.max_rx_queues = num_devices; @@ -188,6 +192,12 @@ vxlan_port_init(uint8_t port, struct rte_mempool *mbuf_pool) if (retval < 0) return retval; + /* Configure UDP port for VXLAN */ + tunnel_udp.udp_port = udp_port; + tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN; + retval = rte_eth_dev_udp_tunnel_add(port, &tunnel_udp); + if (retval < 0) + return retval; rte_eth_macaddr_get(port, &ports_eth_addr[port]); RTE_LOG(INFO, PORT, "Port %u MAC: %02"PRIx8" %02"PRIx8" %02"PRIx8 " %02"PRIx8" %02"PRIx8" %02"PRIx8"\n", @@ -198,13 +208,14 @@
[dpdk-dev] [PATCH 04/10] examples/tep_termination:implement VXLAN packet processing
Implement the following functions: 1> VXLAN port configuration 2> VXLAN tunnel setup 3> VXLAN tunnel destroying 4> VXLAN packet processing for Rx side 5> VXLAN packet processing for Tx side Signed-off-by: Jijiang Liu Signed-off-by: Thomas Long --- examples/tep_termination/Makefile |2 +- examples/tep_termination/main.c| 39 +++-- examples/tep_termination/vxlan.c | 174 +++ examples/tep_termination/vxlan.h | 17 ++- examples/tep_termination/vxlan_setup.c | 367 5 files changed, 584 insertions(+), 15 deletions(-) create mode 100644 examples/tep_termination/vxlan.c create mode 100644 examples/tep_termination/vxlan_setup.c diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile index 42a380b..0a0cf4b 100644 --- a/examples/tep_termination/Makefile +++ b/examples/tep_termination/Makefile @@ -47,7 +47,7 @@ endif APP = tep_termination # all source are stored in SRCS-y -SRCS-y := main.c +SRCS-y := main.c vxlan_setup.c vxlan.c CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 CFLAGS += $(WERROR_FLAGS) diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index f50715c..7fd9ae5 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -133,6 +133,16 @@ struct vpool { uint32_t buf_size; } vpool_array[MAX_QUEUES+MAX_QUEUES]; +/* overlay packet operation */ +struct ol_switch_ops overlay_options = { + .port_configure = vxlan_port_init, + .tunnel_setup = vxlan_link, + .tunnel_destroy = vxlan_unlink, + .tx_handle = vxlan_tx_pkts, + .rx_handle = vxlan_rx_pkts, + .param_handle = NULL, +}; + /* Enable stats. */ uint32_t enable_stats = 0; /* Enable retries on RX. */ @@ -312,9 +322,8 @@ tep_termination_parse_args(int argc, char **argv) "Invalid argument for rx-retry [0|1]\n"); tep_termination_usage(prgname); return -1; - } else { + } else enable_retry = ret; - } } /* Specify the retries delay time (in useconds) on RX. */ @@ -326,9 +335,8 @@ tep_termination_parse_args(int argc, char **argv) "Invalid argument for rx-retry-delay [0-N]\n"); tep_termination_usage(prgname); return -1; - } else { + } else burst_rx_delay_time = ret; - } } /* Specify the retries number on RX. */ @@ -340,9 +348,8 @@ tep_termination_parse_args(int argc, char **argv) "Invalid argument for rx-retry-num [0-N]\n"); tep_termination_usage(prgname); return -1; - } else { + } else burst_rx_retry_num = ret; - } } /* Enable/disable stats. */ @@ -354,9 +361,8 @@ tep_termination_parse_args(int argc, char **argv) "Invalid argument for stats [0..N]\n"); tep_termination_usage(prgname); return -1; - } else { + } else enable_stats = ret; - } } /* Set character device basename. */ @@ -448,6 +454,8 @@ virtio_tx_route(struct vhost_dev *vdev, struct rte_mbuf *m) if (unlikely(len == MAX_PKT_BURST)) { m_table = (struct rte_mbuf **)tx_q->m_table; + ret = overlay_options.tx_handle(ports[0], (uint16_t)tx_q->txq_id, + m_table, (uint16_t)tx_q->len); /* Free any buffers not handled by TX and update the port stats. */ if (unlikely(ret < len)) { do { @@ -508,6 +516,10 @@ switch_worker(__rte_unused void *arg) if (tx_q->len) { LOG_DEBUG(VHOST_DATA, "TX queue drained after timeout with burst size %u \n", tx_q->len); + ret = overlay_options.tx_handle(ports[0], + (uint16_t)tx_q->txq_id, + (struct rte_mbuf **)tx_q->m_table, + (uint16_t)tx_q
[dpdk-dev] [PATCH 03/10] examples/tep_termination:add the pluggable structures for VXLAN packet processing
We are trying to create a framework for tunneling packet processing, so some common APIs are added here, which includes 1> tunnel port configuration 2> tunnel setup 3> tunnel destroying 4> tunneling packet processing for Rx side 5> tunneling packet processing for Tx side 6> tunnel parameter processing Signed-off-by: Jijiang Liu Signed-off-by: Thomas Long --- examples/tep_termination/main.c|1 + examples/tep_termination/vxlan_setup.h | 78 2 files changed, 79 insertions(+), 0 deletions(-) create mode 100644 examples/tep_termination/vxlan_setup.h diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index bbb3bc1..f50715c 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -53,6 +53,7 @@ #include "main.h" #include "vxlan.h" +#include "vxlan_setup.h" /* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1 diff --git a/examples/tep_termination/vxlan_setup.h b/examples/tep_termination/vxlan_setup.h new file mode 100644 index 000..522062e --- /dev/null +++ b/examples/tep_termination/vxlan_setup.h @@ -0,0 +1,78 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef VXLAN_SETUP_H_ +#define VXLAN_SETUP_H_ + +typedef int (*ol_port_configure_t)(uint8_t port, + struct rte_mempool *mbuf_pool); + +typedef int (*ol_tunnel_setup_t)(struct vhost_dev *vdev, +struct rte_mbuf *m); + +typedef void (*ol_tunnel_destroy_t)(struct vhost_dev *vdev); + +typedef int (*ol_tx_handle_t)(uint8_t port_id, uint16_t queue_id, + struct rte_mbuf **tx_pkts, uint16_t nb_pkts); + +typedef int (*ol_rx_handle_t)(struct virtio_net *dev, struct rte_mbuf **pkts, + uint32_t count); + +typedef int (*ol_param_handle)(struct virtio_net *dev); + +struct ol_switch_ops { + ol_port_configure_tport_configure; + ol_tunnel_setup_t tunnel_setup; + ol_tunnel_destroy_ttunnel_destroy; + ol_tx_handle_t tx_handle; + ol_rx_handle_t rx_handle; + ol_param_handleparam_handle; +}; + +int +vxlan_port_init(uint8_t port, struct rte_mempool *mbuf_pool); + +int +vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m); + +void +vxlan_unlink(struct vhost_dev *vdev); + +int +vxlan_tx_pkts(uint8_t port_id, uint16_t queue_id, + struct rte_mbuf **tx_pkts, uint16_t nb_pkts); +int +vxlan_rx_pkts(struct virtio_net *dev, struct rte_mbuf **pkts, uint32_t count); + +#endif /* VXLAN_SETUP_H_ */ + -- 1.7.7.6
[dpdk-dev] [PATCH 02/10] examples/tep_termination:define the basic VXLAN port information
Some basic VXLAN definations are added in this file, which includes VXLAN port information and VXLAN device structures. Signed-off-by: Jijiang Liu Signed-off-by: Thomas Long --- examples/tep_termination/main.c |1 + examples/tep_termination/vxlan.h | 60 ++ 2 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 examples/tep_termination/vxlan.h diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c index ca2debe..bbb3bc1 100644 --- a/examples/tep_termination/main.c +++ b/examples/tep_termination/main.c @@ -52,6 +52,7 @@ #include #include "main.h" +#include "vxlan.h" /* the maximum number of external ports supported */ #define MAX_SUP_PORTS 1 diff --git a/examples/tep_termination/vxlan.h b/examples/tep_termination/vxlan.h new file mode 100644 index 000..8595eed --- /dev/null +++ b/examples/tep_termination/vxlan.h @@ -0,0 +1,60 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _VXLAN_H_ +#define _VXLAN_H_ + +#define PORT_MIN 49152 +#define PORT_MAX 65535 +#define PORT_RANGE ((PORT_MAX - PORT_MIN) + 1) + +#define VXLAN_N_PORTS 2 +#define VXLAN_HF_VNI 0x0800 +#define DEFAULT_VXLAN_PORT 4789 + +struct vxlan_port { + uint32_t vport_id; /**< VirtIO port id */ + uint32_t peer_ip;/**< remote VTEP IP address */ + struct ether_addr peer_mac; /**< remote VTEP MAC address */ + struct ether_addr vport_mac; /**< VirtIO port MAC address */ +} __rte_cache_aligned; + +struct vxlan_conf { + uint16_t dst_port; /**< VXLAN UDP destination port */ + uint32_t port_ip; /**< DPDK port IP address*/ + uint32_t in_key;/**< VLAN ID */ + uint32_t out_key; /**< VXLAN VNI */ + struct vxlan_port port[VXLAN_N_PORTS]; /**< VXLAN configuration */ +} __rte_cache_aligned; + +#endif /* _MAIN_H_ */ -- 1.7.7.6
[dpdk-dev] [PATCH 01/10] examples/tep_termination:initialize the VXLAN sample
This sample uses the basic virtio devices management function from the vHost example, which includes virtio device creation, destroying and maintenance. Signed-off-by: Jijiang Liu --- examples/Makefile |1 + examples/tep_termination/Makefile | 55 ++ examples/tep_termination/main.c | 1076 + examples/tep_termination/main.h | 125 + 4 files changed, 1257 insertions(+), 0 deletions(-) create mode 100644 examples/tep_termination/Makefile create mode 100644 examples/tep_termination/main.c create mode 100644 examples/tep_termination/main.h diff --git a/examples/Makefile b/examples/Makefile index d549026..3f08954 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -73,5 +73,6 @@ DIRS-$(CONFIG_RTE_LIBRTE_XEN_DOM0) += vhost_xen DIRS-y += vmdq DIRS-y += vmdq_dcb DIRS-y += vm_power_manager +DIRS-y += tep_termination include $(RTE_SDK)/mk/rte.extsubdir.mk diff --git a/examples/tep_termination/Makefile b/examples/tep_termination/Makefile new file mode 100644 index 000..42a380b --- /dev/null +++ b/examples/tep_termination/Makefile @@ -0,0 +1,55 @@ +# BSD LICENSE +# +# Copyright(c) 2010-2015 Intel Corporation. All rights reserved. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +ifeq ($(RTE_SDK),) +$(error "Please define RTE_SDK environment variable") +endif + +# Default target, can be overriden by command line or environment +RTE_TARGET ?= x86_64-native-linuxapp-gcc + +include $(RTE_SDK)/mk/rte.vars.mk + +ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp") +$(error This application can only operate in a linuxapp environment, \ +please change the definition of the RTE_TARGET environment variable) +endif + +# binary name +APP = tep_termination + +# all source are stored in SRCS-y +SRCS-y := main.c + +CFLAGS += -O2 -D_FILE_OFFSET_BITS=64 +CFLAGS += $(WERROR_FLAGS) + +include $(RTE_SDK)/mk/rte.extapp.mk diff --git a/examples/tep_termination/main.c b/examples/tep_termination/main.c new file mode 100644 index 000..ca2debe --- /dev/null +++ b/examples/tep_termination/main.c @@ -0,0 +1,1076 @@ +/*- + * BSD LICENSE + * + * Copyright(c) 2010-2015 Intel Corporation. All rights reserved. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Intel Corporation nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * L
[dpdk-dev] [PATCH 00/10] Add a VXLAN sample
This VXLAN sample simulates a VXLAN Tunnel Endpoint (VTEP) termination in DPDK, which is used to demonstrate the offload and filtering capabilities of i40 NIC for VXLAN packet. And this sample uses the basic virtio devices management function from vHOST example, and the US-vHost interface and tunnel filtering mechanism to direct the traffic to/from a specific VM. In addition, this sample is also designed to show how tunneling protocols can be handled. For the vHost interface, we do not need to support zero copy/inter VM packet transfer, etc. The approaches we took would be of benefit to you because we put a pluggable structure in place so that the application could be easily extended to support a new tunneling protocol. The software framework is as follows: |---| |---| | VM-1(VNI:100) | | VM-2(VNI:200)| | |--| |--| | | |--| |--| | | |vport0| |vport1| | | |vport0| |vport1| | |-|--|-|--|-| |-|--|-|--|-| Guests \ / |-\---/| | us-vHost interface | | |-||--| | | decap| | TEP| | encap | DPDK App | |-||--| | |||| |||| || |-||---| |tunnel filter|| IP/L4 Tx csum | |IP/L4 csum || TSO | |packet type || | NIC |packet recogn|| | |-||---| || || || /---\ VXLAN Tunnel The sample will support the followings: 1> Tunneling packet recognition. 2> The port of UDP tunneling is configurable 3> Directing incoming traffic to the correct queue based on the tunnel filter type such as inner MAC address and VNI. The VNI will be assigned from a static internal table based on the US-VHOST device ID. Each device will receive a unique device ID. The inner MAC will be learned by the first packet transmitted from a device. 4> Decapsulation of Rx VXLAN traffic. This is a software only operation (will use HW header split instead later) 5> Encapsulation of Tx VXLAN traffic. This is a software only operation 6> Tx outer IP, inner IP and L4 checksum offload 7> TSO support for tunneling packet The limitations: 1. No ARP support 2. There are some duplicated source codes because I used the basic virtio device management function from VHOST sample. Considering that the current VHOST sample is quite complicated and huge enough, I think we shall have a separate sample for tunneling packet processing. 3. Currently, only the i40e NIC is tested in the sample, but other types of NICs will also be supported if they are able to support tunneling packet filter. Jijiang Liu (10): create VXLAN sample framework using virtio device management function add basic VXLAN structures addthe pluggable structures implement VXLAN packet processing add udp port configuration add filter type configuration add tx checksum offload configuration add TSO offload configuration add Rx checksum statistics add encapsulation and decapsulation flags config/common_linuxapp |2 +- examples/Makefile |1 + examples/tep_termination/Makefile | 55 ++ examples/tep_termination/main.c| 1205 examples/tep_termination/main.h| 129 examples/tep_termination/vxlan.c | 260 +++ examples/tep_termination/vxlan.h | 76 ++ examples/tep_termination/vxlan_setup.c | 453 examples/tep_termination/vxlan_setup.h | 78 ++ 9 files changed, 2258 insertions(+), 1 deletions(-) create mode 100644 examples/tep_termination/Makefile create mode 100644 examples/tep_termination/main.c create mode 100644 examples/tep_termination/main.h create mode 100644 examples/tep_termination/vxlan.c create mode 100644 examples/tep_termination/vxlan.h create mode 100644 examples/tep_termination/vxlan_setup.c create mode 100644 examples/tep_termination/vxlan_setup.h -- 1.7.7.6
[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
On Fri, May 15, 2015 at 12:54:19PM +, Assaad, Sami (Sami) wrote: > Thanks Bruce for your reply. > > Yes, your idea of bringing the PF into the VM looks like an option. However, > how do you configure the physical interfaces within the VM supporting SRIOV? > I always believed that the VM needed to be associated with a virtual/emulated > interface card. With your suggestion, I would actually configure the physical > interface card/non-emulated within the VM. > > If you could provide me some example configuration commands, it would be > really appreciated. > You'd pass in the PF in the same way as the VF, just skip all the steps creating the VF on the host. To the system and hypervisor, both are just PCI devices! As for configuration, the setup and configuration of the PF in the guest is exactly the same as on the host - it's the same hardware with the same PCI bars. It's the IOMMU on your platform that takes care of memory isolation and address translation and that should work with either PF or VF. Regards, /Bruce > Thanks in advance. > > Best Regards, > Sami. > > -Original Message- > From: Bruce Richardson [mailto:bruce.richardson at intel.com] > Sent: Friday, May 15, 2015 5:27 AM > To: Stephen Hemminger > Cc: Assaad, Sami (Sami); dev at dpdk.org > Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > Pass-Through (SR-IOV)? > > On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > > On Thu, 14 May 2015 21:38:24 + > > "Assaad, Sami (Sami)" wrote: > > > > > Hello, > > > > > > My Hardware consists of the following: > > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU > > > E5-2680 v3 @ 2.50GHz) > > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > > > Software: > > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > > - DPDK 1.8 > > > > > > I want all the network traffic received on the two 10G ports to be > > > transmitted to my VM. The issue is that the Virtual Function / Physical > > > Functions have setup the internal virtual switch to only route Ethernet > > > packets with destination MAC address matching the VM virtual interface > > > MAC. How can I configure my virtual environment to provide all network > > > traffic to the VM...i.e. set the virtual functions for both PCI devices > > > in Promiscuous mode? > > > > > > [ If a l2fwd-vf example exists, this would actually solve this > > > problem ... Is there a DPDK l2fwd-vf example available? ] > > > > > > > > > Thanks in advance. > > > > > > Best Regards, > > > Sami Assaad. > > > > This is a host side (not DPDK) issue. > > > > Intel PF driver will not allow guest (VF) to go into promiscious mode > > since it would allow traffic stealing which is a security violation. > > Could you maybe try passing the PF directly into the VM, rather than a VF > based off it? Since you seem to want all traffic to go to the one VM, there > seems little point in creating a VF on the device, and should let the VM > control the whole NIC directly. > > Regards, > /Bruce
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
On Fri, May 15, 2015 at 02:50:37PM +0200, Thomas Monjalon wrote: > 2015-05-15 13:36, Bruce Richardson: > > On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote: > > > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote: > > > > 2015-05-13 11:01, Bruce Richardson: > > > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote: > > > > >> 2015-05-12 19:04, Bruce Richardson: > > > > >>> drivers/e1000/e1000/e1000_hw.h | 1026 > > > > >> > > > > >> As explained in a previous comment, > > > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html > > > > >> I think this path would be better: > > > > >>drivers/net/e1000/base/e1000_hw.h > > > > > > > > > > Two reasons why I didn't create the "net" subfolder: > > > > > 1. I initally forgot to consider it :-( > > > > > 2. While we may at some future point have other device driver types, > > > > > are we really > > > > > needing to start categorising PMDs at this point? > > > > > > > > > > As for the base driver part, I was viewing that as a something that > > > > > should be > > > > > a separate patch set, since it's unrelated to moving things to the > > > > > drivers > > > > > subdir. > > > > > > > > I understand your points and I partially agree. > > > > However, file moves may be perturbing because it change habits > > > > and may complicate a bit the git history browsing. > > > > So I think it's better to minimize such moves and do altogether. > > > > > > > Ok. I'll see about renaming the base code directories as part of the > > > overall > > > move process [Unless there are objections from any of the driver > > > maintainers]. > > > > > > As for drivers vs drivers/net, I suppose there is no real difference in > > > what > > > the path actually is, so I can make that change too. However, I still > > > think I > > > prefer the shorter path. Anyone else any opinions on this [before I start > > > reworking this again]? > > > > > > /Bruce > > > > Hi Thomas, > > > > a specific question on how you want the rename of the "base" driver > > directories. > > Can I take it from your question that you want the base driver renaming to > > be > > merged into a single commit with the rest of the move for the driver? For > > example, > > as part of the patch move from "lib/librte_pmd_e1000" to > > "drivers/net/e1000" we > > also rename the "e1000" subdir to "base". > > Yes, to minimize number of patches moving files (and breaking history for > some tools). > > > The slight problem with this approach - of trying to do both moves in a > > single > > patch is that the rename of the subdirectory "e1000" involves changes to > > other > > files in the librte_pmd_e1000 directory which are being moved, so we can't > > have a clean patch that just moves files and doesn't touch those files > > which are > > being moved. Therefore, from a patch cleanliness point of view, the renames > > to the base directory should be a separate patch, which I can make part of > > this > > series. > > The changes are only in Makefile and include lines, right? > I think it's not a big deal to have small changes. But maybe it will make > difficult to read the move with some tools. > Feel free to adopt the solution you prefer if nobody else has an experienced > opinion. > I would tend to agree that we are as well merging the commits into one, but I just want to be sure about it before I go doing the work and respinning the patches. :-) So, any objections to doing 2 moves in one patch, please raise them soon, i.e. today. Regards, /Bruce
[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
> -Original Message- > From: Assaad, Sami (Sami) [mailto:sami.assaad at alcatel-lucent.com] > Sent: Friday, May 15, 2015 2:00 PM > To: Ananyev, Konstantin; Richardson, Bruce; Stephen Hemminger > Cc: dev at dpdk.org > Subject: RE: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > Pass-Through (SR-IOV)? > > Thanks Konstantin for your reply. > > Konstantin, > > Would you be able in providing more details as to ixgbe VF mirroring? > Would you have any valuable URL's or documentation that explain this in > detail and/or provide examples? I didn't use it much, but you can have a look at rte_eth_mirror_rule_set()/rte_eth_mirror_rule_reset(). Also you can use testpmd as a reference how to use these functions. Let say: 1. start testpmd with PF and 2 VFs on the same port: ./dpdk.org/x86_64-native-linuxapp-gcc/app/testpmd -l 6,7 -n 4 --socket-mem=1024,0 -w 07:00.1 -w 07:10.1 -w 07:10.3 -- -i --no-flush-rx testpmd> set verbose 9 testpmd> set fwd rxonly testpmd> start 2. Send a packet to the port and confirm that only PF/queue 0 received it. Should see something like that: port 0/queue 0: received 1 packets src=00:00:0A:00:0E:00 - dst=00:00:0A:00:0F:00 - type=0x0800 - length=60 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR 3. configure 2 mirror rules, so each VF receive a copy: testpmd> set port 0 mirror-rule 1 uplink-mirror dst-pool 32 on testpmd> set port 0 mirror-rule 0 uplink-mirror dst-pool 33 on 4. Send another packet and confirm that PF and both VF received a copy port 0/queue 0: received 1 packets src=00:00:0A:00:0E:00 - dst=00:00:0A:00:0F:00 - type=0x0800 - length=60 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 1/queue 0: received 1 packets src=00:00:0A:00:0E:00 - dst=00:00:0A:00:0F:00 - type=0x0800 - length=64 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR port 2/queue 0: received 1 packets src=00:00:0A:00:0E:00 - dst=00:00:0A:00:0F:00 - type=0x0800 - length=64 - nb_segs=1 - Receive queue=0x0 PKT_RX_IPV4_HDR Konstantin > > Thanks in advance. > > Best Regards, > Sami. > > -Original Message- > From: Ananyev, Konstantin [mailto:konstantin.ananyev at intel.com] > Sent: Friday, May 15, 2015 5:31 AM > To: Richardson, Bruce; Stephen Hemminger > Cc: dev at dpdk.org; Assaad, Sami (Sami) > Subject: RE: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > Pass-Through (SR-IOV)? > > > > > -Original Message- > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > > Sent: Friday, May 15, 2015 10:27 AM > > To: Stephen Hemminger > > Cc: dev at dpdk.org; Assaad, Sami (Sami) > > Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > > Pass-Through (SR-IOV)? > > > > On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > > > On Thu, 14 May 2015 21:38:24 + > > > "Assaad, Sami (Sami)" wrote: > > > > > > > Hello, > > > > > > > > My Hardware consists of the following: > > > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU > > > > E5-2680 v3 @ 2.50GHz) > > > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > > > > > Software: > > > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > > > - DPDK 1.8 > > > > > > > > I want all the network traffic received on the two 10G ports to be > > > > transmitted to my VM. The issue is that the Virtual Function / > > Physical Functions have setup the internal virtual switch to only > > route Ethernet packets with destination MAC address matching the VM > > virtual interface MAC. How can I configure my virtual environment to > > provide all network traffic to the VM...i.e. set the virtual > functions for both PCI devices in Promiscuous mode? > > > > > > > > [ If a l2fwd-vf example exists, this would actually solve this > > > > problem ... Is there a DPDK l2fwd-vf example available? ] > > > > > > > > > > > > Thanks in advance. > > > > > > > > Best Regards, > > > > Sami Assaad. > > > > > > This is a host side (not DPDK) issue. > > > > > > Intel PF driver will not allow guest (VF) to go into promiscious > > > mode since it would allow traffic stealing which is a security violation. > > > > Could you maybe try passing the PF directly into the VM, rather than a > > VF based off it? Since you seem to want all traffic to go to the one > > VM, there seems little point in creating a VF on the device, and > > should let the VM control the whole NIC directly. > > As I remember, with ixgbe it is possible to make one VF a mirror (receive a > copy of all traffic). > Konstantin > > > > > Regards, > > /Bruce
[dpdk-dev] performance issue with ovs + dpdk2.0 with vhost
Hi All, I am trying to get a Guest VM connected to the dpdkvhost interface on a host which has the ovs running from the latest ovs git and dpdk2.0. Looks like I am missing something as 95% of traffic is not getting to the VM. Can one of you please let me know which mailing list I should be posting the details for getting a resolution. Is it this dpdk list OR would it be the openvswitch list? Regards, Ravi..
[dpdk-dev] [PATCH 00/19] Move PMDs to drivers directory
On Wed, May 13, 2015 at 02:40:48PM +0100, Bruce Richardson wrote: > On Wed, May 13, 2015 at 03:33:27PM +0200, Thomas Monjalon wrote: > > 2015-05-13 11:01, Bruce Richardson: > > > On Tue, May 12, 2015 at 09:30:45PM +0200, Thomas Monjalon wrote: > > >> 2015-05-12 19:04, Bruce Richardson: > > >>> drivers/e1000/e1000/e1000_hw.h | 1026 > > >> > > >> As explained in a previous comment, > > >> http://dpdk.org/ml/archives/dev/2015-May/017509.html > > >> I think this path would be better: > > >>drivers/net/e1000/base/e1000_hw.h > > > > > > Two reasons why I didn't create the "net" subfolder: > > > 1. I initally forgot to consider it :-( > > > 2. While we may at some future point have other device driver types, are > > > we really > > > needing to start categorising PMDs at this point? > > > > > > As for the base driver part, I was viewing that as a something that > > > should be > > > a separate patch set, since it's unrelated to moving things to the drivers > > > subdir. > > > > I understand your points and I partially agree. > > However, file moves may be perturbing because it change habits > > and may complicate a bit the git history browsing. > > So I think it's better to minimize such moves and do altogether. > > > Ok. I'll see about renaming the base code directories as part of the overall > move process [Unless there are objections from any of the driver maintainers]. > > As for drivers vs drivers/net, I suppose there is no real difference in what > the path actually is, so I can make that change too. However, I still think I > prefer the shorter path. Anyone else any opinions on this [before I start > reworking this again]? > > /Bruce Hi Thomas, a specific question on how you want the rename of the "base" driver directories. Can I take it from your question that you want the base driver renaming to be merged into a single commit with the rest of the move for the driver? For example, as part of the patch move from "lib/librte_pmd_e1000" to "drivers/net/e1000" we also rename the "e1000" subdir to "base". The slight problem with this approach - of trying to do both moves in a single patch is that the rename of the subdirectory "e1000" involves changes to other files in the librte_pmd_e1000 directory which are being moved, so we can't have a clean patch that just moves files and doesn't touch those files which are being moved. Therefore, from a patch cleanliness point of view, the renames to the base directory should be a separate patch, which I can make part of this series. /Bruce
[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
Thanks Konstantin for your reply. Konstantin, Would you be able in providing more details as to ixgbe VF mirroring? Would you have any valuable URL's or documentation that explain this in detail and/or provide examples? Thanks in advance. Best Regards, Sami. -Original Message- From: Ananyev, Konstantin [mailto:konstantin.anan...@intel.com] Sent: Friday, May 15, 2015 5:31 AM To: Richardson, Bruce; Stephen Hemminger Cc: dev at dpdk.org; Assaad, Sami (Sami) Subject: RE: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)? > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > Sent: Friday, May 15, 2015 10:27 AM > To: Stephen Hemminger > Cc: dev at dpdk.org; Assaad, Sami (Sami) > Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > Pass-Through (SR-IOV)? > > On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > > On Thu, 14 May 2015 21:38:24 + > > "Assaad, Sami (Sami)" wrote: > > > > > Hello, > > > > > > My Hardware consists of the following: > > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU > > > E5-2680 v3 @ 2.50GHz) > > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > > > Software: > > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > > - DPDK 1.8 > > > > > > I want all the network traffic received on the two 10G ports to be > > > transmitted to my VM. The issue is that the Virtual Function / > Physical Functions have setup the internal virtual switch to only > route Ethernet packets with destination MAC address matching the VM > virtual interface MAC. How can I configure my virtual environment to provide > all network traffic to the VM...i.e. set the virtual functions for both PCI > devices in Promiscuous mode? > > > > > > [ If a l2fwd-vf example exists, this would actually solve this > > > problem ... Is there a DPDK l2fwd-vf example available? ] > > > > > > > > > Thanks in advance. > > > > > > Best Regards, > > > Sami Assaad. > > > > This is a host side (not DPDK) issue. > > > > Intel PF driver will not allow guest (VF) to go into promiscious > > mode since it would allow traffic stealing which is a security violation. > > Could you maybe try passing the PF directly into the VM, rather than a > VF based off it? Since you seem to want all traffic to go to the one > VM, there seems little point in creating a VF on the device, and > should let the VM control the whole NIC directly. As I remember, with ixgbe it is possible to make one VF a mirror (receive a copy of all traffic). Konstantin > > Regards, > /Bruce
[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
Thanks Bruce for your reply. Yes, your idea of bringing the PF into the VM looks like an option. However, how do you configure the physical interfaces within the VM supporting SRIOV? I always believed that the VM needed to be associated with a virtual/emulated interface card. With your suggestion, I would actually configure the physical interface card/non-emulated within the VM. If you could provide me some example configuration commands, it would be really appreciated. Thanks in advance. Best Regards, Sami. -Original Message- From: Bruce Richardson [mailto:bruce.richard...@intel.com] Sent: Friday, May 15, 2015 5:27 AM To: Stephen Hemminger Cc: Assaad, Sami (Sami); dev at dpdk.org Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)? On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > On Thu, 14 May 2015 21:38:24 + > "Assaad, Sami (Sami)" wrote: > > > Hello, > > > > My Hardware consists of the following: > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU E5-2680 > > v3 @ 2.50GHz) > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > Software: > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > - DPDK 1.8 > > > > I want all the network traffic received on the two 10G ports to be > > transmitted to my VM. The issue is that the Virtual Function / Physical > > Functions have setup the internal virtual switch to only route Ethernet > > packets with destination MAC address matching the VM virtual interface MAC. > > How can I configure my virtual environment to provide all network traffic > > to the VM...i.e. set the virtual functions for both PCI devices in > > Promiscuous mode? > > > > [ If a l2fwd-vf example exists, this would actually solve this > > problem ... Is there a DPDK l2fwd-vf example available? ] > > > > > > Thanks in advance. > > > > Best Regards, > > Sami Assaad. > > This is a host side (not DPDK) issue. > > Intel PF driver will not allow guest (VF) to go into promiscious mode > since it would allow traffic stealing which is a security violation. Could you maybe try passing the PF directly into the VM, rather than a VF based off it? Since you seem to want all traffic to go to the one VM, there seems little point in creating a VF on the device, and should let the VM control the whole NIC directly. Regards, /Bruce
[dpdk-dev] [PATCH] fm10k: support XEN domain0
Hi, 2015-05-15 16:56, Shaopeng He: > +#ifdef RTE_LIBRTE_XEN_DOM0 > + q->hw_ring_phys_addr = rte_mem_phy2mch(mz->memseg_id, mz->phys_addr); > +#else > q->hw_ring_phys_addr = mz->phys_addr; > +#endif I know this is already done this way in other drivers, but don't you think it's time to create a function to get physical address from a memzone? So we could remove these "ifdef Xen" from every drivers. Thanks
[dpdk-dev] Vhost user no connection vm2vm
Hello, I have strange issue with example/vhost app. I had compiled DPDK to run a vhost example app with followed flags CONFIG_RTE_LIBRTE_VHOST=y CONFIG_RTE_LIBRTE_VHOST_USER=y CONFIG_RTE_LIBRTE_VHOST_DEBUG=n then I run vhost app based on documentation: ./build/app/vhost-switch -c f -n 4 --huge-dir /mnt/huge --socket-mem 3712 -- -p 0x1 --dev-basename usvhost --vm2vm 1 --stats 9 -I use this strange --socket-mem 3712 because of physical limit of memoryon device -with this vhost user I run two KVM machines with followed parameters kvm -nographic -boot c -machine pc-i440fx-1.4,accel=kvm -name vm1 -cpu host -smp 2 -hda /home/ubuntu/qemu/debian_squeeze2_amd64.qcow2 -m 1024 -mem-path /mnt/huge -mem-prealloc -chardev socket,id=char1,path=/home/ubuntu/dpdk/examples/vhost/usvhost -netdev type=vhost-user,id=hostnet1,chardev=char1 -device virtio-net pci,netdev=hostnet1,id=net1,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off -chardev socket,id=char2,path=/home/ubuntu/dpdk/examples/vhost/usvhost -netdev type=vhost-user,id=hostnet2,chardev=char2 -device virtio-net-pci,netdev=hostnet2,id=net2,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off After running KVM virtio correctly starting (below logs from vhost app) ... VHOST_CONFIG: mapped region 0 fd:31 to 0x2aaabae0 sz:0xa off:0x0 VHOST_CONFIG: mapped region 1 fd:37 to 0x2aaabb00 sz:0x1000 off:0xc VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK VHOST_CONFIG: vring kick idx:0 file:38 VHOST_CONFIG: virtio isn't ready for processing. VHOST_CONFIG: read message VHOST_USER_SET_VRING_NUM VHOST_CONFIG: read message VHOST_USER_SET_VRING_BASE VHOST_CONFIG: read message VHOST_USER_SET_VRING_ADDR VHOST_CONFIG: read message VHOST_USER_SET_VRING_KICK VHOST_CONFIG: vring kick idx:1 file:39 VHOST_CONFIG: virtio is now ready for processing. VHOST_DATA: (1) Device has been added to data core 2 So everything looking good. Maybe it is something trivial but using options: --vm2vm 1 (or) 2 --stats 9 it seems that I didn't have connection between VM2VM communication. I set manually IP for eth0 and eth1: on 1 VM ifconfig eth0 192.168.0.100 netmask 255.255.255.0 up ifconfig eth1 192.168.1.101 netmask 255.255.255.0 up on 2 VM ifconfig eth0 192.168.1.200 netmask 255.255.255.0 up ifconfig eth1 192.168.0.202 netmask 255.255.255.0 up I notice that in vhostapp are one directional rx/tx queue so I tryied to ping between VM1 to VM2 using both interfaces ping -I eth0 192.168.1.200 ping -I eth1 192.168.1.200 ping -I eth0 192.168.0.202 ping -I eth1 192.168.0.202 on VM2 using tcpdump on both interfaces I didn't see any ICMP requests or traffic And I cant ping between any IP/interfaces, moreover stats show me that: Device statistics Statistics for device 0 -- TX total: 0 TX dropped: 0 TX successful: 0 RX total: 0 RX dropped: 0 RX successful: 0 Statistics for device 1 -- TX total: 0 TX dropped: 0 TX successful: 0 RX total: 0 RX dropped: 0 RX successful: 0 Statistics for device 2 -- TX total: 0 TX dropped: 0 TX successful: 0 RX total: 0 RX dropped: 0 RX successful: 0 Statistics for device 3 -- TX total: 0 TX dropped: 0 TX successful: 0 RX total: 0 RX dropped: 0 RX successful: 0 == So it seems like any packet didn't leave my VM. also arp table is empty on each VM. ifconfig -a show that no packet come across eth0, eth1 which I used with ping, but everything come across local loopback eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56 inet addr:192.168.0.200 Bcast:192.168.0.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe12:3456/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) eth1 Link encap:Ethernet HWaddr 52:54:00:12:34:57 inet addr:192.168.1.202 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::5054:ff:fe12:3457/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) loLink encap:Loc
[dpdk-dev] performance issue with ovs + dpdk2.0 with vhost
Hi, This is what I am trying to Do. Below is the setup.. | +--+ | | guest| | | | | | | | guest | eth0 L3fwd eth1 | | | | | | | +---+--+---+ __| ^ : | | : v __ +-+--+-+ | | | ovs-br0 | | | +--+ | | | ^ : | | | +--+ +-+ | | host | : v | | | +--++--+ | | | | dpdk0 | ovs-dpdk | dpdk1 | | | +---+--++--+---+ __| ^ : | | : v +--+ | | |traffic generator | | | +--+| Step1: Use the latest ovs and dpdk2.0 to get the ovs running with 2 dpdk interfaces that are bound to 2 10GB physical interfaces #** Inser the required Modules cd /root/dpdk-2.0.0 modprobe uio modprobe cuse rmmod igb_uio rmmod rte_kni insmod x86_64-native-linuxapp-gcc/kmod/igb_uio.ko # Assign the dpdk capable interfaces to igb_uio driver tools/dpdk_nic_bind.py --status tools/dpdk_nic_bind.py -b igb_uio :02:00.0 tools/dpdk_nic_bind.py -b igb_uio :02:00.1 tools/dpdk_nic_bind.py --status #--- Setup the openVswitch cd /root/ovs pkill -9 ovs mkdir -p /usr/local/etc/openvswitch mkdir -p /usr/local/var/run/openvswitch rm -rf /usr/local/etc/openvswitch/conf.db ovsdb/ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema #Start ovsdb-server ovsdb/ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=db:Open_vSwitch,Open_vSwitch,manager_options --pidfile --detach utilities/ovs-vsctl --no-wait init #Start vswitchd: export DB_SOCK=/usr/local/var/run/openvswitch/db.sock rm /dev/vhost-net vswitchd/ovs-vswitchd --dpdk -c 0x3 -n 4 --socket-mem 1024,0 -- unix:$DB_SOCK --pidfile --detach #Add bridge & ports utilities/ovs-vsctl add-br ovs-br0 -- set bridge ovs-br0 datapath_type=netdev utilities/ovs-vsctl add-port ovs-br0 dpdk0 -- set Interface dpdk0 type=dpdk utilities/ovs-vsctl add-port ovs-br0 dpdk1 -- set Interface dpdk1 type=dpdk Step2: Create the dpdkvhost interfaces and bring up the guestVM using QEMU export DPDK_DIR=/root/dpdk-2.0.0 insmod $DPDK_DIR/lib/librte_vhost/eventfd_link/eventfd_link.ko cd /root/ovs utilities/ovs-vsctl add-port ovs-br0 dpdkvhost0 -- set Interface dpdkvhost0 type=dpdkvhost utilities/ovs-vsctl add-port ovs-br0 dpdkvhost1 -- set Interface dpdkvhost1 type=dpdkvhost # Start the guest ubuntu VM1 from a terminal that is logged in as root qemu-system-x86_64 --enable-kvm -k fr -m 1G \ -cpu host -smp cores=2,threads=1,sockets=1 \ -serial telnet::,server,nowait -monitor telnet::,server,nowait \ -hda /root/VMs/images/ubuntu-14.04-template.qcow2 \ -object memory-backend-file,id=mem,size=1G,mem-path=/mnt/huge_1GB,share=on \ -numa node,memdev=mem \ -netdev type=tap,id=dpdkvhost0,script=no,downscript=no,ifname=dpdkvhost0,vhost=on \ -device virtio-net-pci,netdev=dpdkvhost0,mac=52:54:00:12:34:56,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off \ -netdev type=tap,id=dpdkvhost1,script=no,downscript=no,ifname=dpdkvhost1,vhost=on \ -device virtio-net-pci,netdev=dpdkvhost1,mac=52:54:00:12:34:57,csum=off,gso=off,guest_tso4=off,guest_tso6=off,guest_ecn=off \ -device ne2k_pci,mac=DE:AD:DE:01:02:03,netdev=user.0 -netdev user,id=user.0,hostfwd=tcp::-:22 & # Add flows between ports utilities/ovs-ofctl del-flows ovs-br0 utilities/ovs-ofctl add-flow ovs-br0 in_port=1,action=output:3 utilities/ovs-ofctl add-flow ovs-br0 in_port=2,action=output:4 utilities/ovs-ofctl add-flow ovs-br0 in_port=3,action=output:1 utilities/ovs-ofctl add-flow ovs-br0 in_port=4,action=output:2 Once I complete the above settings. I log into the VM and enable ipv4 forwarding so that it could do l3 fwd between eth0 and eth1 The issue I am seeing is when I start pumping packets on IXIA port connected to physical port dpdk0 I see lots of tx_errors on dpdk0. I can only pass about 1000 pps without getting any errors. Is there anything I am doing w
[dpdk-dev] performance issue with ovs + dpdk2.0 with vhost
On 5/15/15 9:55 AM, Rao, Ravi wrote: > Hi All, > I am trying to get a Guest VM connected to the dpdkvhost interface on a > host which has the ovs running from the latest ovs git and dpdk2.0. Looks > like I am missing something as 95% of traffic is not getting to the VM. Can > one of you please let me know which mailing list I should be posting the > details for getting a resolution. Is it this dpdk list OR would it be the > openvswitch list? You could also try the openvswitch discuss list but this list is a good starting point. I am working with vhost/dpdk2.0 and ovs and others are too. Could you please send more details about what you are seeing? Are you using the Linux stack in the guest? Do you see packets on the input IF in the guest? > Regards, > Ravi.. -- Thomas F Herbert Principal Software Engineer Red Hat therbert at redhat.com
[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > On Thu, 14 May 2015 21:38:24 + > "Assaad, Sami (Sami)" wrote: > > > Hello, > > > > My Hardware consists of the following: > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU E5-2680 > > v3 @ 2.50GHz) > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > Software: > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > - DPDK 1.8 > > > > I want all the network traffic received on the two 10G ports to be > > transmitted to my VM. The issue is that the Virtual Function / Physical > > Functions have setup the internal virtual switch to only route Ethernet > > packets with destination MAC address matching the VM virtual interface MAC. > > How can I configure my virtual environment to provide all network traffic > > to the VM...i.e. set the virtual functions for both PCI devices in > > Promiscuous mode? > > > > [ If a l2fwd-vf example exists, this would actually solve this problem ... > > Is there a DPDK l2fwd-vf example available? ] > > > > > > Thanks in advance. > > > > Best Regards, > > Sami Assaad. > > This is a host side (not DPDK) issue. > > Intel PF driver will not allow guest (VF) to go into promiscious mode > since it would allow traffic stealing which is a security violation. Could you maybe try passing the PF directly into the VM, rather than a VF based off it? Since you seem to want all traffic to go to the one VM, there seems little point in creating a VF on the device, and should let the VM control the whole NIC directly. Regards, /Bruce
[dpdk-dev] [PATCH] eal: reduce/change log severity levels
Change the log level of startup messages. Anything that is just normal activity (like getting virtual areas) is changed to debug level. Anything that is a failure should be NOTICE or ERR severity. Signed-off-by: Stephen Hemminger --- lib/librte_eal/linuxapp/eal/eal.c | 2 +- lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 11 +- lib/librte_eal/linuxapp/eal/eal_memory.c| 27 + lib/librte_eal/linuxapp/eal/eal_pci_vfio.c | 2 +- lib/librte_eal/linuxapp/eal/eal_timer.c | 2 +- lib/librte_eal/linuxapp/eal/eal_xen_memory.c| 6 +++--- 6 files changed, 26 insertions(+), 24 deletions(-) diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index bd770cf..8204102 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -797,7 +797,7 @@ rte_eal_init(int argc, char **argv) rte_eal_mcfg_complete(); TAILQ_FOREACH(solib, &solib_list, next) { - RTE_LOG(INFO, EAL, "open shared lib %s\n", solib->name); + RTE_LOG(DEBUG, EAL, "open shared lib %s\n", solib->name); solib->lib_handle = dlopen(solib->name, RTLD_NOW); if (solib->lib_handle == NULL) RTE_LOG(WARNING, EAL, "%s\n", dlerror()); diff --git a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c index 028e309..b1eb39c 100644 --- a/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c +++ b/lib/librte_eal/linuxapp/eal/eal_hugepage_info.c @@ -214,7 +214,7 @@ clear_hugedir(const char * hugedir) /* open directory */ dir = opendir(hugedir); if (!dir) { - RTE_LOG(INFO, EAL, "Unable to open hugepage directory %s\n", + RTE_LOG(ERR, EAL, "Unable to open hugepage directory %s\n", hugedir); goto error; } @@ -222,7 +222,7 @@ clear_hugedir(const char * hugedir) dirent = readdir(dir); if (!dirent) { - RTE_LOG(INFO, EAL, "Unable to read hugepage directory %s\n", + RTE_LOG(ERR, EAL, "Unable to read hugepage directory %s\n", hugedir); goto error; } @@ -262,7 +262,7 @@ error: if (dir) closedir(dir); - RTE_LOG(INFO, EAL, "Error while clearing hugepage dir: %s\n", + RTE_LOG(ERR, EAL, "Error while clearing hugepage dir: %s\n", strerror(errno)); return -1; @@ -297,8 +297,9 @@ eal_hugepage_info_init(void) if (hpi->hugedir == NULL){ int32_t num_pages; if ((num_pages = get_num_hugepages(dirent->d_name)) > 0) - RTE_LOG(INFO, EAL, "%u hugepages of size %llu reserved, "\ - "but no mounted hugetlbfs found for that size\n", + RTE_LOG(NOTICE, EAL, + "%u hugepages of size %llu reserved, " + "but no mounted hugetlbfs found for that size\n", (unsigned)num_pages, (unsigned long long)hpi->hugepage_sz); } else { diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 5f9f92e..aa373a8 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -239,7 +239,7 @@ get_virtual_area(size_t *size, size_t hugepage_sz) } else addr = NULL; - RTE_LOG(INFO, EAL, "Ask a virtual area of 0x%zx bytes\n", *size); + RTE_LOG(DEBUG, EAL, "Ask a virtual area of 0x%zx bytes\n", *size); fd = open("/dev/zero", O_RDONLY); if (fd < 0){ @@ -255,7 +255,8 @@ get_virtual_area(size_t *size, size_t hugepage_sz) if (addr == MAP_FAILED) { close(fd); - RTE_LOG(INFO, EAL, "Cannot get a virtual area\n"); + RTE_LOG(ERR, EAL, "Cannot get a virtual area: %s\n", + strerror(errno)); return NULL; } @@ -268,7 +269,7 @@ get_virtual_area(size_t *size, size_t hugepage_sz) aligned_addr &= (~(hugepage_sz - 1)); addr = (void *)(aligned_addr); - RTE_LOG(INFO, EAL, "Virtual area found at %p (size = 0x%zx)\n", + RTE_LOG(DEBUG, EAL, "Virtual area found at %p (size = 0x%zx)\n", addr, *size); /* increment offset */ @@ -604,7 +605,7 @@ find_numasocket(struct hugepage_file *hugepg_tbl, struct hugepage_info *hpi) f = fopen("/proc/self/numa_maps", "r"); if (f == NULL) { - RTE_LOG(INFO, EAL, "cannot open /proc/self/numa_maps," + RTE_LOG(NOTICE, EAL,
[dpdk-dev] DPDK ACL bug? pkt matches the wrong ACL rule.
Hi Zi, > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Zi Hu > Sent: Friday, May 15, 2015 1:27 AM > To: dev at dpdk.org > Subject: [dpdk-dev] DPDK ACL bug? pkt matches the wrong ACL rule. > > Hi, there, > > I recently noticed that sometimes packets are matched with the wrong ACL > rules when using the DPDK ACL library. > > I tested it with the "testacl" under dpdk/build/app: > Here are my rule file and trace file: > cat test_data/rule1 > @192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 52 6/0xff > @192.168.0.0/24 192.168.0.0/24 400 : 500 54 : 65280 6/0xff > @192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 65535 6/0xff > > cat test_data/trace1 > 0xc0a80005 0xc0a80009 450 53 0x06 > > I run the test by: > sudo ./testacl -n 2 -c 4 -- --rulesf=./test_data/rule1 > --tracef=./test_data/trace1 > > Result: > . > acl context @0x7f5b43effac0 > socket_id=-1 > alg=2 > max_rules=65536 > rule_size=96 > num_rules=3 > num_categories=3 > num_tries=1 > ipv4_5tuple: 1, category: 0, result: 1 > search_ip5tuples_once(1, 256, sse) returns 1 > search_ip5tuples @lcore 2: 1 iterations, 1 pkts, 1 categories, 21812 > cycles, 21812.00 cycles/pkt > > > The result shows that the packet matches the second rule, which is wrong. > The dest port of the pkt is 53, so it should match the third rule. > How possible could it match the second rule? Anyone see similar situation > before? > > Another interesting I found is that if we make the dest port range to be > 54 : 65279 in the second rule (only change 65280 to 65279, all other stuff > remains the same): > > cat test_data/rule1 > @192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 52 6/0xff > @192.168.0.0/24 192.168.0.0/24 400 : 500 54 : 65279 6/0xff > @192.168.0.0/24 192.168.0.0/24 400 : 500 0 : 65535 6/0xff > > Then run the test again, the packet matches the third rule as expected. > > > This seems really weird to me. Anyone has an explanation for that? Indeed, that looks like a bug. Will have a look. Konstantin > > thanks > -Zi
[dpdk-dev] [PATCH 5/5] ixgbe: silence noisy log messages
The ixgbe driver likes to be far to chatty in the system log which is good for the original developer but not good for a production product. All the normal messages should be changed from INFO to DEBUG. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 14 +++--- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 20 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 7e75382..bb24a17 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -568,7 +568,7 @@ ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev, (hw->mac.type != ixgbe_mac_X550EM_x)) return -ENOSYS; - PMD_INIT_LOG(INFO, "Setting port %u, %s queue_id %d to stat index %d", + PMD_INIT_LOG(DEBUG, "Setting port %u, %s queue_id %d to stat index %d", eth_dev->data->port_id, is_rx ? "RX" : "TX", queue_id, stat_idx); @@ -594,20 +594,20 @@ ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev, else stat_mappings->rqsmr[n] |= qsmr_mask; - PMD_INIT_LOG(INFO, "Set port %u, %s queue_id %d to stat index %d", + PMD_INIT_LOG(DEBUG, "Set port %u, %s queue_id %d to stat index %d", eth_dev->data->port_id, is_rx ? "RX" : "TX", queue_id, stat_idx); - PMD_INIT_LOG(INFO, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n, + PMD_INIT_LOG(DEBUG, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n, is_rx ? stat_mappings->rqsmr[n] : stat_mappings->tqsm[n]); /* Now write the mapping in the appropriate register */ if (is_rx) { - PMD_INIT_LOG(INFO, "Write 0x%x to RX IXGBE stat mapping reg:%d", + PMD_INIT_LOG(DEBUG, "Write 0x%x to RX IXGBE stat mapping reg:%d", stat_mappings->rqsmr[n], n); IXGBE_WRITE_REG(hw, IXGBE_RQSMR(n), stat_mappings->rqsmr[n]); } else { - PMD_INIT_LOG(INFO, "Write 0x%x to TX IXGBE stat mapping reg:%d", + PMD_INIT_LOG(DEBUG, "Write 0x%x to TX IXGBE stat mapping reg:%d", stat_mappings->tqsm[n], n); IXGBE_WRITE_REG(hw, IXGBE_TQSM(n), stat_mappings->tqsm[n]); } @@ -751,7 +751,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) ixgbe_set_tx_function(eth_dev, txq); } else { /* Use default TX function if we get here */ - PMD_INIT_LOG(INFO, "No TX queues configured yet. " + PMD_INIT_LOG(DEBUG, "No TX queues configured yet. " "Using default TX function."); } @@ -2275,7 +2275,7 @@ ixgbe_dev_interrupt_get_status(struct rte_eth_dev *dev) /* read-on-clear nic registers here */ eicr = IXGBE_READ_REG(hw, IXGBE_EICR); - PMD_DRV_LOG(INFO, "eicr %x", eicr); + PMD_DRV_LOG(DEBUG, "eicr %x", eicr); intr->flags = 0; if (eicr & IXGBE_EICR_LSC) { diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index 57c9430..08830bf 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1871,23 +1871,23 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq) /* Use a simple Tx queue (no offloads, no multi segs) if possible */ if (((txq->txq_flags & IXGBE_SIMPLE_FLAGS) == IXGBE_SIMPLE_FLAGS) && (txq->tx_rs_thresh >= RTE_PMD_IXGBE_TX_MAX_BURST)) { - PMD_INIT_LOG(INFO, "Using simple tx code path"); + PMD_INIT_LOG(DEBUG, "Using simple tx code path"); #ifdef RTE_IXGBE_INC_VECTOR if (txq->tx_rs_thresh <= RTE_IXGBE_TX_MAX_FREE_BUF_SZ && (rte_eal_process_type() != RTE_PROC_PRIMARY || ixgbe_txq_vec_setup(txq) == 0)) { - PMD_INIT_LOG(INFO, "Vector tx enabled."); + PMD_INIT_LOG(DEBUG, "Vector tx enabled."); dev->tx_pkt_burst = ixgbe_xmit_pkts_vec; } else #endif dev->tx_pkt_burst = ixgbe_xmit_pkts_simple; } else { - PMD_INIT_LOG(INFO, "Using full-featured tx code path"); - PMD_INIT_LOG(INFO, + PMD_INIT_LOG(DEBUG, "Using full-featured tx code path"); + PMD_INIT_LOG(DEBUG, " - txq_flags = %lx " "[IXGBE_SIMPLE_FLAGS=%lx]", (unsigned long)txq->txq_flags, (unsigned long)IXGBE_SIMPLE_FLAGS); - PMD_INIT_LOG(INFO, + PMD_INIT_LOG(DEBUG, " - tx_rs_thresh = %lu " "[RTE_PMD_IXG
[dpdk-dev] [PATCH 4/5] ixgbe: use RTE_LOG not rte_log
This driver should follow standard DPDK practice and use RTE_LOG macro which allows setting config option to remove the debug log messages. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_ixgbe/ixgbe_logs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_logs.h b/lib/librte_pmd_ixgbe/ixgbe_logs.h index 572e030..53ba42d 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_logs.h +++ b/lib/librte_pmd_ixgbe/ixgbe_logs.h @@ -35,8 +35,7 @@ #define _IXGBE_LOGS_H_ #define PMD_INIT_LOG(level, fmt, args...) \ - rte_log(RTE_LOG_ ## level, RTE_LOGTYPE_PMD, \ - "PMD: %s(): " fmt "\n", __func__, ##args) + RTE_LOG(level, PMD, "%s(): " fmt "\n", __func__, ##args) #ifdef RTE_LIBRTE_IXGBE_DEBUG_INIT #define PMD_INIT_FUNC_TRACE() PMD_INIT_LOG(DEBUG, " >>") -- 2.1.4
[dpdk-dev] [PATCH 3/5] ixgbe: raise priority of significant events
The driver does lots of logging at INFO level, but some setup events are significant and should be at NOTICE or ERR level since they are problems that user should see. Also never put tabs in log messages because they get mangled by syslog processing. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index fa335f4..7e75382 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -1054,8 +1054,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev) eth_dev->data->mac_addrs = NULL; return diag; } - PMD_INIT_LOG(INFO, "\tVF MAC address not assigned by Host PF"); - PMD_INIT_LOG(INFO, "\tAssign randomly generated MAC address " + PMD_INIT_LOG(NOTICE, "VF MAC address not assigned by Host PF"); + PMD_INIT_LOG(NOTICE, "Assign randomly generated MAC address " "%02x:%02x:%02x:%02x:%02x:%02x", perm_addr->addr_bytes[0], perm_addr->addr_bytes[1], @@ -1248,7 +1248,7 @@ ixgbe_vlan_hw_strip_disable(struct rte_eth_dev *dev, uint16_t queue) if (hw->mac.type == ixgbe_mac_82598EB) { /* No queue level support */ - PMD_INIT_LOG(INFO, "82598EB not support queue level hw strip"); + PMD_INIT_LOG(ERR, "82598EB not support queue level hw strip"); return; } else { @@ -1272,7 +1272,7 @@ ixgbe_vlan_hw_strip_enable(struct rte_eth_dev *dev, uint16_t queue) if (hw->mac.type == ixgbe_mac_82598EB) { /* No queue level supported */ - PMD_INIT_LOG(INFO, "82598EB not support queue level hw strip"); + PMD_INIT_LOG(ERR, "82598EB not support queue level hw strip"); return; } else { @@ -2951,12 +2951,12 @@ ixgbevf_dev_configure(struct rte_eth_dev *dev) */ #ifndef RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC if (!conf->rxmode.hw_strip_crc) { - PMD_INIT_LOG(INFO, "VF can't disable HW CRC Strip"); + PMD_INIT_LOG(NOTICE, "VF can't disable HW CRC Strip"); conf->rxmode.hw_strip_crc = 1; } #else if (conf->rxmode.hw_strip_crc) { - PMD_INIT_LOG(INFO, "VF can't enable HW CRC Strip"); + PMD_INIT_LOG(NOTICE, "VF can't enable HW CRC Strip"); conf->rxmode.hw_strip_crc = 0; } #endif -- 2.1.4
[dpdk-dev] [PATCH 2/5] ixgbe: don't print PCI address on link change
Printing PCI information on link state change is unnecessary since the same information has already been displayed earlier in the log. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 5 - 1 file changed, 5 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index a585151..fa335f4 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -2315,11 +2315,6 @@ ixgbe_dev_link_status_print(struct rte_eth_dev *dev) PMD_INIT_LOG(INFO, "Port %u: Link Down", dev->data->port_id); } - PMD_INIT_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d", - dev->pci_dev->addr.domain, - dev->pci_dev->addr.bus, - dev->pci_dev->addr.devid, - dev->pci_dev->addr.function); } /* -- 2.1.4
[dpdk-dev] [PATCH 1/5] ixgbe: remove unnecessary casts
Don't do unnecessary casts when logging messages. Better to use the correct printf format code. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 5f9a1cf..a585151 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -568,8 +568,8 @@ ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev, (hw->mac.type != ixgbe_mac_X550EM_x)) return -ENOSYS; - PMD_INIT_LOG(INFO, "Setting port %d, %s queue_id %d to stat index %d", -(int)(eth_dev->data->port_id), is_rx ? "RX" : "TX", + PMD_INIT_LOG(INFO, "Setting port %u, %s queue_id %d to stat index %d", +eth_dev->data->port_id, is_rx ? "RX" : "TX", queue_id, stat_idx); n = (uint8_t)(queue_id / NB_QMAP_FIELDS_PER_QSM_REG); @@ -594,8 +594,8 @@ ixgbe_dev_queue_stats_mapping_set(struct rte_eth_dev *eth_dev, else stat_mappings->rqsmr[n] |= qsmr_mask; - PMD_INIT_LOG(INFO, "Set port %d, %s queue_id %d to stat index %d", -(int)(eth_dev->data->port_id), is_rx ? "RX" : "TX", + PMD_INIT_LOG(INFO, "Set port %u, %s queue_id %d to stat index %d", +eth_dev->data->port_id, is_rx ? "RX" : "TX", queue_id, stat_idx); PMD_INIT_LOG(INFO, "%s[%d] = 0x%08x", is_rx ? "RQSMR" : "TQSM", n, is_rx ? stat_mappings->rqsmr[n] : stat_mappings->tqsm[n]); @@ -889,11 +889,11 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev) if (ixgbe_is_sfp(hw) && hw->phy.sfp_type != ixgbe_sfp_type_not_present) PMD_INIT_LOG(DEBUG, "MAC: %d, PHY: %d, SFP+: %d", -(int) hw->mac.type, (int) hw->phy.type, -(int) hw->phy.sfp_type); +hw->mac.type, hw->phy.type, +hw->phy.sfp_type); else PMD_INIT_LOG(DEBUG, "MAC: %d, PHY: %d", -(int) hw->mac.type, (int) hw->phy.type); +hw->mac.type, hw->phy.type); PMD_INIT_LOG(DEBUG, "port %d vendorID=0x%x deviceID=0x%x", eth_dev->data->port_id, pci_dev->id.vendor_id, @@ -2307,14 +2307,13 @@ ixgbe_dev_link_status_print(struct rte_eth_dev *dev) memset(&link, 0, sizeof(link)); rte_ixgbe_dev_atomic_read_link_status(dev, &link); if (link.link_status) { - PMD_INIT_LOG(INFO, "Port %d: Link Up - speed %u Mbps - %s", - (int)(dev->data->port_id), - (unsigned)link.link_speed, - link.link_duplex == ETH_LINK_FULL_DUPLEX ? + PMD_INIT_LOG(INFO, "Port %u: Link Up - speed %u Mbps - %s", +dev->data->port_id, link.link_speed, +link.link_duplex == ETH_LINK_FULL_DUPLEX ? "full-duplex" : "half-duplex"); } else { - PMD_INIT_LOG(INFO, " Port %d: Link Down", - (int)(dev->data->port_id)); + PMD_INIT_LOG(INFO, "Port %u: Link Down", + dev->data->port_id); } PMD_INIT_LOG(INFO, "PCI Address: %04d:%02d:%02d:%d", dev->pci_dev->addr.domain, -- 2.1.4
[dpdk-dev] [PATCH v2 0/5] ixgbe: logging patches
This set of patches is breakout of earlier set of patches to get rid of the log spam from ixgbe driver. Stephen Hemminger (5): ixgbe: remove unnecessary casts ixgbe: don't print PCI address on link change ixgbe: raise priority of significant events ixgbe: use RTE_LOG not rte_log ixgbe: silence noisy log messages lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 54 + lib/librte_pmd_ixgbe/ixgbe_logs.h | 3 +-- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 20 +++--- 3 files changed, 35 insertions(+), 42 deletions(-) -- 2.1.4
[dpdk-dev] performance issue with ovs + dpdk2.0 with vhost
On 5/15/15 9:55 AM, Rao, Ravi wrote: > Hi All, > I am trying to get a Guest VM connected to the dpdkvhost interface on a > host which has the ovs running from the latest ovs git and dpdk2.0. Looks > like I am missing something as 95% of traffic is not getting to the VM. Can > one of you please let me know which mailing list I should be posting the > details for getting a resolution. Is it this dpdk list OR would it be the > openvswitch list? You could also try the openvswitch discuss list but this list is a good starting point. I am working with vhost/dpdk2.0 and ovs and others are too. Could you please send more details about what you are seeing? > Regards, > Ravi.. -- Thomas F. Herbert
[dpdk-dev] [PATCH] eal devargs: don't call rte_log when not initialized
This problem was discovered when passing invalid PCI id to the blacklist API in devargs. Any failures in rte_devargs_add would cause a core dump because it would call rte_log() before the the EAL log environment was initailized. Rather than try and log just remove the messages and leave it up to the caller to check the return value. Most of the other failure possibilities are when malloc() fails, and if that happens any logging that used malloc() would also fail. This failure was not caught by the standalone tests to devargs because the tests are run after calling rte_eal_init (which is not how devargs is intended to be used). Signed-off-by: Stephen Hemminger --- lib/librte_eal/common/eal_common_devargs.c | 30 +- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c index 615945e..ec56165 100644 --- a/lib/librte_eal/common/eal_common_devargs.c +++ b/lib/librte_eal/common/eal_common_devargs.c @@ -31,11 +31,15 @@ */ /* This file manages the list of devices and their arguments, as given - * by the user at startup */ + * by the user at startup + * + * Code here should not call rte_log since the EAL environment + * may not be initialized. + */ +#include #include -#include #include #include #include "eal_private.h" @@ -54,11 +58,8 @@ rte_eal_parse_devargs_str(const char *devargs_str, return -1; *drvname = strdup(devargs_str); - if (drvname == NULL) { - RTE_LOG(ERR, EAL, - "cannot allocate temp memory for driver name\n"); + if (drvname == NULL) return -1; - } /* set the first ',' to '\0' to split name and arguments */ sep = strchr(*drvname, ','); @@ -70,8 +71,6 @@ rte_eal_parse_devargs_str(const char *devargs_str, } if (*drvargs == NULL) { - RTE_LOG(ERR, EAL, - "cannot allocate temp memory for driver arguments\n"); free(*drvname); return -1; } @@ -88,10 +87,9 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str) /* use malloc instead of rte_malloc as it's called early at init */ devargs = malloc(sizeof(*devargs)); - if (devargs == NULL) { - RTE_LOG(ERR, EAL, "cannot allocate devargs\n"); + if (devargs == NULL) goto fail; - } + memset(devargs, 0, sizeof(*devargs)); devargs->type = devtype; @@ -103,19 +101,17 @@ rte_eal_devargs_add(enum rte_devtype devtype, const char *devargs_str) case RTE_DEVTYPE_BLACKLISTED_PCI: /* try to parse pci identifier */ if (eal_parse_pci_BDF(buf, &devargs->pci.addr) != 0 && - eal_parse_pci_DomBDF(buf, &devargs->pci.addr) != 0) { - RTE_LOG(ERR, EAL, "invalid PCI identifier <%s>\n", buf); + eal_parse_pci_DomBDF(buf, &devargs->pci.addr) != 0) goto fail; - } + break; case RTE_DEVTYPE_VIRTUAL: /* save driver name */ ret = snprintf(devargs->virtual.drv_name, sizeof(devargs->virtual.drv_name), "%s", buf); - if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name)) { - RTE_LOG(ERR, EAL, "driver name too large: <%s>\n", buf); + if (ret < 0 || ret >= (int)sizeof(devargs->virtual.drv_name)) goto fail; - } + break; } -- 2.1.4
[dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI Pass-Through (SR-IOV)?
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > Sent: Friday, May 15, 2015 10:27 AM > To: Stephen Hemminger > Cc: dev at dpdk.org; Assaad, Sami (Sami) > Subject: Re: [dpdk-dev] How do you setup a VM in Promiscuous Mode using PCI > Pass-Through (SR-IOV)? > > On Thu, May 14, 2015 at 04:47:19PM -0700, Stephen Hemminger wrote: > > On Thu, 14 May 2015 21:38:24 + > > "Assaad, Sami (Sami)" wrote: > > > > > Hello, > > > > > > My Hardware consists of the following: > > > - DL380 Gen 9 Server supporting two Haswell Processors (Xeon CPU > > > E5-2680 v3 @ 2.50GHz) > > > - An x540 Ethernet Controller Card supporting 2x10G ports. > > > > > > Software: > > > - CentOS 7 (3.10.0-229.1.2.el7.x86_64) > > > - DPDK 1.8 > > > > > > I want all the network traffic received on the two 10G ports to be > > > transmitted to my VM. The issue is that the Virtual Function / > Physical Functions have setup the internal virtual switch to only route > Ethernet packets with destination MAC address matching the > VM virtual interface MAC. How can I configure my virtual environment to > provide all network traffic to the VM...i.e. set the virtual > functions for both PCI devices in Promiscuous mode? > > > > > > [ If a l2fwd-vf example exists, this would actually solve this problem > > > ... Is there a DPDK l2fwd-vf example available? ] > > > > > > > > > Thanks in advance. > > > > > > Best Regards, > > > Sami Assaad. > > > > This is a host side (not DPDK) issue. > > > > Intel PF driver will not allow guest (VF) to go into promiscious mode > > since it would allow traffic stealing which is a security violation. > > Could you maybe try passing the PF directly into the VM, rather than a VF > based > off it? Since you seem to want all traffic to go to the one VM, there seems > little > point in creating a VF on the device, and should let the VM control the whole > NIC directly. As I remember, with ixgbe it is possible to make one VF a mirror (receive a copy of all traffic). Konstantin > > Regards, > /Bruce
[dpdk-dev] [PATCH 00/10] Add a VXLAN sample
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Jijiang Liu > Sent: Friday, May 15, 2015 7:09 AM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH 00/10] Add a VXLAN sample Hi, There are multiple changes on the same (new) files within the patchset. These would be better rebased/squashed into one patch. That would make it easier to review as well. John