[dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests

2016-04-28 Thread Maciej Czekaj
On Thu, 28 Apr 2016 13:13:20 + De Lara Guarch, Pablo wrote:
>
>
>> -Original Message-----
>> From: Maciej Czekaj [mailto:maciej.czekaj at caviumnetworks.com]
>> Sent: Thursday, April 28, 2016 1:10 PM
>> To: De Lara Guarch, Pablo; dev at dpdk.org
>> Cc: Mcnamara, John
>> Subject: Re: [dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for
>> better scatter-gather tests
>>
>> On Thu, 28 Apr 2016 08:52:59 + De Lara Guarch, Pablo wrote:
>>>
>>>
>>>> -Original Message-
>>>> From: maciej.czekaj at caviumnetworks.com
>>>> [mailto:maciej.czekaj at caviumnetworks.com]
>>>> Sent: Friday, April 22, 2016 3:51 PM
>>>> To: dev at dpdk.org
>>>> Cc: De Lara Guarch, Pablo; Mcnamara, John; Maciej Czekaj
>>>> Subject: [PATCH v2 0/3] testpmd: extend commands for better scatter-
>> gather
>>>> tests
>>>>
>>>> From: Maciej Czekaj 
>>>>
>>>> v2:
>>>>- included documentation changes
>>>>- added value check for "port config all txqflags" as in --tqxflags
>> paramater
>>>>
>>>> Maciej Czekaj (3):
>>>> app/testpmd: add "enable-scatter" parameter
>>>> app/testpmd: extend port config with scatter parameter
>>>> app/testpmd: support setting up txq_flags value in command line
>>>>
>>>>app/test-pmd/cmdline.c  | 86
>> +++--
>>>>app/test-pmd/parameters.c   |  3 +
>>>>doc/guides/testpmd_app_ug/run_app.rst   |  4 ++
>>>>doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++
>>>>4 files changed, 109 insertions(+), 4 deletions(-)
>>>>
>>>> --
>>>> 1.9.1
>>>
>>> Series-acked-by: Pablo de Lara 
>>>
>>> Just one comment, maybe we should include some extra info in "show port
>> info all", like txqflags or scatter mode.
>>>
>>
>> txqflags is displayed in:
>>- a forwarding info upon start command
>>- show txq info
>>
>> scatter mode is displayed in:
>>- show rxq info
>>
>> Still I think it is a good point to aggregate it in port info.
>>
>> I will address it in v3.
>
> Oh, true, good point. Then, probably not necessary, as we would be 
> duplicating  information.
>

If you think it is not necessary to add another place for that info than 
I think we're fine with v2.




[dpdk-dev] [PATCH v2 0/3] testpmd: extend commands for better scatter-gather tests

2016-04-28 Thread Maciej Czekaj
On Thu, 28 Apr 2016 08:52:59 + De Lara Guarch, Pablo wrote:
>
>
>> -Original Message-
>> From: maciej.czekaj at caviumnetworks.com
>> [mailto:maciej.czekaj at caviumnetworks.com]
>> Sent: Friday, April 22, 2016 3:51 PM
>> To: dev at dpdk.org
>> Cc: De Lara Guarch, Pablo; Mcnamara, John; Maciej Czekaj
>> Subject: [PATCH v2 0/3] testpmd: extend commands for better scatter-gather
>> tests
>>
>> From: Maciej Czekaj 
>>
>> v2:
>>   - included documentation changes
>>   - added value check for "port config all txqflags" as in --tqxflags 
>> paramater
>>
>> Maciej Czekaj (3):
>>app/testpmd: add "enable-scatter" parameter
>>app/testpmd: extend port config with scatter parameter
>>app/testpmd: support setting up txq_flags value in command line
>>
>>   app/test-pmd/cmdline.c  | 86 
>> +++--
>>   app/test-pmd/parameters.c   |  3 +
>>   doc/guides/testpmd_app_ug/run_app.rst   |  4 ++
>>   doc/guides/testpmd_app_ug/testpmd_funcs.rst | 20 +++
>>   4 files changed, 109 insertions(+), 4 deletions(-)
>>
>> --
>> 1.9.1
>
> Series-acked-by: Pablo de Lara 
>
> Just one comment, maybe we should include some extra info in "show port info 
> all", like txqflags or scatter mode.
>

txqflags is displayed in:
  - a forwarding info upon start command
  - show txq info

scatter mode is displayed in:
  - show rxq info

Still I think it is a good point to aggregate it in port info.

I will address it in v3.



[dpdk-dev] [PATCH v2] l3fwd: Fix compilation with HASH_MULTI_LOOKUP

2016-03-16 Thread Maciej Czekaj
l3fwd does not compile with HASH_MULTI_LOOKUP.
2 issues:
 * in 64d395 mask0 changed type from xmm_t to rte_xmm_t
  -> use x field from rte_xmm_t
 * in dc81eb dst_port parameter changed to uint32_t
  -> change uint16_t dst_port to uin32_t dsp_port

Signed-off-by: Maciej Czekaj 
---
 examples/l3fwd/l3fwd_em_hlm_sse.h | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/examples/l3fwd/l3fwd_em_hlm_sse.h 
b/examples/l3fwd/l3fwd_em_hlm_sse.h
index d3388da..891ae2e 100644
--- a/examples/l3fwd/l3fwd_em_hlm_sse.h
+++ b/examples/l3fwd/l3fwd_em_hlm_sse.h
@@ -46,7 +46,7 @@

 static inline void
 em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct rte_mbuf *m[8],
-   uint8_t portid, uint16_t dst_port[8])
+   uint8_t portid, uint32_t dst_port[8])
 {
int32_t ret[8];
union ipv4_5tuple_host key[8];
@@ -77,14 +77,14 @@ em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct 
rte_mbuf *m[8],
sizeof(struct ether_hdr) +
offsetof(struct ipv4_hdr, time_to_live)));

