[dpdk-dev] measuring latency with pktgen <=> l2fwd

2014-01-28 Thread Jun Han
Hi all, Does anyone know if there is a way to measure the round trip latency between pktgen and l2fwd? If not, is there a way to add timestamps to measure latency? Our current setup is: Machine A runs DPDK pktgen and is connected back-to-back with Machine B running l2fwd. Thank you. Jun

[dpdk-dev] "No probed ethernet devices" caused by inaccurate msec_delay()

2014-01-28 Thread Thomas Monjalon
28/01/2014 02:16, Sangjin Han: > >> It would be nice if I can bypass set_tsc_freq_from_cpuinfo() in > >> set_tsc_freq(). > > > > I think it would not solve the problem because your clock is varying and > > the TSC calibration must be updated accordingly with different values by > > core. [...] >

[dpdk-dev] [PATCH 11/11] kvargs: add test case in app/test

2014-01-28 Thread Olivier Matz
Add a file app/test/test_kvargs.c that checks the rte_kvargs API. The test passes: RTE>>kvargs == test valid case == == test invalid case == PMD: Error parsing device, invalid key Test OK I also tested that rte_eth_pcap runs with the following arguments: ./app/testpmd -c 0x15 -n 3 -

[dpdk-dev] [PATCH 10/11] kvargs: make the NULL key to match all entries

2014-01-28 Thread Olivier Matz
In rte_kvargs_process() and rte_kvargs_count(), if the key_match argument is NULL, process all entries. Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.c | 4 ++-- lib/librte_kvargs/rte_kvargs.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/librte_kva

[dpdk-dev] [PATCH 09/11] kvargs: add the key in handler pameters

2014-01-28 Thread Olivier Matz
This argument can be useful when rte_kvargs_process() is called with key=NULL, in this case the handler is invoked for all entries of the kvlist. Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.c | 2 +- lib/librte_kvargs/rte_kvargs.h | 2 +- lib/librte_pmd_pcap/rte_eth_pc

[dpdk-dev] [PATCH 08/11] kvargs: add const attribute in handler parameters

2014-01-28 Thread Olivier Matz
The "value" argument is read-only and should be const. Signed-off-by: Olivier Matz --- lib/librte_kvargs/rte_kvargs.h | 2 +- lib/librte_pmd_pcap/rte_eth_pcap.c | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/librte_kvargs/rte_kvargs.h b/lib/librte_kv

[dpdk-dev] [PATCH 07/11] kvargs: be strict when matching a key

2014-01-28 Thread Olivier Matz
When we match a key in is_valid_key() and rte_kvargs_process(), do a strict comparison (strcmp()) instead of using strstr(s1, s2) which tries a find s1 in s2. This old behavior could lead to unexpected match, for instance "cola" match "chocolate". Surprisingly, no patch was needed on rte_kvargs_co

[dpdk-dev] [PATCH 06/11] kvargs: simpler parsing and allow duplicated keys

2014-01-28 Thread Olivier Matz
Remove the rte_kvargs_add_pair() function whose only role was to check if a key is duplicated. Having duplicated keys is now allowed by kvargs API. Also replace rte_strsplit() by more a standard function strtok_r() that is easier to understand for people already knowing the libc. It also avoids us

[dpdk-dev] [PATCH 05/11] kvargs: rework API to fix memory leak

2014-01-28 Thread Olivier Matz
Before the patch, a call to rte_kvargs_tokenize() resulted in a call to strdup() to allocate a modifiable copy of the argument string. This string was never freed, excepted in the error cases of rte_kvargs_tokenize() where rte_free() was wrongly called instead of free(). In other cases, freeing thi

[dpdk-dev] [PATCH 04/11] kvargs: remove useless size field

2014-01-28 Thread Olivier Matz
This value was not very useful as the size of the table is fixed (equals RTE_KVARGS_MAX). By the way, the memset in the initialization function was wrong (size too short). Even if it was not really an issue since we rely on the "count" field, it is now fixed by this patch. Signed-off-by: Olivier

[dpdk-dev] [PATCH 03/11] kvargs: remove driver name in arguments

2014-01-28 Thread Olivier Matz
Now that rte_kvargs is a generic library, there is no need to have an argument for the driver name in rte_kvargs_tokenize() and rte_kvargs_parse() prototypes. This argument was only used to log the driver name in case of error. Instead, we can add a log in init function of pmd_pcap and pmd_ring. S

[dpdk-dev] [PATCH 02/11] kvargs: use the new library in pmd_pcap

2014-01-28 Thread Olivier Matz
The rte_kvargs library is a reworked copy of rte_eth_pcap_arg_parser, so it provides the same service. Therefore we can use it and remove the code of rte_eth_pcap_arg_parser. Signed-off-by: Olivier Matz --- lib/librte_pmd_pcap/Makefile | 8 +- lib/librte_pmd_pcap/rte_eth_pcap.

[dpdk-dev] [PATCH 01/11] kvargs: add a new library to parse key/value arguments

2014-01-28 Thread Olivier Matz
Copy the code from rte_eth_pcap_arg_parser.[ch], without any functional modifications, only: - rename functions and structure - restyle (indentation) - add comments (doxygen style) - add "const" or "static" attributes, remove unneeded "inline" Signed-off-by: Olivier Matz --- config/defconfig_i68

[dpdk-dev] [PATCH 00/11] add rte_kvargs library: a key/value args parser

2014-01-28 Thread Olivier Matz
The topic of this patchset is to add a new rte_kvargs library that can be used as a helper to parse key/value arguments. The code will be based on rte_eth_pcap_arg_parser and reworked with documentation and tests. It also fix some minor issues of the original code. These commits will allow another

