[dpdk-dev] Appropriate DPDK data structures for TCP sockets

2015-02-23 Thread Avi Kivity
On 02/23/2015 11:16 PM, Matthew Hall wrote: > On Mon, Feb 23, 2015 at 08:48:57AM -0600, Matt Laswell wrote: >> Apologies in advance for likely being a bit long-winded. > Long winded is great, helps me get context. > >> First, you really need to take cache performance into account when you're >> cho

[dpdk-dev] [PATCH v2] eal/linux: allow to map BARs with MSI-X tables, around them

2015-02-23 Thread Thomas Monjalon
> > While VFIO doesn't allow us to map complete BARs with MSI-X tables, > > it does allow us to map around them in PAGE_SIZE granularity. There > > might be adapters that provide their registers in the same BAR > > but on a different page. For example, Intel's NVME adapter, though > > not a network

[dpdk-dev] [PATCH v12] testpmd: Add port hotplug support

2015-02-23 Thread Tetsuya Mukawa
The patch introduces following commands. - port attach [ident] - port detach [port_id] - attach: attaching a port - detach: detaching a port - ident: pci address of physical device. Or device name and parameters of virtual device. (ex. :02:00.0, eth_pcap0,iface=eth0) - po

[dpdk-dev] [PATCH v12] librte_pmd_pcap: Add port hotplug support

2015-02-23 Thread Tetsuya Mukawa
This patch adds finalization code to free resources allocated by the PMD. v6: - Fix a paramter of rte_eth_dev_free(). v4: - Change function name. Signed-off-by: Tetsuya Mukawa --- lib/librte_pmd_pcap/rte_eth_pcap.c | 40 ++ 1 file changed, 40 insertions(+)

[dpdk-dev] [PATCH v12 13/13] doc: Add port hotplug framework section to programmers guide

2015-02-23 Thread Tetsuya Mukawa
This patch adds a new section for describing port hotplug framework. Signed-off-by: Tetsuya Mukawa --- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/port_hotplug_framework.rst | 110 +++ 2 files changed, 111 insertions(+) create mode 100644

[dpdk-dev] [PATCH v12 12/13] eal/pci: Add rte_eal_dev_attach/detach() functions

2015-02-23 Thread Tetsuya Mukawa
These functions are used for attaching or detaching a port. When rte_eal_dev_attach() is called, the function tries to realize the device name as pci address. If this is done successfully, rte_eal_dev_attach() will attach physical device port. If not, attaches virtual devive port. When rte_eal_dev_

[dpdk-dev] [PATCH v12 11/13] ethdev: Add one dev_type parameter to rte_eth_dev_allocate

