[dpdk-dev] rte_eth_dev_configure fails on VM with e1000 drivers

2014-04-18 Thread B Gopikrishna
Hi when I run the l3fwd application with the below command line, I am observing the error "Cannot configure device: err=-22, port=0". The complete log is posted below. ./build/l3fwd -c 0x03 -n 2 -- -p 0x03 --config="(0,0,0),(1,1,1)" Setup: a) Virtual machine booted with Fedora20 with 2 virtual

[dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro

2014-04-18 Thread Thomas Monjalon
2014-04-18 09:20, Neil Horman: > On Fri, Apr 18, 2014 at 02:08:56PM +0200, Thomas Monjalon wrote: > > 2014-04-18 08:04, Neil Horman: > > > On Fri, Apr 18, 2014 at 04:42:01AM -0700, Thomas Monjalon wrote: > > > > 2014-04-15 14:05, Neil Horman: > > > > > Rather than have each driver have to remember

[dpdk-dev] [PATCH 01/15 v2] makefiles: Fixed -share command line option error

2014-04-18 Thread Thomas Monjalon
2014-04-18 09:18, Neil Horman: > On Fri, Apr 18, 2014 at 01:23:19PM +0200, Thomas Monjalon wrote: > > I think that CPU_LDFLAGS should be prefixed with -Wl, in case of CC > > linking. So blindly assigning CC to LD variable seems a bad idea. > > Other makefiles have different O_TO_S commands dependin

[dpdk-dev] [PATCH] eal: remove unused fields

2014-04-18 Thread David Marchand
There is no need for a 'magic' field in struct rte_config, as this part of the structure is local to each process. All threads of a process are synchronised because of the run_once atomic. So remove this field, as it is only adding confusion when reading code that references 'magic' field from stru

[dpdk-dev] [PATCH 2/2] malloc: simplify heap initialisation

2014-04-18 Thread David Marchand
There should be no real need for this initialised field as the whole structure is set to 0 in rte_config_init() by primary process, and secondary processes wait for this to happen before anything else (looking at mem_config magic). Signed-off-by: David Marchand --- lib/librte_eal/common/include/

[dpdk-dev] [PATCH 1/2] malloc: get rid of numa_socket field

2014-04-18 Thread David Marchand
We don't really need this field as it is only used when creating the memzone object associated to this heap. Signed-off-by: David Marchand --- lib/librte_eal/common/include/rte_malloc_heap.h |1 - lib/librte_malloc/malloc_heap.c | 13 + 2 files changed, 5 insert

[dpdk-dev] [PATCH 0/2] rework heap initialisation

2014-04-18 Thread David Marchand
Following Neil's suggestion, here is a patchset that removes the need for a synchronisation mechanism when initialising heap objects. As a consequence, this patchset replaces the two patches Didier proposed earlier. -- David Marchand David Marchand (2): malloc: get rid of numa_socket field m

[dpdk-dev] rte_eth_dev_configure fails on VM with e1000 drivers

2014-04-18 Thread Tomasz K
Hi Gopi I recently run into the same problem when using 82576 with igb_uio on VM. The problem is not e1000 or igb. The problem is with the other network device managed by virtio-pci driver Notice that when application polls for ETH devices it prints out EAL: probe driver: 1af4:1000 rte_virtio_pm

[dpdk-dev] rte_eth_dev_configure fails on VM with e1000 drivers

2014-04-18 Thread Thomas Monjalon
Hi, 2014-04-18 17:39, B Gopikrishna: > when I run the l3fwd application with the below command line, I am observing > the error "Cannot configure device: err=-22, port=0". The complete log is > posted below. Could you try to reproduce it with the git HEAD version? It may be fixed by this commit:

[dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro

2014-04-18 Thread Thomas Monjalon
2014-04-18 08:04, Neil Horman: > On Fri, Apr 18, 2014 at 04:42:01AM -0700, Thomas Monjalon wrote: > > 2014-04-15 14:05, Neil Horman: > > > Rather than have each driver have to remember to add a constructor to it > > > to > > > make sure its gets registered properly, wrap that process up in a macro

[dpdk-dev] [PATCH 07/15] eal: Make vdev init path generic for both virtual and physcial devices

2014-04-18 Thread Thomas Monjalon
I have some comments inline. 2014-04-15 14:06, Neil Horman: > Currently, physical device pmds use a separate initalization path > (rte_pmd_init_all) while virtual devices use a constructor registration and > rte_eal_dev_init. Theres no reason to have them be separate. This patch > removes the vd

[dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 03:32:15PM +0200, Thomas Monjalon wrote: > 2014-04-18 09:20, Neil Horman: > > On Fri, Apr 18, 2014 at 02:08:56PM +0200, Thomas Monjalon wrote: > > > 2014-04-18 08:04, Neil Horman: > > > > On Fri, Apr 18, 2014 at 04:42:01AM -0700, Thomas Monjalon wrote: > > > > > 2014-04-15 1

[dpdk-dev] [PATCH 01/15 v2] makefiles: Fixed -share command line option error

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 03:29:01PM +0200, Thomas Monjalon wrote: > 2014-04-18 09:18, Neil Horman: > > On Fri, Apr 18, 2014 at 01:23:19PM +0200, Thomas Monjalon wrote: > > > I think that CPU_LDFLAGS should be prefixed with -Wl, in case of CC > > > linking. So blindly assigning CC to LD variable seem

[dpdk-dev] [PATCH 01/15 v2] makefiles: Fixed -share command line option error

2014-04-18 Thread Thomas Monjalon
Hi Neil, 2014-04-16 09:51, Neil Horman: > The shared libraries built with the current makefile set produce static > libraries rather than actual shared objects. This is due to several missing > options that are required to correctly build shared objects using ld, as > well as a mis-specified -sha

[dpdk-dev] [PATCH] eal: remove unused fields

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 02:58:08PM +0200, David Marchand wrote: > There is no need for a 'magic' field in struct rte_config, as this part of the > structure is local to each process. All threads of a process are synchronised > because of the run_once atomic. > So remove this field, as it is only ad

[dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 02:08:56PM +0200, Thomas Monjalon wrote: > 2014-04-18 08:04, Neil Horman: > > On Fri, Apr 18, 2014 at 04:42:01AM -0700, Thomas Monjalon wrote: > > > 2014-04-15 14:05, Neil Horman: > > > > Rather than have each driver have to remember to add a constructor to it > > > > to > >

[dpdk-dev] [PATCH 01/15 v2] makefiles: Fixed -share command line option error

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 01:23:19PM +0200, Thomas Monjalon wrote: > Hi Neil, > > 2014-04-16 09:51, Neil Horman: > > The shared libraries built with the current makefile set produce static > > libraries rather than actual shared objects. This is due to several missing > > options that are required

[dpdk-dev] [PATCH 2/2] malloc: simplify heap initialisation

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 02:56:18PM +0200, David Marchand wrote: > There should be no real need for this initialised field as the whole structure > is set to 0 in rte_config_init() by primary process, and secondary processes > wait for this to happen before anything else (looking at mem_config magic

[dpdk-dev] [PATCH 1/2] malloc: get rid of numa_socket field

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 02:56:17PM +0200, David Marchand wrote: > We don't really need this field as it is only used when creating the memzone > object associated to this heap. > > Signed-off-by: David Marchand Acked-by: Neil Horman > --- > lib/librte_eal/common/include/rte_malloc_heap.h |

[dpdk-dev] [PATCH] eal: parse args before any kinds of init

2014-04-18 Thread Wang Sheng-Hui
Thanks, Thomas. 2014-04-18 5:58 GMT+08:00 Thomas Monjalon : > Hi, > > 2014-04-15 11:03, Wang Sheng-Hui: > > Parse args first, to resolve any invalid args and give out the usage > string. > > E.g './helloworld --invalid', the '--invalid' will be checked before any > > init. After the options are

[dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro

2014-04-18 Thread Neil Horman
On Fri, Apr 18, 2014 at 04:42:01AM -0700, Thomas Monjalon wrote: > 2014-04-15 14:05, Neil Horman: > > Rather than have each driver have to remember to add a constructor to it to > > make sure its gets registered properly, wrap that process up in a macro to > > make registration a one line affair.

[dpdk-dev] [PATCH 03/15] pmd: Add PMD_REGISTER_DRIVER macro

2014-04-18 Thread Thomas Monjalon
2014-04-15 14:05, Neil Horman: > Rather than have each driver have to remember to add a constructor to it to > make sure its gets registered properly, wrap that process up in a macro to > make registration a one line affair. This also sets the stage for us to > make registration of vdev pmds and p

[dpdk-dev] RX descriptors exhausted?

2014-04-18 Thread Anuj Kalia
Hi. I'm facing a problem where I stop receiving packets after I have received as many packets as the number of RX descriptors. More details follow: I have a small program where a server machine and a client machine execute the following loop: int nb_rx_new = rte_eth_rx_burst(0, 0, rx_pkts_burst,

[dpdk-dev] [PATCH] eal: do not try to load library with a local pathname

2014-04-18 Thread Thomas Monjalon
> > When loading a library "libfoo.so" (depending on "libbar.so", located in > > an > > entirely different folder), with a LD_LIBRARY_PATH=/path/to/libfoo.so", it > > > > returns an error: > > EAL: ./libfoo.so: cannot open shared object file: No such file or > > directory > > > > If the first d

[dpdk-dev] [PATCH] eal: check coremask against detected lcores

2014-04-18 Thread Thomas Monjalon
> > lcores that are set in coremask should be checked against lcores detected > > on system. This way, we won't need to check them later. > > > > Besides, if specifying an unavailable lcore, we currently panic in > > eal_thread_loop() because pthread_setaffinity_np fails. > > So this check will re

[dpdk-dev] [PATCH] eal: check error conditinos for every loop iteration

2014-04-18 Thread Thomas Monjalon
2014-04-16 06:50, Neil Horman: > The return code for rte_cpu_get_flag_enabled is only checked on the > termination of the for loop that it is called inside, but should be checked > for every iteration it makes through the for loop. This is caused by some > silly missing brackets. Simply add them

[dpdk-dev] [PATCH 2/2] kni: more compatibility with RHEL 6.4/6.5

2014-04-18 Thread Thomas Monjalon
2014-04-15 15:51, David Marchand: > From: Jean-Mickael Guerin > > For RH 6.5: > - always include mdio.h to get the definitions of MDIO_EEE, ETHTOOL_GEEE > - is_link_local_ether_addr(), pcie_capability_clear_and_set_word(), and > ether_addr_equal() have been backported > > For RH 6.4: > - same

[dpdk-dev] [PATCH 1/2] kni: disable FDB operations on RHEL 6.5

2014-04-18 Thread Thomas Monjalon
> From: Jean-Mickael Guerin > > On RH 6.5: > igb_main.c:2298: error: unknown field ?ndo_fdb_add? specified in > initializer > > FDB ops are present in RH 6.5 via the extension of netdev, so add the > ifdef inside the netdev ops definition of igb. > > However, FDB functions are not set for RHEL