-   key[0].xmm = _mm_and_si128(data[0], mask0);
-   key[1].xmm = _mm_and_si128(data[1], mask0);
-   key[2].xmm = _mm_and_si128(data[2], mask0);
-   key[3].xmm = _mm_and_si128(data[3], mask0);
-   key[4].xmm = _mm_and_si128(data[4], mask0);
-   key[5].xmm = _mm_and_si128(data[5], mask0);
-   key[6].xmm = _mm_and_si128(data[6], mask0);
-   key[7].xmm = _mm_and_si128(data[7], mask0);
+   key[0].xmm = _mm_and_si128(data[0], mask0.x);
+   key[1].xmm = _mm_and_si128(data[1], mask0.x);
+   key[2].xmm = _mm_and_si128(data[2], mask0.x);
+   key[3].xmm = _mm_and_si128(data[3], mask0.x);
+   key[4].xmm = _mm_and_si128(data[4], mask0.x);
+   key[5].xmm = _mm_and_si128(data[5], mask0.x);
+   key[6].xmm = _mm_and_si128(data[6], mask0.x);
+   key[7].xmm = _mm_and_si128(data[7], mask0.x);

const void *key_array[8] = {[0], [1], [2], [3],
[4], [5], [6], [7]};
@@ -170,19 +170,19 @@ get_ipv6_5tuple(struct rte_mbuf *m0, __m128i mask0,

 static inline void
 em_get_dst_port_ipv6x8(struct lcore_conf *qconf, struct rte_mbuf *m[8],
-   uint8_t portid, uint16_t dst_port[8])
+   uint8_t portid, uint32_t dst_port[8])
 {
int32_t ret[8];
union ipv6_5tuple_host key[8];

-   get_ipv6_5tuple(m[0], mask1, mask2, [0]);
-   get_ipv6_5tuple(m[1], mask1, mask2, [1]);
-   get_ipv6_5tuple(m[2], mask1, mask2, [2]);
-   get_ipv6_5tuple(m[3], mask1, mask2, [3]);
-   get_ipv6_5tuple(m[4], mask1, mask2, [4]);
-   get_ipv6_5tuple(m[5], mask1, mask2, [5]);
-   get_ipv6_5tuple(m[6], mask1, mask2, [6]);
-   get_ipv6_5tuple(m[7], mask1, mask2, [7]);
+   get_ipv6_5tuple(m[0], mask1.x, mask2.x, [0]);
+   get_ipv6_5tuple(m[1], mask1.x, mask2.x, [1]);
+   get_ipv6_5tuple(m[2], mask1.x, mask2.x, [2]);
+   get_ipv6_5tuple(m[3], mask1.x, mask2.x, [3]);
+   get_ipv6_5tuple(m[4], mask1.x, mask2.x, [4]);
+   get_ipv6_5tuple(m[5], mask1.x, mask2.x, [5]);
+   get_ipv6_5tuple(m[6], mask1.x, mask2.x, [6]);
+   get_ipv6_5tuple(m[7], mask1.x, mask2.x, [7]);

const void *key_array[8] = {[0], [1], [2], [3],
[4], [5], [6], [7]};
@@ -292,7 +292,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf 
**pkts_burst,
uint8_t portid, struct lcore_conf *qconf)
 {
int32_t j;
-   uint16_t dst_port[MAX_PKT_BURST];
+   uint32_t dst_port[MAX_PKT_BURST];

/*
 * Send nb_rx - nb_rx%8 packets
-- 
1.9.1



[dpdk-dev] [PATCH] l3fwd: Fix compilation with HASH_MULTI_LOOKUP

2016-03-16 Thread Maciej Czekaj
---
 examples/l3fwd/l3fwd_em_hlm_sse.h | 38 +++---
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/examples/l3fwd/l3fwd_em_hlm_sse.h 
b/examples/l3fwd/l3fwd_em_hlm_sse.h
index d3388da..891ae2e 100644
--- a/examples/l3fwd/l3fwd_em_hlm_sse.h
+++ b/examples/l3fwd/l3fwd_em_hlm_sse.h
@@ -46,7 +46,7 @@

 static inline void
 em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct rte_mbuf *m[8],
-   uint8_t portid, uint16_t dst_port[8])
+   uint8_t portid, uint32_t dst_port[8])
 {
int32_t ret[8];
union ipv4_5tuple_host key[8];
@@ -77,14 +77,14 @@ em_get_dst_port_ipv4x8(struct lcore_conf *qconf, struct 
rte_mbuf *m[8],
sizeof(struct ether_hdr) +
offsetof(struct ipv4_hdr, time_to_live)));

-   key[0].xmm = _mm_and_si128(data[0], mask0);
-   key[1].xmm = _mm_and_si128(data[1], mask0);
-   key[2].xmm = _mm_and_si128(data[2], mask0);
-   key[3].xmm = _mm_and_si128(data[3], mask0);
-   key[4].xmm = _mm_and_si128(data[4], mask0);
-   key[5].xmm = _mm_and_si128(data[5], mask0);
-   key[6].xmm = _mm_and_si128(data[6], mask0);
-   key[7].xmm = _mm_and_si128(data[7], mask0);
+   key[0].xmm = _mm_and_si128(data[0], mask0.x);
+   key[1].xmm = _mm_and_si128(data[1], mask0.x);
+   key[2].xmm = _mm_and_si128(data[2], mask0.x);
+   key[3].xmm = _mm_and_si128(data[3], mask0.x);
+   key[4].xmm = _mm_and_si128(data[4], mask0.x);
+   key[5].xmm = _mm_and_si128(data[5], mask0.x);
+   key[6].xmm = _mm_and_si128(data[6], mask0.x);
+   key[7].xmm = _mm_and_si128(data[7], mask0.x);

const void *key_array[8] = {[0], [1], [2], [3],
[4], [5], [6], [7]};
@@ -170,19 +170,19 @@ get_ipv6_5tuple(struct rte_mbuf *m0, __m128i mask0,

 static inline void
 em_get_dst_port_ipv6x8(struct lcore_conf *qconf, struct rte_mbuf *m[8],
-   uint8_t portid, uint16_t dst_port[8])
+   uint8_t portid, uint32_t dst_port[8])
 {
int32_t ret[8];
union ipv6_5tuple_host key[8];

-   get_ipv6_5tuple(m[0], mask1, mask2, [0]);
-   get_ipv6_5tuple(m[1], mask1, mask2, [1]);
-   get_ipv6_5tuple(m[2], mask1, mask2, [2]);
-   get_ipv6_5tuple(m[3], mask1, mask2, [3]);
-   get_ipv6_5tuple(m[4], mask1, mask2, [4]);
-   get_ipv6_5tuple(m[5], mask1, mask2, [5]);
-   get_ipv6_5tuple(m[6], mask1, mask2, [6]);
-   get_ipv6_5tuple(m[7], mask1, mask2, [7]);
+   get_ipv6_5tuple(m[0], mask1.x, mask2.x, [0]);
+   get_ipv6_5tuple(m[1], mask1.x, mask2.x, [1]);
+   get_ipv6_5tuple(m[2], mask1.x, mask2.x, [2]);
+   get_ipv6_5tuple(m[3], mask1.x, mask2.x, [3]);
+   get_ipv6_5tuple(m[4], mask1.x, mask2.x, [4]);
+   get_ipv6_5tuple(m[5], mask1.x, mask2.x, [5]);
+   get_ipv6_5tuple(m[6], mask1.x, mask2.x, [6]);
+   get_ipv6_5tuple(m[7], mask1.x, mask2.x, [7]);

const void *key_array[8] = {[0], [1], [2], [3],
[4], [5], [6], [7]};
@@ -292,7 +292,7 @@ l3fwd_em_send_packets(int nb_rx, struct rte_mbuf 
**pkts_burst,
uint8_t portid, struct lcore_conf *qconf)
 {
int32_t j;
-   uint16_t dst_port[MAX_PKT_BURST];
+   uint32_t dst_port[MAX_PKT_BURST];

/*
 * Send nb_rx - nb_rx%8 packets
-- 
1.9.1