2015-02-23 Thread Tetsuya Mukawa
This new parameter is needed to keep device type like PCI or virtual. Port detaching processes are different between PCI device and virtual device. RTE_ETH_DEV_PCI indicates device type is PCI. RTE_ETH_DEV_VIRTUAL indicates device is virtual. v12: - Add missing symbol in version map. (Thanks to

[dpdk-dev] [PATCH v12 10/13] eal/pci: Add probe and close functions of pci driver

2015-02-23 Thread Tetsuya Mukawa
- Add pci_close_all_drivers() The function tries to find a driver for the specified device, and then close the driver. - Add rte_eal_pci_probe_one() and rte_eal_pci_close_one() The functions are used for probe and close a device. First the function tries to find a device that has the specif

[dpdk-dev] [PATCH v12 09/13] eal/linux/pci: Add functions for unmapping igb_uio resources

2015-02-23 Thread Tetsuya Mukawa
The patch adds functions for unmapping igb_uio resources. The patch is only for Linux and igb_uio environment. VFIO and BSD are not supported. v9: - Remove "rte_dev_hotplug.h". - Remove needless "#ifdef". (Thanks to Thomas Monjalon and Neil Horman) - Remove pci_unmap_device(). It will be impleme

[dpdk-dev] [PATCH v12 08/13] ethdev: Add functions that will be used by port hotplug functions

2015-02-23 Thread Tetsuya Mukawa
The patch adds following functions. - rte_eth_dev_save() The function is used for saving current rte_eth_dev structures. - rte_eth_dev_get_changed_port() The function receives the rte_eth_dev structures, then compare these with current values to know which port is actually attached or deta

[dpdk-dev] [PATCH v12 07/13] eal, ethdev: Add a function and function pointers to close ether device

2015-02-23 Thread Tetsuya Mukawa
The patch adds function pointer to rte_pci_driver and eth_driver structure. These function pointers are used when ports are detached. Also, the patch adds rte_eth_dev_uninit(). So far, it's not called by anywhere, but it will be called when port hotplug function is implemented. v10: - Add size par

[dpdk-dev] [PATCH v12 06/13] ethdev: Add rte_eth_dev_release_port to release specified port

2015-02-23 Thread Tetsuya Mukawa
This patch adds rte_eth_dev_release_port(). The function is used for changing an attached status of the device that has specified name. v9: - rte_eth_dev_free() is replaced by rte_eth_dev_release_port(). (Thanks to Thomas Monjalon) v6: - Use rte_eth_dev structure as the paramter of rte_eth_dev_f

[dpdk-dev] [PATCH v12 05/13] eal/pci: Consolidate pci address comparison APIs

2015-02-23 Thread Tetsuya Mukawa
This patch replaces pci_addr_comparison() and memcmp() of pci addresses by rte_eal_compare_pci_addr(). To compare PCI addresses, rte_eal_compare_pci_addr() doesn't use memcmp(). This is because sizeof(struct rte_pci_addr) returns 6, but actually this structure is like below. struct rte_pci_addr {

[dpdk-dev] [PATCH v12 04/13] eal/pci, ethdev: Remove assumption that port will not be detached

2015-02-23 Thread Tetsuya Mukawa
To remove assumption, do like followings. This patch adds "RTE_PCI_DRV_DETACHABLE" to drv_flags of rte_pci_driver structure. The flags indicate the driver can detach devices at runtime. Also, remove assumption that port will not be detached. To remove the assumption. - Add 'attached' member to rt

[dpdk-dev] [PATCH v12 03/13] eal_pci: pci memory map work with driver type

2015-02-23 Thread Tetsuya Mukawa
From: Michael Qiu With the driver type flag in struct rte_pci_dev, we do not need to always map uio devices with vfio related function when vfio enabled. Signed-off-by: Michael Qiu Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci.c | 30 +- 1

[dpdk-dev] [PATCH v12 02/13] eal_pci: Add flag to hold kernel driver type

2015-02-23 Thread Tetsuya Mukawa
From: Michael Qiu Currently, dpdk has no ability to know which type of driver( vfio-pci/igb_uio/uio_pci_generic) the device used. It only can check whether vfio is enabled or not staticly. It really useful to have the flag, becasue different type need to handle differently in runtime. For exampl

[dpdk-dev] [PATCH v12 01/13] eal: Enable port Hotplug framework in Linux

2015-02-23 Thread Tetsuya Mukawa
The patch adds CONFIG_RTE_LIBRTE_EAL_HOTPLUG in Linux and BSD configuration. So far, Hotplug functions only support linux. v9: - Move this patch at the top of this patch series. (Thanks to Thomas Monjalon) Signed-off-by: Tetsuya Mukawa --- config/common_bsdapp | 6 ++ config/common_linu

[dpdk-dev] [PATCH v12 00/13] Port Hotplug Framework

2015-02-23 Thread Tetsuya Mukawa
This patch series adds a dynamic port hotplug framework to DPDK. With the patches, DPDK apps can attach or detach ports at runtime. The basic concept of the port hotplug is like followings. - DPDK apps must have responsibility to manage ports. DPDK apps only know which ports are attached or deta

[dpdk-dev] [PATCH v11 08/13] ethdev: Add functions that will be used by port hotplug functions

2015-02-23 Thread Tetsuya Mukawa
On 2015/02/23 20:39, Iremonger, Bernard wrote: the pointer diff --git a/lib/librte_ether/rte_ether_version.map b/lib/librte_ether/rte_ether_version.map index f66fd2d..099c769 100644 --- a/lib/librte_ether/rte_ether_version.map +++ b/lib/librte_ether/rte_ether_version.map >>

[dpdk-dev] Testpmd returns error.

2015-02-23 Thread Tetsuya Mukawa
On 2015/02/23 20:12, Bruce Richardson wrote: > On Mon, Feb 23, 2015 at 11:33:45AM +0900, Tetsuya Mukawa wrote: >> On 2015/02/23 5:46, Bruce Richardson wrote: >>> On Sun, Feb 22, 2015 at 02:30:02PM +0900, Tetsuya Mukawa wrote: Hi, In my environment, testpmd in latest master branch ret

[dpdk-dev] [PATCH v11 08/13] ethdev: Add functions that will be used by port hotplug functions

2015-02-23 Thread Tetsuya Mukawa
On 2015/02/23 20:01, Iremonger, Bernard wrote: >> -Original Message- >> From: Tetsuya Mukawa [mailto:mukawa at igel.co.jp] >> Sent: Monday, February 23, 2015 5:09 AM >> To: dev at dpdk.org >> Cc: Qiu, Michael; Iremonger, Bernard; maxime.leroy at 6wind.com; Tetsuya >> Mukawa >> Subject: [PA

[dpdk-dev] [PATCH v2 0/2] Removal of RTE_MBUF_REFCNT

2015-02-23 Thread Thomas Monjalon
> > This patch tries to remove the RTE_MBUF_REFCNT config options and > > dependencies > > by introducing a new mbuf flag IND_ATTACHED_MBUF that would indicate when > > the mbuf > > is an indirect attached mbuf, to differentiate between indirect mbufs and > > mbufs > > with external memory buffe

[dpdk-dev] [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT configuration option

2015-02-23 Thread Thomas Monjalon
2015-02-17 01:21, Zhang, Helin: > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Marc Sune > > This patch introduces CONFIG_RTE_KNI_PREEMPT_DEFAULT flag. When set to > > 'no', KNI kernel thread(s) do not call schedule_timeout_interruptible(), > > which > > improves overall KNI performance

[dpdk-dev] [PATCH v6 0/7] rte_hash_crc reworked to be platform-independent

2015-02-23 Thread Thomas Monjalon
2015-02-19 15:21, Bruce Richardson: > Confirmed, this worked for me too. > Looking at the patches, they look good. However, one thing I think we are > missing > is a unit test to verify that all our CRC implementations give the same > result. > That would be useful as a sanity check of the softwa

[dpdk-dev] [PATCH v6 3/3] examples: example showing use of callbacks.

2015-02-23 Thread John McNamara
From: Richardson, Bruce Example showing how callbacks can be used to insert a timestamp into each packet on RX. On TX the timestamp is used to calculate the packet latency through the app, in cycles. Signed-off-by: Bruce Richardson Signed-off-by: John McNamara --- MAINTAINERS

[dpdk-dev] [PATCH v6 2/3] ethdev: add optional rxtx callback support

2015-02-23 Thread John McNamara
From: Richardson, Bruce Add optional support for inline processing of packets inside the RX or TX call. For an RX callback, what happens is that we get a set of packets from the NIC and then pass them to a callback function, if configured, to allow additional processing to be done on them, e.g. f

[dpdk-dev] [PATCH v6 1/3] ethdev: rename callbacks field to link_intr_cbs

2015-02-23 Thread John McNamara
From: Richardson, Bruce The 'callbacks' member of the rte_eth_dev structure has been renamed to 'link_intr_cbs' to make it clear that it refers to callbacks from NIC interrupts. This allows us to add other types of callbacks to the structure without ambiguity. Signed-off-by: Bruce Richardson Si

[dpdk-dev] [PATCH v6 0/3] DPDK ethdev callback support

2015-02-23 Thread John McNamara
This patchset is for a small optional addition to the ethdev library, to add support for callbacks at the RX and TX stages. This allows packet processing to be done on packets before they get returned to applications using rte_eth_rx_burst call. See the RFC cover letter for the use cases: htt

[dpdk-dev] [PATCH 1/2] enic: replace use of printf with log

2015-02-23 Thread David Marchand
On Sat, Feb 14, 2015 at 5:28 PM, Neil Horman wrote: > On Sat, Feb 14, 2015 at 10:32:58AM -0500, Stephen Hemminger wrote: > > Device driver should log via DPDK log, not to printf which is > > sends to /dev/null in a daemon application. > > > > Signed-off-by: Stephen Hemminger > > --- > > lib/lib

[dpdk-dev] [PATCH v3 11/11] lib/librte_vhost: support dynamically registering vhost server

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" * support calling rte_vhost_driver_register after rte_vhost_driver_session_start * add mutext to protect fdset from concurrent access * add busy flag in fdentry. this flag is set before cb and cleared after cb is finished. mutex lock scenario in vhost: * event_dispatch(in r

[dpdk-dev] [PATCH v3 10/11] lib/librte_vhost: support dev->ifname for vhost-user

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" for vhost-cuse, ifname is the name of the tap device for vhost-user, ifname is the name of the unix domain socket path Signed-off-by: Huawei Xie Signed-off-by: Przemyslaw Czesnowicz --- lib/librte_vhost/Makefile | 2 +- lib/librte_vhost/rte_virtio_net.

[dpdk-dev] [PATCH v3 09/11] lib/librte_vhost: vhost user support

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" In rte_vhost_driver_register(), vhost unix domain socket listener fd is created and added to polled(based on select) fdset. In rte_vhost_driver_session_start(), fds in the fdset are checked for processing. If there is new connection from qemu, connection fd accepted is added

[dpdk-dev] [PATCH v3 08/11] lib/librte_vhost: add select based event driven processing

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" for more generic event driven processing, refer to: http://libevent.org/ Signed-off-by: Huawei Xie Acked-by: Konstantin Ananyev --- lib/librte_vhost/vhost_user/fd_man.c | 207 +++ lib/librte_vhost/vhost_user/fd_man.h | 64 ++

[dpdk-dev] [PATCH v3 07/11] lib/librte_vhost: implement cuse_set_memory_table

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" remove set_memory_table ops vhost-cuse or vhost-user will both implement their own set_memory_region handler. In current vhost-cuse implementation, guest numa memory isn't supported. Assume that guest memory is backed by only one file. Signed-off-by: Huawei Xie Signed-off

[dpdk-dev] [PATCH v3 06/11] lib/librte_vhost: make host_memory_map a more generic function.

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" This functions accepts a virtual address and pid(qemu), and maps it into current process(vhost)'s address space. The memory behind the virtual address should be backed by a file, and virtual address should be the starting address. Signed-off-by: Huawei Xie --- lib/librte_v

[dpdk-dev] [PATCH v3 05/11] lib/librte_vhost: copy host_memory_map from virtio-net.c to a new file virtio-net-cdev.c

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 257 ++ 1 file changed, 257 insertions(+) create mode 100644 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c diff --git a/lib/librte_vhost/vhost_cuse/virtio-net-cdev.c b/li

[dpdk-dev] [PATCH v3 04/11] lib/librte_vhost: move fd copying(from qemu process into vhost process) to eventfd_copy.c

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" vhost-user doesn't need eventfd kernel module to copy fds between processes. Signed-off-by: Huawei Xie Signed-off-by: Przemyslaw Czesnowicz --- lib/librte_vhost/Makefile| 2 +- lib/librte_vhost/vhost_cuse/eventfd_copy.c | 88 +

[dpdk-dev] [PATCH v3 03/11] lib/librte_vhost: rename vhost-net-cdev.h to vhost-net.h

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" This file defines common operations provided by virtio-net(.c). Signed-off-by: Huawei Xie --- lib/librte_vhost/vhost-net-cdev.h| 113 --- lib/librte_vhost/vhost-net.h | 113 +++ lib/librte_vhost/vho

[dpdk-dev] [PATCH v3 02/11] lib/librte_vhost: create vhost_cuse directory and move vhost-net-cdev.c into vhost_cuse

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" vhost-cuse driver will be divided into two parts: cuse driver specific message handling(in cuse directory) and common message handling(in virtio-net.c). vhost ioctl message is pre-processed in cuse and then sent to virtio-net if is not terminated. virtio-net.c provides commo

[dpdk-dev] [PATCH v3 01/11] lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver in guest would crash with only CTRL

2015-02-23 Thread Przemyslaw Czesnowicz
From: "Xie, Huawei" In virtnet_send_command: /* Caller should know better */ BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ) || (out + in > VIRTNET_SEND_COMMAND_SG_MAX)); Signed-off-by: Huawei Xie --- lib/librte_vhost/virtio-net.c | 3 ++- 1 file cha

[dpdk-dev] [PATCH v3 00/11] qemu vhost-user support

2015-02-23 Thread Przemyslaw Czesnowicz
v3 changes: * move things around to make all patches compile Xie, Huawei (11): lib/librte_vhost: enable VIRTIO_NET_F_CTRL_RX VIRTIO_NET_F_CTRL_RX is dependant on VIRTIO_NET_F_CTRL_VQ. Observed that virtio-net driver in guest would crash with only CTRL_RX enabled. lib/librte_vhost: c

[dpdk-dev] [PATCH v5 2/3] ethdev: add optional rxtx callback support

2015-02-23 Thread Mcnamara, John
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 3:12 PM > To: Mcnamara, John > Cc: dev at dpdk.org; Richardson, Bruce; nhorman at tuxdriver.com; > stephen at networkplumber.org; Doherty, Declan > Subject: Re: [PATCH v5 2/3

[dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt enable/disable functions

2015-02-23 Thread Zhou, Danny
> -Original Message- > From: Stephen Hemminger [mailto:stephen at networkplumber.org] > Sent: Tuesday, February 24, 2015 12:59 AM > To: Zhou, Danny > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v5 1/6] ethdev: add rx interrupt > enable/disable functions > > On Tue, 24 Feb 2015 0

[dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application

2015-02-23 Thread Thomas Monjalon
2015-02-23 15:55, Jastrzebski, MichalX K: > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > 2015-02-23 14:36, Jastrzebski, MichalX K: > > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > > > 2015-02-20 15:46, Jastrzebski, MichalX K: > > > > > From: dev [mailto:dev-b

[dpdk-dev] [PATCH v2 2/2] eal: populate uio_maps from pci mem_resources array

2015-02-23 Thread Bruce Richardson
Rather than scanning the resource file in sysfs a second time, we can pull the information on physical addresses of BARs from the pci resource information already present in the dev structure. Signed-off-by: Bruce Richardson --- lib/librte_eal/linuxapp/eal/eal_pci_uio.c | 163 +++

[dpdk-dev] [PATCH v2 1/2] eal: mmap uio resources using resourceX files

2015-02-23 Thread Bruce Richardson
Instead of distinguishing the BAR mappings via offset within a single file, originally /dev/uioX, switch to mapping each individual bar via the appropriately numbered resourceX file. Signed-off-by: Bruce Richardson --- lib/librte_eal/common/include/rte_pci.h| 2 +- lib/librte_eal/linuxapp/e

[dpdk-dev] [PATCH v2 0/2] fix and improve uio_pci_generic support

2015-02-23 Thread Bruce Richardson
This patch does some cleanup of the uio mapping code to a) fix issue with mmap of PCI bars reported by Tetsuya and confirmed by others. b) eliminate redundant code and reduce scans of /sys Bruce Richardson (2): eal: mmap uio resources using resourceX files eal: populate uio_maps from pci mem

[dpdk-dev] [PATCH v2] mk: Rework gcc version detection to permit versions newer than 4.x

2015-02-23 Thread Panu Matilainen
Separately comparing major and minor versions becomes seriously clumsy when with major version changes, convert the entire version string into a numeric value (ie 4.6.0 becomes 460 and 5.0.0 becomes 500) and use that for comparisons, eliminate unnecessary negations while at it. This makes the compa

[dpdk-dev] [PATCH] virtio: Add default_txconf

2015-02-23 Thread Takuya ASADA
When I tried to launch test-pmd on KVM guest of Fedora21, I got following error: Configuring Port 0 (socket 0) Fail to configure port 0 tx queues EAL: Error - exiting with code: 1 Cause: Start ports failed I found that the error caused here, and actual error message was "TX checksum offload no

[dpdk-dev] [PATCH v3 0/4] Support NVGRE on i40e

2015-02-23 Thread Thomas Monjalon
2015-02-20 17:01, Declan Doherty: > The patch set supports NVGRE on i40e. > > It includes: > - Support RX filters for NVGRE packet. It uses MAC and VLAN to point >to a queue. The filter types supported are listed below: > >1. Inner MAC and Inner VLAN ID > >2. Inner MAC address, inne

[dpdk-dev] [PATCH v3 1/3] eal: enable uio_pci_generic support

2015-02-23 Thread David Marchand
Hello, Ok this is coming too late, but anyway, my comments. On Fri, Feb 20, 2015 at 5:59 PM, Bruce Richardson < bruce.richardson at intel.com> wrote: [snip] diff --git a/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > b/lib/librte_eal/linuxapp/eal/eal_pci_uio.c > index 54cce08..2b16fcb 100644 > --

[dpdk-dev] [PATCH] Make -Werror optional

2015-02-23 Thread Panu Matilainen
On 02/23/2015 03:55 PM, Neil Horman wrote: > On Mon, Feb 23, 2015 at 10:19:23AM +0200, Panu Matilainen wrote: >> On 02/21/2015 09:33 PM, Neil Horman wrote: >>> On Fri, Feb 20, 2015 at 05:55:21PM -0800, Stephen Hemminger wrote: On Thu, 12 Feb 2015 16:54:44 +0200 Panu Matilainen wrote: >>>

[dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt handling based on VFIO

2015-02-23 Thread Thomas Monjalon
2015-02-23 15:02, Zhou, Danny: > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > 2015-02-23 11:47, Zhou, Danny: > > > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > > > 2015-02-19 21:48, Zhou Danny: > > > > > --- a/lib/librte_eal/linuxapp/eal/Makefile > > > > > +++

[dpdk-dev] [PATCH v5 2/3] ethdev: add optional rxtx callback support

2015-02-23 Thread Thomas Monjalon
Hi John, 2015-02-20 17:03, John McNamara: > From: Richardson, Bruce > > Add optional support for inline processing of packets inside the RX > or TX call. For an RX callback, what happens is that we get a set of > packets from the NIC and then pass them to a callback function, if > configured, to

[dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application

2015-02-23 Thread Jastrzebski, MichalX K
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 3:47 PM > To: Jastrzebski, MichalX K > Cc: Wodkowski, PawelX; dev at dpdk.org; Neil Horman > Subject: Re: [dpdk-dev] [PATCH v5 0/3] new headroom stats library and > example a

[dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application

2015-02-23 Thread Thomas Monjalon
2015-02-23 14:36, Jastrzebski, MichalX K: > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > 2015-02-20 15:46, Jastrzebski, MichalX K: > > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Neil Horman > > > > On Thu, Feb 19, 2015 at 01:18:41PM +0100, Pawel Wodkowski wrote: >

[dpdk-dev] [PATCH] eal: mmap uio resources using resourceX files

2015-02-23 Thread Iremonger, Bernard
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Bruce Richardson > Sent: Monday, February 23, 2015 3:00 PM > To: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] eal: mmap uio resources using resourceX files > > On Mon, Feb 23, 2015 at 02:57:24PM +, Br

[dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt handling based on VFIO

2015-02-23 Thread Zhou, Danny
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 11:19 PM > To: Zhou, Danny > Cc: Gonzalez Monroy, Sergio; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt > handling based on VFIO

[dpdk-dev] [PATCH v4 2/5] ixgbe: enable rx queue interrupts for both PF and VF

2015-02-23 Thread Zhou, Danny
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 9:20 PM > To: Zhou, Danny > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 2/5] ixgbe: enable rx queue interrupts for > both PF and VF > > 2015-02-23 11:23, Zhou,

[dpdk-dev] [PATCH 5/5] Fix usage of fgets in various places

2015-02-23 Thread Pawel Wodkowski
Declaration of fgets() is char *fgets(char *str, int size, FILE *stream); Klocwork complain about passing "sizeof()" as size parameter since implicit casting size_t to int might cause loss of precision. Signed-off-by: Pawel Wodkowski --- lib/librte_cfgfile/rte_cfgfile.c| 2 +-

[dpdk-dev] [PATCH 4/5] cmdline: make parse_set_list() use size_t instead of int for low/high parameter

2015-02-23 Thread Pawel Wodkowski
Fix warning reported by klocwork about size_t to int cast when passing parameters to parse_set_list(). This patch fix code formating errors that give checkpatch.pl errors after generating patch. Signed-off-by: Pawel Wodkowski --- lib/librte_cmdline/cmdline_parse_portlist.c | 4 ++-- 1 file chan

[dpdk-dev] [PATCH 3/5] pmd ring: fix possible memory leak during devinit

2015-02-23 Thread Pawel Wodkowski
Free kvlist on function exit to avoid memory leak. Signed-off-by: Pawel Wodkowski --- lib/librte_pmd_ring/rte_eth_ring.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index a23e933..582a621 10064

[dpdk-dev] [PATCH 2/5] librte_kvargs: make rte_kvargs_free() be consistent with other "free()" functions

2015-02-23 Thread Pawel Wodkowski
It is desired that all type of *_free() functions mimic behaviour of libc free() function. This function does nothing if given parameter is NULL. This patch add this behaviour for rte_kvargs_free(). Signed-off-by: Pawel Wodkowski --- lib/librte_kvargs/rte_kvargs.c | 4 lib/librte_kvargs/rte

[dpdk-dev] [PATCH 1/5] rte_timer: fix invalid declaration of rte_timer_cb_t

2015-02-23 Thread Pawel Wodkowski
Declaration for function pointer should be typedef ret_type (*type_name)(args...) not typedef ret_type (type_name)(args...) although compiler treat both of them the same, the static analysis tool like klocwork complain about that. Signed-off-by: Pawel Wodkowski --- lib/librte_timer/rte_timer.h

[dpdk-dev] [PATCH 0/5] Fix issues reported by static analysis tool

2015-02-23 Thread Pawel Wodkowski
Klockwork report some issues against current DPDK version. Most of them need only cosmetic code changes (changing type of variable or adding explicit cast). One issue related with ring pmd fix real memory leak problem. Pawel Wodkowski (5): rte_timer: fix invalid declaration of rte_timer_cb_t

[dpdk-dev] [PATCH v2 00/11] qemu vhost-user support

2015-02-23 Thread Thomas Monjalon
2015-02-23 13:53, Czesnowicz, Przemyslaw: > > I tried to locally applied the patches, waiting comments are closed. > > But I stopped after patch 04/11 which makes compilation failing. > > I'm so sorry that we still don't have a vhost-user support integrated in > > DPDK. > > I feel it won't be read

[dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt handling based on VFIO

2015-02-23 Thread Zhou, Danny
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 9:28 PM > To: Zhou, Danny > Cc: Gonzalez Monroy, Sergio; dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt > handling based on VFIO >

[dpdk-dev] [PATCH] eal: mmap uio resources using resourceX files

2015-02-23 Thread Bruce Richardson
On Mon, Feb 23, 2015 at 02:57:24PM +, Bruce Richardson wrote: > Instead of distinguishing the BAR mappings via offset within a single > file, originally /dev/uioX, switch to mapping each individual bar via > the appropriately numbered resourceX file. > > Signed-off-by: Bruce Richardson > ---

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-23 Thread Gonzalez Monroy, Sergio
On 23/02/2015 13:52, Neil Horman wrote: > On Mon, Feb 23, 2015 at 10:25:01AM +, Gonzalez Monroy, Sergio wrote: >> On 22/02/2015 23:37, Neil Horman wrote: >>> On Fri, Feb 20, 2015 at 02:31:36PM +, Gonzalez Monroy, Sergio wrote: On 13/02/2015 12:51, Neil Horman wrote: > On Fri, Feb 1

[dpdk-dev] [PATCH] eal: mmap uio resources using resourceX files

2015-02-23 Thread Bruce Richardson
Instead of distinguishing the BAR mappings via offset within a single file, originally /dev/uioX, switch to mapping each individual bar via the appropriately numbered resourceX file. Signed-off-by: Bruce Richardson --- lib/librte_eal/common/include/rte_pci.h| 2 +- lib/librte_eal/linuxapp/e

[dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application

2015-02-23 Thread Jastrzebski, MichalX K
> -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Monday, February 23, 2015 12:46 PM > To: Wodkowski, PawelX > Cc: dev at dpdk.org; Jastrzebski, MichalX K; Neil Horman > Subject: Re: [dpdk-dev] [PATCH v5 0/3] new headroom stats library and > example

[dpdk-dev] [PATCH v11 12/13] eal/pci: Add rte_eal_dev_attach/detach() functions

2015-02-23 Thread Maxime Leroy
Hi Tetsuya, On Mon, Feb 23, 2015 at 6:09 AM, Tetsuya Mukawa wrote: > These functions are used for attaching or detaching a port. [...] > > +static int > +rte_eal_vdev_init(const char *name, const char *args) > +{ > + struct rte_driver *driver; > + > + if (name == NULL) > +

[dpdk-dev] [PATCH v4 4/5] eal: add per rx queue interrupt handling based on VFIO

2015-02-23 Thread Thomas Monjalon
2015-02-23 11:47, Zhou, Danny: > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > > 2015-02-19 21:48, Zhou Danny: > > > --- a/lib/librte_eal/linuxapp/eal/Makefile > > > +++ b/lib/librte_eal/linuxapp/eal/Makefile > > > @@ -43,6 +43,7 @@ CFLAGS += -I$(SRCDIR)/include > > > CFLAGS += -I$

[dpdk-dev] [PATCH v4 2/5] ixgbe: enable rx queue interrupts for both PF and VF

2015-02-23 Thread Thomas Monjalon
2015-02-23 11:23, Zhou, Danny: > I noticed the V4 patch conflicts with the latest code on the main branch due > to lots of code merged, and it > is mentioned by Jun Xu in previous email, and I will have to rebase the patch > and send out V5 version. Maybe you misunderstood my comment. I'm quoti

[dpdk-dev] [PATCH v2 00/11] qemu vhost-user support

2015-02-23 Thread Czesnowicz, Przemyslaw
> 2015-02-23 13:53, Czesnowicz, Przemyslaw: > > > I tried to locally applied the patches, waiting comments are closed. > > > But I stopped after patch 04/11 which makes compilation failing. > > > I'm so sorry that we still don't have a vhost-user support integrated in > > > DPDK. > > > I feel it w

[dpdk-dev] [PATCH v11 2/2] librte_pmd_null: Support port hotplug function

2015-02-23 Thread Tetsuya Mukawa
This patch adds port hotplug support to Null PMD. v9: - Use rte_eth_dev_release_port() instead of rte_eth_dev_free(). v7: - Add parameter checkings. (Thanks to Iremonger, Bernard) v6: - Fix a parameter of rte_eth_dev_free(). v4: - Fix commit title. Signed-off-by: Tetsuya Mukawa --- lib/l

[dpdk-dev] [PATCH v11 1/2] librte_pmd_null: Add Null PMD

2015-02-23 Thread Tetsuya Mukawa
Null PMD is a driver of the virtual device particularly designed to measure performance of DPDK PMDs. When an application call rx, Null PMD just allocates mbufs and returns those. Also tx, the PMD just frees mbufs. The PMD has following options. - size: specify packe size allocated by RX. Default

[dpdk-dev] [PATCH v11] testpmd: Add port hotplug support

2015-02-23 Thread Tetsuya Mukawa
The patch introduces following commands. - port attach [ident] - port detach [port_id] - attach: attaching a port - detach: detaching a port - ident: pci address of physical device. Or device name and parameters of virtual device. (ex. :02:00.0, eth_pcap0,iface=eth0) - po

[dpdk-dev] [PATCH v11] librte_pmd_pcap: Add port hotplug support

2015-02-23 Thread Tetsuya Mukawa
This patch adds finalization code to free resources allocated by the PMD. v6: - Fix a paramter of rte_eth_dev_free(). v4: - Change function name. Signed-off-by: Tetsuya Mukawa --- lib/librte_pmd_pcap/rte_eth_pcap.c | 40 ++ 1 file changed, 40 insertions(+)

[dpdk-dev] [PATCH v11 13/13] doc: Add port hotplug framework section to programmers guide

2015-02-23 Thread Tetsuya Mukawa
This patch adds a new section for describing port hotplug framework. Signed-off-by: Tetsuya Mukawa --- doc/guides/prog_guide/index.rst | 1 + doc/guides/prog_guide/port_hotplug_framework.rst | 110 +++ 2 files changed, 111 insertions(+) create mode 100644

[dpdk-dev] [PATCH v11 12/13] eal/pci: Add rte_eal_dev_attach/detach() functions

2015-02-23 Thread Tetsuya Mukawa
These functions are used for attaching or detaching a port. When rte_eal_dev_attach() is called, the function tries to realize the device name as pci address. If this is done successfully, rte_eal_dev_attach() will attach physical device port. If not, attaches virtual devive port. When rte_eal_dev_

[dpdk-dev] [PATCH v11 11/13] ethdev: Add one dev_type parameter to rte_eth_dev_allocate

2015-02-23 Thread Tetsuya Mukawa
This new parameter is needed to keep device type like PCI or virtual. Port detaching processes are different between PCI device and virtual device. RTE_ETH_DEV_PCI indicates device type is PCI. RTE_ETH_DEV_VIRTUAL indicates device is virtual. v10: - Change order of version.map. (Thanks to Thomas

[dpdk-dev] [PATCH v11 10/13] eal/pci: Add probe and close functions of pci driver

2015-02-23 Thread Tetsuya Mukawa
- Add pci_close_all_drivers() The function tries to find a driver for the specified device, and then close the driver. - Add rte_eal_pci_probe_one() and rte_eal_pci_close_one() The functions are used for probe and close a device. First the function tries to find a device that has the specif

[dpdk-dev] [PATCH v11 09/13] eal/linux/pci: Add functions for unmapping igb_uio resources

2015-02-23 Thread Tetsuya Mukawa
The patch adds functions for unmapping igb_uio resources. The patch is only for Linux and igb_uio environment. VFIO and BSD are not supported. v9: - Remove "rte_dev_hotplug.h". - Remove needless "#ifdef". (Thanks to Thomas Monjalon and Neil Horman) - Remove pci_unmap_device(). It will be impleme

[dpdk-dev] [PATCH v11 08/13] ethdev: Add functions that will be used by port hotplug functions

2015-02-23 Thread Tetsuya Mukawa
The patch adds following functions. - rte_eth_dev_save() The function is used for saving current rte_eth_dev structures. - rte_eth_dev_get_changed_port() The function receives the rte_eth_dev structures, then compare these with current values to know which port is actually attached or deta

[dpdk-dev] [PATCH v11 07/13] eal, ethdev: Add a function and function pointers to close ether device

2015-02-23 Thread Tetsuya Mukawa
The patch adds function pointer to rte_pci_driver and eth_driver structure. These function pointers are used when ports are detached. Also, the patch adds rte_eth_dev_uninit(). So far, it's not called by anywhere, but it will be called when port hotplug function is implemented. v10: - Add size par

[dpdk-dev] [PATCH v11 06/13] ethdev: Add rte_eth_dev_release_port to release specified port

2015-02-23 Thread Tetsuya Mukawa
This patch adds rte_eth_dev_release_port(). The function is used for changing an attached status of the device that has specified name. v9: - rte_eth_dev_free() is replaced by rte_eth_dev_release_port(). (Thanks to Thomas Monjalon) v6: - Use rte_eth_dev structure as the paramter of rte_eth_dev_f

[dpdk-dev] [PATCH v11 05/13] eal/pci: Consolidate pci address comparison APIs

2015-02-23 Thread Tetsuya Mukawa
This patch replaces pci_addr_comparison() and memcmp() of pci addresses by rte_eal_compare_pci_addr(). To compare PCI addresses, rte_eal_compare_pci_addr() doesn't use memcmp(). This is because sizeof(struct rte_pci_addr) returns 6, but actually this structure is like below. struct rte_pci_addr {

[dpdk-dev] [PATCH v11 04/13] eal/pci, ethdev: Remove assumption that port will not be detached

2015-02-23 Thread Tetsuya Mukawa
To remove assumption, do like followings. This patch adds "RTE_PCI_DRV_DETACHABLE" to drv_flags of rte_pci_driver structure. The flags indicate the driver can detach devices at runtime. Also, remove assumption that port will not be detached. To remove the assumption. - Add 'attached' member to rt

[dpdk-dev] [PATCH v11 03/13] eal_pci: pci memory map work with driver type

2015-02-23 Thread Tetsuya Mukawa
From: Michael Qiu With the driver type flag in struct rte_pci_dev, we do not need to always map uio devices with vfio related function when vfio enabled. Signed-off-by: Michael Qiu Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/linuxapp/eal/eal_pci.c | 30 +- 1

[dpdk-dev] [PATCH v11 02/13] eal_pci: Add flag to hold kernel driver type

2015-02-23 Thread Tetsuya Mukawa
From: Michael Qiu Currently, dpdk has no ability to know which type of driver( vfio-pci/igb_uio/uio_pci_generic) the device used. It only can check whether vfio is enabled or not staticly. It really useful to have the flag, becasue different type need to handle differently in runtime. For exampl

[dpdk-dev] [PATCH v11 01/13] eal: Enable port Hotplug framework in Linux

2015-02-23 Thread Tetsuya Mukawa
The patch adds CONFIG_RTE_LIBRTE_EAL_HOTPLUG in Linux and BSD configuration. So far, Hotplug functions only support linux. v9: - Move this patch at the top of this patch series. (Thanks to Thomas Monjalon) Signed-off-by: Tetsuya Mukawa --- config/common_bsdapp | 6 ++ config/common_linu

[dpdk-dev] [PATCH v11 00/13] Port Hotplug Framework

2015-02-23 Thread Tetsuya Mukawa
This patch series adds a dynamic port hotplug framework to DPDK. With the patches, DPDK apps can attach or detach ports at runtime. The basic concept of the port hotplug is like followings. - DPDK apps must have responsibility to manage ports. DPDK apps only know which ports are attached or deta

[dpdk-dev] [PATCH v2 00/11] qemu vhost-user support

2015-02-23 Thread Czesnowicz, Przemyslaw
> I tried to locally applied the patches, waiting comments are closed. > But I stopped after patch 04/11 which makes compilation failing. > I'm so sorry that we still don't have a vhost-user support integrated in DPDK. > I feel it won't be ready in next days to be able to enter in 2.0 version. Hi

[dpdk-dev] [PATCH] af_packet: fix minor memory leak of kvlist in dev init

2015-02-23 Thread John McNamara
Fix for Klockwork identified issue. Signed-off-by: John McNamara --- lib/librte_pmd_af_packet/rte_eth_af_packet.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/librte_pmd_af_packet/rte_eth_af_packet.c b/lib/librte_pmd_af_packet/rte_eth_af_packet.c index

[dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init

2015-02-23 Thread Wodkowski, PawelX
> -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of John McNamara > Sent: Monday, February 23, 2015 2:17 PM > To: dev at dpdk.org > Subject: [dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init > > Fix for Klockwork identified issue. > > Signed

[dpdk-dev] [PATCH 0/8] Improve build process

2015-02-23 Thread Neil Horman
On Mon, Feb 23, 2015 at 02:58:30PM +, Gonzalez Monroy, Sergio wrote: > On 23/02/2015 13:52, Neil Horman wrote: > >On Mon, Feb 23, 2015 at 10:25:01AM +, Gonzalez Monroy, Sergio wrote: > >>On 22/02/2015 23:37, Neil Horman wrote: > >>>On Fri, Feb 20, 2015 at 02:31:36PM +, Gonzalez Monroy,

[dpdk-dev] [PATCH] ring: fix minor memory leak of kvlist in dev init

2015-02-23 Thread John McNamara
Fix for Klockwork identified issue. Signed-off-by: John McNamara --- lib/librte_pmd_ring/rte_eth_ring.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/librte_pmd_ring/rte_eth_ring.c b/lib/librte_pmd_ring/rte_eth_ring.c index a23e933..88a1382 100644 --- a/lib/libr

[dpdk-dev] Appropriate DPDK data structures for TCP sockets

2015-02-23 Thread Matthew Hall
On Mon, Feb 23, 2015 at 08:48:57AM -0600, Matt Laswell wrote: > Apologies in advance for likely being a bit long-winded. Long winded is great, helps me get context. > First, you really need to take cache performance into account when you're > choosing a data structure. Something like a balanced

[dpdk-dev] [PATCH v5 0/3] new headroom stats library and example application

2015-02-23 Thread Thomas Monjalon
2015-02-20 15:46, Jastrzebski, MichalX K: > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Neil Horman > > On Thu, Feb 19, 2015 at 01:18:41PM +0100, Pawel Wodkowski wrote: > > > Hi community, > > > I would like to introduce library for measuring load of some arbitrary > > > jobs. > > > It

  1   2   >