[dpdk-dev] [PATCH 2/2 v2] pci: add option --create-uio-dev to run without hotplug

2014-01-28 Thread Thomas Monjalon
28/01/2014 16:26, Olivier Matz: > When the user specifies --create-uio-dev in dpdk eal start options, the > DPDK will create the /dev/uioX instead of waiting that a program does it > (which is usually hotplug). > > This option is useful in embedded environments where there is no hotplug > to do th

[dpdk-dev] [PATCH 1/2] pci: split the function providing uio device and mappings

2014-01-28 Thread Thomas Monjalon
24/01/2014 16:31, Olivier Matz: > Add a new function pci_get_uio_dev() that parses /sys/bus/pci/devices > to get the uio device associated with a PCI device. This patch just > moves some code that was in pci_uio_map_resource() in the new function > without any functional change. > > Thanks to this

[dpdk-dev] [PATCH 2/2 v2] pci: add option --create-uio-dev to run without hotplug

2014-01-28 Thread Olivier Matz
When the user specifies --create-uio-dev in dpdk eal start options, the DPDK will create the /dev/uioX instead of waiting that a program does it (which is usually hotplug). This option is useful in embedded environments where there is no hotplug to do the work. Signed-off-by: Olivier Matz --- l

[dpdk-dev] [PATCH RFC] dpif-netdev: Add support Intel DPDK based ports.

2014-01-28 Thread Vincent JARDIN
Hi Pravin, Yes, it is a good integration with http://dpdk.org Few feature questions: - what's about the vNIC supports (toward the guests)? - what's about IPsec support (VxLAN over IPsec for instance)? I do not understand how your patch will solve those 2 cases. >>> This is based a patch fr

[dpdk-dev] [PATCH 2/2] pci: add option --create-uio-dev to run without hotplug

2014-01-28 Thread Thomas Monjalon
24/01/2014 16:31, Olivier Matz: > --- a/lib/librte_eal/linuxapp/eal/eal.c > +++ b/lib/librte_eal/linuxapp/eal/eal.c > @@ -357,6 +358,7 @@ eal_usage(const char *prgname) > " --"OPT_NO_PCI" : disable pci\n" > " --"OPT_NO_HPET" : disable hpet\n" > " --"OPT_

[dpdk-dev] Rx-errors with testpmd (only 75% line rate)

2014-01-28 Thread Dmitry Vyal
On 01/28/2014 12:00 AM, Michael Quicquaro wrote: > Dmitry, > I cannot thank you enough for this information. This too was my main > problem. I put a "small" unmeasured delay before the call to > rte_eth_rx_burst() and suddenly it starts returning bursts of 512 > packets vs. 4!! > Best Regards,

[dpdk-dev] checking packet drop at NIC

2014-01-28 Thread Sharath
hi ! can someone please tell me whether the DPDK provides any method to handle below a. account the packet drops at NIC level ? is there any interrupt raised by DPDK for the same ? b. to check fifo errors ? c. way to check rx and tx in sync Tx, -SB

[dpdk-dev] [ovs-dev] [PATCH RFC] dpif-netdev: Add support Intel DPDK based ports.

2014-01-28 Thread Pravin Shelar
On Tue, Jan 28, 2014 at 7:54 AM, Thomas Graf wrote: > On 01/28/2014 03:47 PM, Vincent JARDIN wrote: >> >> Hi Pravin, >> >> Yes, it is a good integration with http://dpdk.org >> >> Few feature questions: >>- what's about the vNIC supports (toward the guests)? >>- what's about IPsec support

[dpdk-dev] [ovs-dev] [PATCH RFC] dpif-netdev: Add support Intel DPDK based ports.

2014-01-28 Thread Pravin Shelar
On Tue, Jan 28, 2014 at 7:48 AM, Thomas Graf wrote: > On 01/28/2014 02:48 AM, pshelar at nicira.com wrote: >> >> From: Pravin B Shelar >> >> Following patch adds DPDK netdev-class to userspace datapath. >> Approach taken in this patch differs from Intel? DPDK vSwitch >> where DPDK datapath switch

[dpdk-dev] "No probed ethernet devices" caused by inaccurate msec_delay()

2014-01-28 Thread Stephen Hemminger
TSC has lots of platform related issues. It is not guaranteed sync'd across physical packages and AMD boxes have lots of problems. Why does delay_ms not just use nanosleep() and let the OS worry about it? On a related note, I have found that putting the worker (non master) threads into real time

[dpdk-dev] [PATCH RFC] dpif-netdev: Add support Intel DPDK based ports.

2014-01-28 Thread Pravin Shelar
Hi Vincent, On Tue, Jan 28, 2014 at 6:47 AM, Vincent JARDIN wrote: > Hi Pravin, > > Yes, it is a good integration with http://dpdk.org > > Few feature questions: > - what's about the vNIC supports (toward the guests)? > - what's about IPsec support (VxLAN over IPsec for instance)? > I do not

[dpdk-dev] Passing VLAN traffic via l2fwd

2014-01-28 Thread James Yu
Some more discovery. That flag PKT_TX_VLAN_PKT eventually send the following command to the chips (ixgbe_xmit_pkts(), tx_desc_vlan_flags_to_cmdtype()) . Is this actually adding a VLAN tag during tx ? #define IXGBE_ADVTXD_DCMD_VLE IXGBE_TXD_CMD_VLE /* VLAN pkt enable */ #define IXGBE