[dpdk-dev] [PATCH] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled.
When enabling RTE_LIBRTE_MEMPOOL_DEBUG and compiling with clang compiler an error occurs, because ifdefed code now includes GCC pragmas. Signed-off-by: Keith Wiles --- lib/librte_mempool/rte_mempool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 95f19f9..299d4d7 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -312,7 +312,7 @@ static inline void __mempool_write_trailer_cookie(void *obj) * - 2: just check that cookie is valid (free or allocated) */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG -#ifndef __INTEL_COMPILER +#ifdef __GCC__ #pragma GCC push_options #pragma GCC diagnostic ignored "-Wcast-qual" #endif @@ -379,7 +379,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, } } } -#ifndef __INTEL_COMPILER +#ifdef __GCC__ #pragma GCC pop_options #endif #else -- 2.1.0
[dpdk-dev] [PATCH] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled.
When enabling RTE_LIBRTE_MEMPOOL_DEBUG and compiling with clang compiler an error occurs, because ifdefed code now includes GCC pragmas. Signed-off-by: Keith Wiles --- lib/librte_mempool/rte_mempool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 95f19f9..299d4d7 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -312,7 +312,7 @@ static inline void __mempool_write_trailer_cookie(void *obj) * - 2: just check that cookie is valid (free or allocated) */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG -#ifndef __INTEL_COMPILER +#ifdef __GCC__ #pragma GCC push_options #pragma GCC diagnostic ignored "-Wcast-qual" #endif @@ -379,7 +379,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, } } } -#ifndef __INTEL_COMPILER +#ifdef __GCC__ #pragma GCC pop_options #endif #else -- 2.1.0
[dpdk-dev] [PATCH] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled.
When enabling RTE_LIBRTE_MEMPOOL_DEBUG and compiling with clang compiler an error occurs, because ifdefed code now includes GCC pragmas. Signed-off-by: Keith Wiles --- lib/librte_mempool/rte_mempool.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 95f19f9..299d4d7 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -312,7 +312,7 @@ static inline void __mempool_write_trailer_cookie(void *obj) * - 2: just check that cookie is valid (free or allocated) */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG -#ifndef __INTEL_COMPILER +#ifdef __GCC__ #pragma GCC push_options #pragma GCC diagnostic ignored "-Wcast-qual" #endif @@ -379,7 +379,7 @@ static inline void __mempool_check_cookies(const struct rte_mempool *mp, } } } -#ifndef __INTEL_COMPILER +#ifdef __GCC__ #pragma GCC pop_options #endif #else ? 2.1.0
[dpdk-dev] [PATCH] Clang compile error with RTE_LIBRTE_MEMPOOL_DEBUG enabled.
On Sat, Sep 27, 2014 at 12:30:35AM -0500, Keith Wiles wrote: > When enabling RTE_LIBRTE_MEMPOOL_DEBUG and compiling with clang > compiler an error occurs, because ifdefed code now includes GCC pragmas. > > Signed-off-by: Keith Wiles > --- > lib/librte_mempool/rte_mempool.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/lib/librte_mempool/rte_mempool.h > b/lib/librte_mempool/rte_mempool.h > index 95f19f9..299d4d7 100644 > --- a/lib/librte_mempool/rte_mempool.h > +++ b/lib/librte_mempool/rte_mempool.h > @@ -312,7 +312,7 @@ static inline void __mempool_write_trailer_cookie(void > *obj) > * - 2: just check that cookie is valid (free or allocated) > */ > #ifdef RTE_LIBRTE_MEMPOOL_DEBUG > -#ifndef __INTEL_COMPILER > +#ifdef __GCC__ > #pragma GCC push_options > #pragma GCC diagnostic ignored "-Wcast-qual" > #endif > @@ -379,7 +379,7 @@ static inline void __mempool_check_cookies(const struct > rte_mempool *mp, > } > } > } > -#ifndef __INTEL_COMPILER > +#ifdef __GCC__ > #pragma GCC pop_options > #endif > #else > -- > 2.1.0 > > Acked-by: Neil Horman
[dpdk-dev] [PATCH] rte_mempool_dump() crashes with NULL rte_mempool pointer.
Check the FILE *f and rte_mempool *mp pointers for NULL and return plus print out a message if RTE_LIBRTE_MEMPOOL_DEBUG is enabled. Signed-off-by: Keith Wiles --- lib/librte_mempool/rte_mempool.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index 332f469..efa6a6c 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -765,6 +765,12 @@ rte_mempool_dump(FILE *f, const struct rte_mempool *mp) unsigned common_count; unsigned cache_count; + if ( (f == NULL) || (mp == NULL) ) { +#ifdef RTE_LIBRTE_MEMPOOL_DEBUG + fprintf(stderr, "*** Called rte_mempool_dump(%p, %p) with NULL argument\n", f, mp); +#endif /* RTE_LIBRTE_MEMPOOL_DEBUG */ + return; + } fprintf(f, "mempool <%s>@%p\n", mp->name, mp); fprintf(f, " flags=%x\n", mp->flags); fprintf(f, " ring=<%s>@%p\n", mp->ring->name, mp->ring); -- 2.1.0
[dpdk-dev] [PATCH] Function __mempool_get_bulk() returns wrong count.
When __mempool_get_bulk() grabs entries from the cache it returns zero instead of the number of entries obtained. Plus the stats were increased by the wrong count of objects. Signed-off-by: Keith Wiles --- lib/librte_mempool/rte_mempool.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.h b/lib/librte_mempool/rte_mempool.h index 299d4d7..6750e78 100644 --- a/lib/librte_mempool/rte_mempool.h +++ b/lib/librte_mempool/rte_mempool.h @@ -988,9 +988,9 @@ __mempool_get_bulk(struct rte_mempool *mp, void **obj_table, cache->len -= n; - __MEMPOOL_STAT_ADD(mp, get_success, n_orig); + __MEMPOOL_STAT_ADD(mp, get_success, n); - return 0; + return n; ring_dequeue: #endif /* RTE_MEMPOOL_CACHE_MAX_SIZE > 0 */ @@ -1004,7 +1004,7 @@ ring_dequeue: if (ret < 0) __MEMPOOL_STAT_ADD(mp, get_fail, n_orig); else - __MEMPOOL_STAT_ADD(mp, get_success, n_orig); + __MEMPOOL_STAT_ADD(mp, get_success, ret); return ret; } -- 2.1.0Keith Wiles, Principal Technologist with CTO office, Wind River mobile 972-213-5533
[dpdk-dev] [PATCH 0/2] Added functions to get RX/TX default configuration
Hello Pablo, - All I can see in this patchset is stuff that should remain in the PMD (since this is really specific to them). - Anyway, if you want to let application get this information, why the new API ? >From my point of view, this should go in rte_eth_dev_info_get(). -- David Marchand On Fri, Sep 26, 2014 at 4:19 PM, Pablo de Lara < pablo.de.lara.guarch at intel.com> wrote: > These patches add two new API functions to get an optimal values > for the RX/TX configuration structures (rte_eth_rxconf and rte_eth_txconf), > so users can get these configurations and modify or use them directly, > to set up RX/TX queues. Besides, most of the apps that were modifying > little > or none of the default values of the structures, have been modified to use > these functions to simplify the code and avoid duplication. > > Pablo de Lara (2): > pmd: Added rte_eth_rxconf_defaults and rte_eth_txconf defaults > functions > app: Used rte_eth_rxconf_defaults and rte_eth_txconf_defaults in apps > > examples/dpdk_qat/main.c | 44 ++--- > examples/exception_path/main.c | 30 + > examples/ip_fragmentation/main.c | 42 ++--- > examples/ip_reassembly/main.c | 44 ++--- > examples/ipv4_multicast/main.c | 44 ++--- > examples/kni/main.c| 34 +- > examples/l2fwd-ivshmem/host/host.c | 43 +--- > examples/l2fwd/main.c | 48 +- > examples/l3fwd-acl/main.c | 46 ++ > examples/l3fwd-power/main.c| 46 ++--- > examples/l3fwd-vf/main.c | 31 ++--- > examples/l3fwd/main.c | 54 +++- > examples/link_status_interrupt/main.c | 43 +--- > examples/load_balancer/init.c | 24 +-- > .../client_server_mp/mp_server/init.c | 41 +--- > examples/multi_process/l2fwd_fork/main.c | 44 + > examples/multi_process/symmetric_mp/main.c | 36 +- > examples/netmap_compat/bridge/bridge.c | 25 --- > examples/netmap_compat/lib/compat_netmap.c |6 +- > examples/netmap_compat/lib/compat_netmap.h |2 - > examples/qos_meter/main.c | 36 --- > examples/quota_watermark/qw/init.c | 26 ++-- > examples/vhost_xen/main.c | 31 ++--- > examples/vmdq/main.c | 60 > ++--- > examples/vmdq_dcb/main.c | 36 +- > lib/librte_ether/rte_ethdev.c | 68 > > lib/librte_ether/rte_ethdev.h | 29 > lib/librte_pmd_e1000/igb_ethdev.c | 56 > - > lib/librte_pmd_i40e/i40e_ethdev.c | 56 > lib/librte_pmd_ixgbe/ixgbe_ethdev.c| 59 > + > 30 files changed, 385 insertions(+), 799 deletions(-) > > -- > 1.7.7.6 > >
[dpdk-dev] dpdk ixgbevf pmd driver statistics collection
Hi I am able to get good results when I use DPDK/SR-IOV, 1 VF per PF to 1 VM with ixgbevf driver pmd driver. But, when I add more VM with DPDK/SR-IOV enabled NIC 1vf 1pf, both VMs reduced the packets reception by 40%. I am not sure where the problem is since with 1 VM packet receive/send is working fine. Here, I would like to debug I/O counters details in ixgbe_vf pmd driver level in DPDK. Can you please through somelight if DPDK has any counters/drop - Statistics collection available or not in ixgbevf I/O level.
[dpdk-dev] [PATCH] rte_mempool_dump() crashes with NULL rte_mempool pointer.
On Sat, Sep 27, 2014 at 06:35:01PM +, Wiles, Roger Keith wrote: > > Check the FILE *f and rte_mempool *mp pointers for NULL and > return plus print out a message if RTE_LIBRTE_MEMPOOL_DEBUG is enabled. > > Signed-off-by: Keith Wiles > --- > lib/librte_mempool/rte_mempool.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/lib/librte_mempool/rte_mempool.c > b/lib/librte_mempool/rte_mempool.c > index 332f469..efa6a6c 100644 > --- a/lib/librte_mempool/rte_mempool.c > +++ b/lib/librte_mempool/rte_mempool.c > @@ -765,6 +765,12 @@ rte_mempool_dump(FILE *f, const struct rte_mempool *mp) > unsigned common_count; > unsigned cache_count; > > + if ( (f == NULL) || (mp == NULL) ) { > +#ifdef RTE_LIBRTE_MEMPOOL_DEBUG > + fprintf(stderr, "*** Called rte_mempool_dump(%p, %p) with NULL > argument\n", f, mp); > +#endif /* RTE_LIBRTE_MEMPOOL_DEBUG */ > + return; > + } > fprintf(f, "mempool <%s>@%p\n", mp->name, mp); > fprintf(f, " flags=%x\n", mp->flags); > fprintf(f, " ring=<%s>@%p\n", mp->ring->name, mp->ring); > -- > 2.1.0 > > Maybe use RTE_VERIFY instead? Neil
[dpdk-dev] dpdk ixgbevf pmd driver statistics collection
Hi I am able to get good results when I use DPDK/SR-IOV, 1 VF per PF to 1 VM with ixgbevf driver pmd driver. But, when I add more VM with DPDK/SR-IOV enabled NIC 1vf 1pf, both VMs reduced the packets reception by 40%. I am not sure where the problem is since with 1 VM packet receive/send is working fine. Here, I would like to debug I/O counters details in ixgbe_vf pmd driver level in DPDK. Can you please through somelight if DPDK has any counters/drop - Statistics collection available or not in ixgbevf I/O level. --
[dpdk-dev] [PATCH] Function __mempool_get_bulk() returns wrong count.
On Sat, Sep 27, 2014 at 06:41:41PM +, Wiles, Roger Keith wrote: > > When __mempool_get_bulk() grabs entries from the cache it > returns zero instead of the number of entries obtained. Plus > the stats were increased by the wrong count of objects. > > Signed-off-by: Keith Wiles > --- > lib/librte_mempool/rte_mempool.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lib/librte_mempool/rte_mempool.h > b/lib/librte_mempool/rte_mempool.h > index 299d4d7..6750e78 100644 > --- a/lib/librte_mempool/rte_mempool.h > +++ b/lib/librte_mempool/rte_mempool.h > @@ -988,9 +988,9 @@ __mempool_get_bulk(struct rte_mempool *mp, void > **obj_table, > > cache->len -= n; > > - __MEMPOOL_STAT_ADD(mp, get_success, n_orig); > + __MEMPOOL_STAT_ADD(mp, get_success, n); > > - return 0; > + return n; > > ring_dequeue: > #endif /* RTE_MEMPOOL_CACHE_MAX_SIZE > 0 */ > @@ -1004,7 +1004,7 @@ ring_dequeue: > if (ret < 0) > __MEMPOOL_STAT_ADD(mp, get_fail, n_orig); > else > - __MEMPOOL_STAT_ADD(mp, get_success, n_orig); > + __MEMPOOL_STAT_ADD(mp, get_success, ret); > > return ret; > } > -- > 2.1.0Keith Wiles, Principal Technologist with CTO office, Wind River mobile > 972-213-5533 > > Acked-by: Neil Horman
[dpdk-dev] [PATCH] rte_mempool_dump() crashes with NULL rte_mempool pointer.
On Sun, Sep 28, 2014 at 01:14:05AM +, Wiles, Roger Keith wrote: > > On Sep 27, 2014, at 7:37 PM, Neil Horman wrote: > > > On Sat, Sep 27, 2014 at 06:35:01PM +, Wiles, Roger Keith wrote: > >> > >> Check the FILE *f and rte_mempool *mp pointers for NULL and > >> return plus print out a message if RTE_LIBRTE_MEMPOOL_DEBUG is enabled. > >> > >> Signed-off-by: Keith Wiles > >> --- > >> lib/librte_mempool/rte_mempool.c | 6 ++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/lib/librte_mempool/rte_mempool.c > >> b/lib/librte_mempool/rte_mempool.c > >> index 332f469..efa6a6c 100644 > >> --- a/lib/librte_mempool/rte_mempool.c > >> +++ b/lib/librte_mempool/rte_mempool.c > >> @@ -765,6 +765,12 @@ rte_mempool_dump(FILE *f, const struct rte_mempool > >> *mp) > >>unsigned common_count; > >>unsigned cache_count; > >> > >> + if ( (f == NULL) || (mp == NULL) ) { > >> +#ifdef RTE_LIBRTE_MEMPOOL_DEBUG > >> + fprintf(stderr, "*** Called rte_mempool_dump(%p, %p) with NULL > >> argument\n", f, mp); > >> +#endif /* RTE_LIBRTE_MEMPOOL_DEBUG */ > >> + return; > >> + } > >>fprintf(f, "mempool <%s>@%p\n", mp->name, mp); > >>fprintf(f, " flags=%x\n", mp->flags); > >>fprintf(f, " ring=<%s>@%p\n", mp->ring->name, mp->ring); > >> -- > >> 2.1.0 > >> > >> > > Maybe use RTE_VERIFY instead? > > Neil > > > I did not think it needs to panic as it is just a debug function and > returning would be fine by me, comments? > Do we have a similar RTE_VERIFY like function that does not panic? > If we don't, it would seem useful to make one. It beats having to do specific condition checking/error reporting. RTE_VERIFY_WARN or some such. Neil > Keith Wiles, Principal Technologist with CTO office, Wind River mobile > 972-213-5533 > >