Re: [dpdk-dev] [PATCH] gso: fix VxLAN/GRE tunnel checks

2019-01-20 Thread Andrew Rybchenko

On 1/19/19 4:31 PM, Hu, Jiayu wrote:

Hi Andrew,

Would you please give more explanation about the problem that
the patch wants to fix?


Let's consider if tunnel is IPIP (0x3ULL << 45) or MPLSINUDP (0x5ULL << 45).
If so flags & VXLAN (0x1ULL << 45), still makes (0x1ULL << 45)==VXLAN,
but it is not a VXLAN tunnel packet.

Andrew.



Thanks,
Jiayu

-Original Message-
From: Andrew Rybchenko [mailto:arybche...@solarflare.com]
Sent: Friday, January 18, 2019 9:29 PM
To: Hu, Jiayu 
Cc: dev@dpdk.org; sta...@dpdk.org
Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks

Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.

Fixes: b058d92ea95d ("gso: support VxLAN GSO")
Fixes: 70e737e448c7 ("gso: support GRE GSO")
Cc: sta...@dpdk.org

Signed-off-by: Andrew Rybchenko 
---
  lib/librte_gso/gso_common.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
index 6cd764ff5..b6ff1b886 100644
--- a/lib/librte_gso/gso_common.h
+++ b/lib/librte_gso/gso_common.h
@@ -22,12 +22,12 @@
(PKT_TX_TCP_SEG | PKT_TX_IPV4))

  #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |
PKT_TX_IPV4 | \
-   PKT_TX_OUTER_IPV4 |
PKT_TX_TUNNEL_VXLAN)) == \
+   PKT_TX_OUTER_IPV4 |
PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
\
 PKT_TX_TUNNEL_VXLAN))

  #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |
PKT_TX_IPV4 | \
-   PKT_TX_OUTER_IPV4 |
PKT_TX_TUNNEL_GRE)) == \
+   PKT_TX_OUTER_IPV4 |
PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
\
 PKT_TX_TUNNEL_GRE))

--
2.17.1




Re: [dpdk-dev] [PATCH] doc: add meson ut enhancements in prog guide

2019-01-20 Thread Thomas Monjalon
12/12/2018 12:35, Hari Kumar Vemula:
> --- /dev/null
> +++ b/doc/guides/prog_guide/meson_ut_enhancements.rst
> @@ -0,0 +1,158 @@
> +..  SPDX-License-Identifier: BSD-3-Clause
> +Copyright(c) 2014-2018 Intel Corporation.
> +
> +.. _Meson_UT_Enhancements:

No need to add such anchor. The doc can be referred with :doc: syntax.

> +
> +Meson_UT_Enhancements
> +=

You should make a doc about how to run the tests with meson,
not how you improved it.
In short, please remove "enhancements" point of view.

> +
> +The meson build support for unit tests is now available and the more 
> enhancements are done to the build system
> +to classify unit tests under different categories. The build 
> `test/test/meson.build` file has been
> +modified for these enhancements. This document will further down describe 
> the below list.





Re: [dpdk-dev] [PATCH] doc: increase minimal supported Linux version

2019-01-20 Thread Thomas Monjalon
16/01/2019 19:56, Stephen Hemminger:
> On Wed, 16 Jan 2019 12:45:35 +0100
> Thomas Monjalon  wrote:
> 
> > Update the Linux user guide to restrict the supported kernels
> > to reasonnably recent enough versions.
> > 
> > Signed-off-by: Thomas Monjalon 
> 
> Acked-by: Stephen Hemminger 

Applied




Re: [dpdk-dev] [PATCH v2] doc: remove file listings

2019-01-20 Thread Thomas Monjalon
18/01/2019 16:35, Kovacevic, Marko:
> Acked-by: Marko Kovacevic 

Applied, thanks

Marko, please keep previous SoB and acks so we have a bit of history
in replies. Usually we also the keep the commit description in acks.




Re: [dpdk-dev] [PATCH] doc/gsg: update recommended NIC bios settings

2019-01-20 Thread Thomas Monjalon
17/01/2019 12:46, Kovacevic, Marko:
> Acked-by: Marko Kovacevic 

Applied, thanks

Note: Such doc should be out of Linux guide if they apply also
to BSD and Windows.




Re: [dpdk-dev] [PATCH v2] doc: fix references in power management guide

2019-01-20 Thread Thomas Monjalon
18/01/2019 10:34, David Hunt:
> In the References section in the Power Management overview,
> both links pointed to the same l3fwd-power app. Fix the links
> so that one points to l3fwd-power, and the other points to
> the vm_power_manager sample app.
> 
> Signed-off-by: David Hunt 
> Acked-by: Marko Kovacevic 

Applied, thanks




Re: [dpdk-dev] [PATCH] gso: fix VxLAN/GRE tunnel checks

2019-01-20 Thread Hu, Jiayu
Yes, this is a bug. Thanks for catching it.

But the commit log doesn’t tell what issue the patch fixes. Can you
add it in the commit log?

Thanks,
Jiayu
From: Andrew Rybchenko [mailto:arybche...@solarflare.com]
Sent: Sunday, January 20, 2019 5:59 PM
To: Hu, Jiayu 
Cc: dev@dpdk.org; sta...@dpdk.org
Subject: Re: [PATCH] gso: fix VxLAN/GRE tunnel checks

On 1/19/19 4:31 PM, Hu, Jiayu wrote:

Hi Andrew,



Would you please give more explanation about the problem that

the patch wants to fix?

Let's consider if tunnel is IPIP (0x3ULL << 45) or MPLSINUDP (0x5ULL << 45).
If so flags & VXLAN (0x1ULL << 45), still makes (0x1ULL << 45)==VXLAN,
but it is not a VXLAN tunnel packet.

Andrew.







Thanks,

Jiayu

-Original Message-

From: Andrew Rybchenko [mailto:arybche...@solarflare.com]

Sent: Friday, January 18, 2019 9:29 PM

To: Hu, Jiayu 

Cc: dev@dpdk.org; sta...@dpdk.org

Subject: [PATCH] gso: fix VxLAN/GRE tunnel checks



Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.



Fixes: b058d92ea95d ("gso: support VxLAN GSO")

Fixes: 70e737e448c7 ("gso: support GRE GSO")

Cc: sta...@dpdk.org



Signed-off-by: Andrew Rybchenko 


---

 lib/librte_gso/gso_common.h | 4 ++--

 1 file changed, 2 insertions(+), 2 deletions(-)



diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h

index 6cd764ff5..b6ff1b886 100644

--- a/lib/librte_gso/gso_common.h

+++ b/lib/librte_gso/gso_common.h

@@ -22,12 +22,12 @@

  (PKT_TX_TCP_SEG | PKT_TX_IPV4))



 #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |

PKT_TX_IPV4 | \

-PKT_TX_OUTER_IPV4 |

PKT_TX_TUNNEL_VXLAN)) == \

+PKT_TX_OUTER_IPV4 |

PKT_TX_TUNNEL_MASK)) == \

  (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |

\

   PKT_TX_TUNNEL_VXLAN))



 #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |

PKT_TX_IPV4 | \

-PKT_TX_OUTER_IPV4 |

PKT_TX_TUNNEL_GRE)) == \

+PKT_TX_OUTER_IPV4 |

PKT_TX_TUNNEL_MASK)) == \

  (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |

\

   PKT_TX_TUNNEL_GRE))



--

2.17.1





Re: [dpdk-dev] [PATCH 1/2] doc/power: library can now use intel-pstate

2019-01-20 Thread Thomas Monjalon
15/01/2019 15:17, David Hunt:
> With the addition of the patchset to allow auto-detection and use
> of the intel_pstate kernel driver instead of the acpi-cpufreq kernel
> driver, we need to reflect this in the documentation.
> 
> Now, instead of telling the user to disable intel_pstate in all cases,
> it is now an optional step, should the user want to use acpi-cpufreq.
> 
> Signed-off-by: David Hunt 

Applied with release notes squashed, thanks




Re: [dpdk-dev] [PATCH] doc/qat: add GCM AAD limitation

2019-01-20 Thread Thomas Monjalon
> > Add limitation that AAD buffer must be padded with zeroes in GCM case.
> > 
> > Fixes: d4f44265a1d7 ("doc: add limitation of AAD size to QAT guide")
> > Cc: sta...@dpdk.org
> > 
> > Signed-off-by: Fiona Trahe 
> 
> Acked-by: Arek Kusztal 

Applied, thanks




[dpdk-dev] [PATCH] doc: add missing package dependency in contributors guide

2019-01-20 Thread Rami Rosen
There is a missing depenency for building docs with "make doc-guides-pdf".
This causes it to break with "make[3]: latexmk: Command not found". This 
was observed and reproted in https://bugs.dpdk.org/show_bug.cgi?id=182
This patch fixes this issue by adding the latexmk package dependency in 
sub-section 4.3.1 of the contributing guide ("Dependencies").

Cc: sta...@dpdk.org
Signed-off-by: Rami Rosen 
---
 doc/guides/contributing/documentation.rst | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/doc/guides/contributing/documentation.rst 
b/doc/guides/contributing/documentation.rst
index c28a95c34..83e39d189 100644
--- a/doc/guides/contributing/documentation.rst
+++ b/doc/guides/contributing/documentation.rst
@@ -204,6 +204,17 @@ The main required packages can be installed as follows:
# Red Hat/Fedora, selective install.
sudo dnf -y install texlive-collection-latexextra
 
+`Latexmk `_ is a perl 
script for running LaTeX for
+resolving cross references, and it also runs auxiliary programs like bibtex, 
makeindex
+if necessary, and dvips. It has also a number of other useful capabilities 
(see man 1 latexmk).
+
+.. code-block:: console
+
+   # Ubuntu/Debian.
+   sudo apt-get -y install latexmk
+
+   # Red Hat/Fedora, selective install.
+   sudo dnf -y install latexmk
 
 Build commands
 ~~
-- 
2.19.2



Re: [dpdk-dev] [PATCH] doc: update description in qat compression guide

2019-01-20 Thread Thomas Monjalon
> > Added limitations description for the QAT compression PMD.
> > Updated intermediate buffers description in qat.rst file.
> > 
> > Signed-off-by: Tomasz Jozwiak 
> Acked-by: Fiona Trahe 

Applied, thanks




Re: [dpdk-dev] [PATCH v3] test: reduce test duration for efd autotest

2019-01-20 Thread Thomas Monjalon
Any review please?

29/11/2018 08:36, Jananee Parthasarathy:
> Reduced test time for efd_autotest.
> Key length is updated, invoke times of random function is reduced.
> Different value is updated for each hash key entry.
> 
> Signed-off-by: Jananee Parthasarathy 
> ---
> v3: reverted the simple_key to uint8_t type
> v2: value updated for each hash key
> ---
>  test/test/test_efd.c | 18 --
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/test/test/test_efd.c b/test/test/test_efd.c
> index ced091aab..94b490fdc 100644
> --- a/test/test/test_efd.c
> +++ b/test/test/test_efd.c
> @@ -12,7 +12,6 @@
>  
>  #include "test.h"
>  
> -#define EFD_TEST_KEY_LEN 8
>  #define TABLE_SIZE (1 << 21)
>  #define ITERATIONS 3
>  
> @@ -331,8 +330,9 @@ static int test_average_table_utilization(void)
>  {
>   struct rte_efd_table *handle = NULL;
>   uint32_t num_rules_in = TABLE_SIZE;
> - uint8_t simple_key[EFD_TEST_KEY_LEN];
> - unsigned int i, j;
> + uint8_t  simple_key;
> + unsigned int j;
> + efd_value_t val;
>   unsigned int added_keys, average_keys_added = 0;
>  
>   printf("Evaluating table utilization and correctness, please wait\n");
> @@ -340,7 +340,7 @@ static int test_average_table_utilization(void)
>  
>   for (j = 0; j < ITERATIONS; j++) {
>   handle = rte_efd_create("test_efd", num_rules_in,
> - EFD_TEST_KEY_LEN, efd_get_all_sockets_bitmask(),
> + sizeof(uint8_t), efd_get_all_sockets_bitmask(),
>   test_socket_id);
>   if (handle == NULL) {
>   printf("efd table creation failed\n");
> @@ -353,15 +353,13 @@ static int test_average_table_utilization(void)
>   /* Add random entries until key cannot be added */
>   for (added_keys = 0; added_keys < num_rules_in; added_keys++) {
>  
> - for (i = 0; i < EFD_TEST_KEY_LEN; i++)
> - simple_key[i] = rte_rand() & 0xFF;
> + simple_key = rte_rand() & 0xFF;
> + val = mrand48() & VALUE_BITMASK;
>  
> - efd_value_t val = simple_key[0];
> -
> - if (rte_efd_update(handle, test_socket_id, simple_key,
> + if (rte_efd_update(handle, test_socket_id, &simple_key,
>   val))
>   break; /* continue;*/
> - if (rte_efd_lookup(handle, test_socket_id, simple_key)
> + if (rte_efd_lookup(handle, test_socket_id, &simple_key)
>   != val)
>   lost_keys++;
>   else
> 







Re: [dpdk-dev] [PATCH v2] test/metrics: Fixed a negative case to pass

2019-01-20 Thread Thomas Monjalon
10/12/2018 09:39, Harman Kalra:
> Negative test case for passing invalid count size to
> rte_metrics_update_values() will pass if count value
> is any value greater than 1 because set size wrt to
> key id 1 is 1 and passing 0 as no of values to be
> updated will not hit the ERANGE check.
> 
> Signed-off-by: Harman Kalra 

Adding comment from Remy:
Fixes: cd3804242901 ("test/metrics: add unit tests for metrics library")
Acked-by: Remy Horton 

Applied, thanks




Re: [dpdk-dev] MLX5: Array written to out-of-bounds when freeing memory

2019-01-20 Thread Daniel Pharos
Hi Yongseok,

Thanks for the quick response! If there is any information you need that I may 
be able to provide, please just ask.


Kind regards,
DanielPharos

-Original Message-
From: Yongseok Koh  
Sent: 19 January 2019 08:15
To: Daniel Pharos 
Cc: dev@dpdk.org; Dekel Peled ; Olga Shern 

Subject: Re: [dpdk-dev] MLX5: Array written to out-of-bounds when freeing memory

Appreciate your report.
We are aware of the issue and Dekel is investigating it.
As I wrote the code, I'm also looking at the issue.
Will keep you posted.

Thanks,
Yongseok

> On Jan 18, 2019, at 9:36 AM, Daniel Pharos  wrote:
> 
> Hi,
> 
> Recently I had the privilege of some play-time on a IBM Power 9 machine with 
> a Mellanox MLX5-card in it. However, I encountered a seg fault problem using 
> DPDK and DPDK-pktgen. It's the exact same one as somebody else encountered 
> (also on a Power 9) here:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.redhat.com%2Fshow_bug.cgi%3Fid%3D1634159%23c10&data=02%7C01%7Cyskoh%40mellanox.com%7Ce3e3546283b64a84e3b608d67d9acf8f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636834501198813346&sdata=722uRuNvcISF69NTrqwFldzIPC%2FP8Wz3CDKPutStWP8%3D&reserved=0
> It looks like it's writing out-of-bounds on the "free"-array in DPDK.
> 
> Reverting the patch that added the bulk-free ( 
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmails.dpdk.org%2Farchives%2Fdev%2F2017-June%2F069154.html&data=02%7C01%7Cyskoh%40mellanox.com%7Ce3e3546283b64a84e3b608d67d9acf8f%7Ca652971c7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636834501198813346&sdata=73up%2FKm9SZHBTdu64f5guSojTGNTFRkY7ePrBal7Bvo%3D&reserved=0
>  ) indeed makes DPDK and pktgen function correctly. A better workaround I 
> found is to change drivers/net/mlx5/mlx5_rxtx.h, line 580 to:
>if (likely((m->pool == pool) && (blk_n != elts_n))) {
> 
> I'm not familiar enough with the code to understand why the array is being 
> written to out-of-bounds, and why it's only happening on a Power 9 machine. 
> Unfortunately, my play-time is now over, but I thought I'd report this issue 
> anyway, so hopefully it can be investigated and fixed properly.
> 
> 
> Kind regards,
> DanielPharos



[dpdk-dev] [dpdk-announce] release candidate 19.02-rc3

2019-01-20 Thread Thomas Monjalon
A new DPDK release candidate is ready for testing:
https://git.dpdk.org/dpdk/tag/?id=v19.02-rc3

The release notes are almost complete:
http://doc.dpdk.org/guides/rel_notes/release_19_02.html

There are some open bugs to check in bugzilla:

https://dpdk.org/tracker/buglist.cgi?bug_status=UNCONFIRMED&bug_status=CONFIRMED&bug_status=IN_PROGRESS&product=DPDK

Please hurry up to do the last checks and bug fixes this week,
in order to have DPDK 19.02 out in two weeks.
You may share some release validation results
by replying to this message (at dev@dpdk.org).

In order to prepare the next cycle, the deprecation notices
must be reviewed, and the roadmap topics proposed on the mailing list.
Some deadline dates are proposed in the release status meeting:
http://mails.dpdk.org/archives/dev/2019-January/123625.html
Feel free to approve or comment in the thread above.

Thank you everyone

PS: Registration for India summit is open:
http://www.cvent.com/d/g6q7jz/4W




Re: [dpdk-dev] [PATCH v4 2/2] doc: add guide for debug and troubleshoot

2019-01-20 Thread Varghese, Vipin
Thanks Marko, I will spin v5 with the changes asap.

Note: Just wondering why 'devtools/checkpatches.sh' did not report any error.

Thanks
Vipin Varghese

> -Original Message-
> From: Kovacevic, Marko
> Sent: Friday, January 18, 2019 8:59 PM
> To: Varghese, Vipin ; dev@dpdk.org;
> shreyansh.j...@nxp.com; tho...@monjalon.net
> Cc: Mcnamara, John ; Patel, Amol
> ; Padubidri, Sanjay A 
> Subject: RE: [PATCH v4 2/2] doc: add guide for debug and troubleshoot
> 
> After checking the patch again I found a few spelling mistakes
> 
> > Add user guide on debug and troubleshoot for common issues and
> > bottleneck found in sample application model.
> >
> > Signed-off-by: Vipin Varghese 
> > Acked-by: Marko Kovacevic 
> > ---
> >  doc/guides/howto/debug_troubleshoot_guide.rst | 375
> > ++
> >  doc/guides/howto/index.rst|   1 +
> >  2 files changed, 376 insertions(+)
> >  create mode 100644 doc/guides/howto/debug_troubleshoot_guide.rst
> >
> 
> <...>
> 
> receieve / receive
> 
> > +-  If stats for RX and drops updated on same queue? check
> > + receieve
> > thread
> > +-  If packet does not reach PMD? check if offload for port and queue
> > +   matches to traffic pattern send.
> > +
> 
> <...>
> 
> Offlaod/ offload
> 
> > +-  Is the packet multi segmented? Check if port and queue offlaod is 
> > set.
> > +
> > +Are there object drops in producer point for ring?
> > +~~
> 
> <...>
> 
> sufficent / sufficient
> 
> > +-  Are drops on specific socket? If yes check if there are sufficent
> > +   objects by rte_mempool_get_count() or rte_mempool_avail_count()
> > +-  Is 'rte_mempool_get_count() or rte_mempool_avail_count()' zero?
> > +   application requires more objects hence reconfigure number of
> > +   elements in rte_mempool_create().
> > +-  Is there single RX thread for multiple NIC? try having multiple
> > +   lcore to read from fixed interface or we might be hitting cache
> > +   limit, so increase cache_size for pool_create().
> > +
> 
> Sceanrios/ scenarios
> 
> > +#. Is performance low for some sceanrios?
> > +-  Check if sufficient objects in mempool by rte_mempool_avail_count()
> > +-  Is failure seen in some packets? we might be getting packets with
> > +   'size > mbuf data size'.
> > +-  Is NIC offload or application handling multi segment mbuf? check the
> > +   special packets are continuous with rte_pktmbuf_is_contiguous().
> > +-  If there separate user threads used to access mempool objects, use
> > +   rte_mempool_cache_create() for non DPDK threads.
> 
> debuging / debugging
> 
> > +-  Is the error reproducible with 1GB hugepage? If no, then try 
> > debuging
> > +   the issue with lookup table or objects with rte_mem_lock_page().
> > +
> > +.. note::
> > +  Stall in release of MBUF can be because
> 
> <...>
> 
> softwre / software
> 
> > +-  If softwre crypto is in use, check if the CRYPTO Library is build 
> > with
> > +   right (SIMD) flags or check if the queue pair using CPU ISA for
> > +   feature_flags AVX|SSE|NEON using rte_cryptodev_info_get()
> 
> Assited/ assisted
> 
> > +-  If its hardware assited crypto showing performance variance? Check 
> > if
> > +   hardware is on same NUMA socket as queue pair and session pool.
> > +
> 
> <...>
> 
> exceeeding / exceeding
> 
> > +   core? registered functions may be exceeeding the desired time slots
> > +   while running on same service core.
> > +-  Is function is running on RTE core? check if there are conflicting
> > +   functions running on same CPU core by rte_thread_get_affinity().
> > +
> 
> <...>
> 
> > +#. Where to capture packets?
> > +-  Enable pdump in primary to allow secondary to access queue-pair for
> > +   ports. Thus packets are copied over in RX|TX callback by secondary
> > +   process using ring buffers.
> > +-  To capture packet in middle of pipeline stage, user specific hooks
> > +   or callback are to be used to copy the packets. These packets
> > +can
> 
> secodnary / secondary
> 
> > +   be shared to secodnary process via user defined custom rings.
> > +
> > +Issue still persists?
> > +~
> > +
> > +#. Are there custom or vendor specific offload meta data?
> > +-  From PMD, then check for META data error and drops.
> > +-  From application, then check for META data error and drops.
> > +#. Is multiprocess is used configuration and data processing?
> > +-  Check enabling or disabling features from secondary is
> > +supported or
> > not?
> 
> Obejcts/ objects
> 
> > +#. Is there drops for certain scenario for packets or obejcts?
> > +-  Check user private data in objects by dumping the details for debug.
> > +
> <...>
> 
> Thanks,
> Marko K


[dpdk-dev] [PATCH v5 0/2] doc/howto: add debug and troubleshoot guide

2019-01-20 Thread Vipin Varghese
This patch series is an attempt to add how to guide for commonly seen
issues in various application scenario. It also tries to suggest a step
by step guide on how to debug and troubleshoot with available stats and
counters.

Motivation
==
DPDK allows to build application on top of custom off the shelf
components for user scenarios that are modelled with single or multi stage.
Each module interacts with PMD or rings with either software or hardware
offloads.

Identify the cause of issue or performance issues will be tedious and time
consuming. The how to guide is an effort to consolidate such scenarios with
step by step focus to debug and troubleshoot.

Status
==
Reviews and changes accommodated. ACK received and updated.

Future
==
1. Suggestion on vlan filters - Shreyansh Jain

Change Log
==

Vipin Varghese (2):
  doc: add svg for debug and troubleshoot guide
  doc: add guide for debug and troubleshoot

 doc/guides/howto/debug_troubleshoot_guide.rst | 375 ++
 doc/guides/howto/img/dtg_consumer_ring.svg|  19 +
 doc/guides/howto/img/dtg_crypto.svg   |  16 +
 .../howto/img/dtg_distributor_worker.svg  |  31 ++
 doc/guides/howto/img/dtg_mempool.svg  |  22 +
 doc/guides/howto/img/dtg_pdump.svg|  28 ++
 doc/guides/howto/img/dtg_producer_ring.svg|  19 +
 doc/guides/howto/img/dtg_qos_tx.svg   |  24 ++
 doc/guides/howto/img/dtg_rx_rate.svg  |  20 +
 doc/guides/howto/img/dtg_rx_tx_drop.svg   |  28 ++
 doc/guides/howto/img/dtg_sample_app_model.svg | 105 +
 doc/guides/howto/img/dtg_service.svg  |  15 +
 doc/guides/howto/index.rst|   1 +
 13 files changed, 703 insertions(+)
 create mode 100644 doc/guides/howto/debug_troubleshoot_guide.rst
 create mode 100644 doc/guides/howto/img/dtg_consumer_ring.svg
 create mode 100644 doc/guides/howto/img/dtg_crypto.svg
 create mode 100644 doc/guides/howto/img/dtg_distributor_worker.svg
 create mode 100644 doc/guides/howto/img/dtg_mempool.svg
 create mode 100644 doc/guides/howto/img/dtg_pdump.svg
 create mode 100644 doc/guides/howto/img/dtg_producer_ring.svg
 create mode 100644 doc/guides/howto/img/dtg_qos_tx.svg
 create mode 100644 doc/guides/howto/img/dtg_rx_rate.svg
 create mode 100644 doc/guides/howto/img/dtg_rx_tx_drop.svg
 create mode 100644 doc/guides/howto/img/dtg_sample_app_model.svg
 create mode 100644 doc/guides/howto/img/dtg_service.svg

V5:
 - Corrections is spelling -  Marko Kovacevic

V4:
 - Added suggestion and corrections - Shreyansh Jain

V3:
 - Reorder the commit order - Thomas Monjalon

V2:
 - Added ACK - Marko Kovacevic

-- 
2.17.1



[dpdk-dev] [PATCH v5 2/2] doc: add guide for debug and troubleshoot

2019-01-20 Thread Vipin Varghese
Add user guide on debug and troubleshoot for common issues and bottleneck
found in sample application model.

Signed-off-by: Vipin Varghese 
Acked-by: Marko Kovacevic 
---
 doc/guides/howto/debug_troubleshoot_guide.rst | 375 ++
 doc/guides/howto/index.rst|   1 +
 2 files changed, 376 insertions(+)
 create mode 100644 doc/guides/howto/debug_troubleshoot_guide.rst

diff --git a/doc/guides/howto/debug_troubleshoot_guide.rst 
b/doc/guides/howto/debug_troubleshoot_guide.rst
new file mode 100644
index 0..868dc6e58
--- /dev/null
+++ b/doc/guides/howto/debug_troubleshoot_guide.rst
@@ -0,0 +1,375 @@
+..  SPDX-License-Identifier: BSD-3-Clause
+Copyright(c) 2018 Intel Corporation.
+
+.. _debug_troubleshoot_via_pmd:
+
+Debug & Troubleshoot guide via PMD
+==
+
+DPDK applications can be designed to run as single thread simple stage to
+multiple threads with complex pipeline stages. These application can use poll
+mode devices which helps in offloading CPU cycles. A few models are
+
+  *  single primary
+  *  multiple primary
+  *  single primary single secondary
+  *  single primary multiple secondary
+
+In all the above cases, it is a tedious task to isolate, debug and understand
+odd behaviour which occurs randomly or periodically. The goal of guide is to
+share and explore a few commonly seen patterns and behaviour. Then, isolate
+and identify the root cause via step by step debug at various processing
+stages.
+
+Application Overview
+
+
+Let us take up an example application as reference for explaining issues and
+patterns commonly seen. The sample application in discussion makes use of
+single primary model with various pipeline stages. The application uses PMD
+and libraries such as service cores, mempool, pkt mbuf, event, crypto, QoS
+and eth.
+
+The overview of an application modeled using PMD is shown in
+:numref:`dtg_sample_app_model`.
+
+.. _dtg_sample_app_model:
+
+.. figure:: img/dtg_sample_app_model.*
+
+   Overview of pipeline stage of an application
+
+Bottleneck Analysis
+---
+
+To debug the bottleneck and performance issues the desired application
+is made to run in an environment matching as below
+
+#. Linux 64-bit|32-bit
+#. DPDK PMD and libraries are used
+#. Libraries and PMD are either static or shared. But not both
+#. Machine flag optimizations of gcc or compiler are made constant
+
+Is there mismatch in packet rate (received < send)?
+~~~
+
+RX Port and associated core :numref:`dtg_rx_rate`.
+
+.. _dtg_rx_rate:
+
+.. figure:: img/dtg_rx_rate.*
+
+   RX send rate compared against Received rate
+
+#. Are generic configuration correct?
+-  What is port Speed, Duplex? rte_eth_link_get()
+-  Are packets of higher sizes are dropped? rte_eth_get_mtu()
+-  Are only specific MAC received? rte_eth_promiscuous_get()
+
+#. Are there NIC specific drops?
+-  Check rte_eth_rx_queue_info_get() for nb_desc and scattered_rx
+-  Is RSS enabled? rte_eth_dev_rss_hash_conf_get()
+-  Are packets spread on all queues? rte_eth_dev_stats()
+-  If stats for RX and drops updated on same queue? check receive thread
+-  If packet does not reach PMD? check if offload for port and queue
+   matches to traffic pattern send.
+
+#. If problem still persists, this might be at RX lcore thread
+-  Check if RX thread, distributor or event rx adapter? these may be
+   processing less than required
+-  Is the application is build using processing pipeline with RX stage? If
+   there are multiple port-pair tied to a single RX core, try to debug by
+   using rte_prefetch_non_temporal(). This will intimate the mbuf in cache
+   is temporary.
+
+Are there packet drops (receive|transmit)?
+~~
+
+RX-TX Port and associated cores :numref:`dtg_rx_tx_drop`.
+
+.. _dtg_rx_tx_drop:
+
+.. figure:: img/dtg_rx_tx_drop.*
+
+   RX-TX drops
+
+#. At RX
+-  Get RX queue count? nb_rx_queues using rte_eth_dev_info_get()
+-  Are there miss, errors, qerros? rte_eth_dev_stats() for imissed,
+   ierrors, q_erros, rx_nombuf, rte_mbuf_ref_count
+
+#. At TX
+-  Are you doing in bulk TX? check application for TX descriptor overhead.
+-  Are there TX errors? rte_eth_dev_stats() for oerrors and qerros
+-  Is specific scenarios not releasing mbuf? check rte_mbuf_ref_count of
+   those packets.
+-  Is the packet multi segmented? Check if port and queue offload is set.
+
+Are there object drops in producer point for ring?
+~~
+
+Producer point for ring :numref:`dtg_producer_ring`.
+
+.. _dtg_producer_ring:
+
+.. figure:: img/dtg_producer_ring.*
+
+   Producer point for Rings
+
+#. Performance for Producer
+-  Fetch the type of RING 'rte_ring_dump()' for flags (RING_F_SP_ENQ)
+-  If '(burst enqueue - actual enqueue) > 0' 

[dpdk-dev] [PATCH v5 1/2] doc: add svg for debug and troubleshoot guide

2019-01-20 Thread Vipin Varghese
Add svg for debug and troubleshoot guide for single or multi stage
applications.

Signed-off-by: Vipin Varghese 
Acked-by: Marko Kovacevic 
---
 doc/guides/howto/img/dtg_consumer_ring.svg|  19 
 doc/guides/howto/img/dtg_crypto.svg   |  16 +++
 .../howto/img/dtg_distributor_worker.svg  |  31 ++
 doc/guides/howto/img/dtg_mempool.svg  |  22 
 doc/guides/howto/img/dtg_pdump.svg|  28 +
 doc/guides/howto/img/dtg_producer_ring.svg|  19 
 doc/guides/howto/img/dtg_qos_tx.svg   |  24 
 doc/guides/howto/img/dtg_rx_rate.svg  |  20 
 doc/guides/howto/img/dtg_rx_tx_drop.svg   |  28 +
 doc/guides/howto/img/dtg_sample_app_model.svg | 105 ++
 doc/guides/howto/img/dtg_service.svg  |  15 +++
 11 files changed, 327 insertions(+)
 create mode 100644 doc/guides/howto/img/dtg_consumer_ring.svg
 create mode 100644 doc/guides/howto/img/dtg_crypto.svg
 create mode 100644 doc/guides/howto/img/dtg_distributor_worker.svg
 create mode 100644 doc/guides/howto/img/dtg_mempool.svg
 create mode 100644 doc/guides/howto/img/dtg_pdump.svg
 create mode 100644 doc/guides/howto/img/dtg_producer_ring.svg
 create mode 100644 doc/guides/howto/img/dtg_qos_tx.svg
 create mode 100644 doc/guides/howto/img/dtg_rx_rate.svg
 create mode 100644 doc/guides/howto/img/dtg_rx_tx_drop.svg
 create mode 100644 doc/guides/howto/img/dtg_sample_app_model.svg
 create mode 100644 doc/guides/howto/img/dtg_service.svg

diff --git a/doc/guides/howto/img/dtg_consumer_ring.svg 
b/doc/guides/howto/img/dtg_consumer_ring.svg
new file mode 100644
index 0..d0e0b30f8
--- /dev/null
+++ b/doc/guides/howto/img/dtg_consumer_ring.svg
@@ -0,0 +1,19 @@
+http://www.w3.org/2000/svg";>
+ 
+  consumer ring
+  
+ 
+ 
+  Layer 1
+  
+  
+  
+  Stage 
1
+  Stage 
2
+  Stage 
3
+  
+  
+  
+  
+ 
+
diff --git a/doc/guides/howto/img/dtg_crypto.svg 
b/doc/guides/howto/img/dtg_crypto.svg
new file mode 100644
index 0..7687aaa4a
--- /dev/null
+++ b/doc/guides/howto/img/dtg_crypto.svg
@@ -0,0 +1,16 @@
+http://www.w3.org/2000/svg";>
+ 
+  crypto
+  
+ 
+ 
+  Layer 1
+  
+  Core 7
+  
+  CRYPTO PMD
+  
+  Device
+  
+ 
+
diff --git a/doc/guides/howto/img/dtg_distributor_worker.svg 
b/doc/guides/howto/img/dtg_distributor_worker.svg
new file mode 100644
index 0..3df758fa6
--- /dev/null
+++ b/doc/guides/howto/img/dtg_distributor_worker.svg
@@ -0,0 +1,31 @@
+http://www.w3.org/2000/svg";>
+ 
+  dsitributor and worker
+  
+ 
+ 
+  Layer 1
+  
+  PKT 
classify
+  Distribute
+  
+  
+  
+  
+  
+  worker 1
+  worker 2
+  worker 3
+  worker 4
+  core 
1
+  core 
2,3,4,5
+ 
+
diff --git a/doc/guides/howto/img/dtg_mempool.svg 
b/doc/guides/howto/img/dtg_mempool.svg
new file mode 100644
index 0..f3d31a96e
--- /dev/null
+++ b/doc/guides/howto/img/dtg_mempool.svg
@@ -0,0 +1,22 @@
+http://www.w3.org/2000/svg";>
+ 
+  mempool
+  
+ 
+ 
+  Layer 1
+  
+  
+  MBUF pool
+  
+  
+  
+  
+  
+  Payload
+  
+  Metadata
+  
+  struct 
mbuf
+ 
+
diff --git a/doc/guides/howto/img/dtg_pdump.svg 
b/doc/guides/howto/img/dtg_pdump.svg
new file mode 100644
index 0..1dc63bed7
--- /dev/null
+++ b/doc/guides/howto/img/dtg_pdump.svg
@@ -0,0 +1,28 @@
+http://www.w3.org/2000/svg";>
+ 
+  pdump
+  
+ 
+ 
+  Layer 1
+  
+  
+  
+  
+  
+  RX
+  TX
+  Q1
+  Q2
+  Q4
+  Q3
+  Primary
+  
+  Secondary
+  
+  
+  Ring 
BufferQ
+  
+  Core 0
+ 
+
diff --git a/doc/guides/howto/img/dtg_producer_ring.svg 
b/doc/guides/howto/img/dtg_producer_ring.svg
new file mode 100644
index 0..5657702e5
--- /dev/null
+++ b/doc/guides/howto/img/dtg_producer_ring.svg
@@ -0,0 +1,19 @@
+http://www.w3.org/2000/svg";>
+ 
+  producer ring
+  
+ 
+ 
+  Layer 1
+  
+  
+  
+  Stage 
1
+  Stage 
2
+  Stage 
3
+  
+  
+  
+  
+ 
+
diff --git a/doc/guides/howto/img/dtg_qos_tx.svg 
b/doc/guides/howto/img/dtg_qos_tx.svg
new file mode 100644
index 0..6e46d188a
--- /dev/null
+++ b/doc/guides/howto/img/dtg_qos_tx.svg
@@ -0,0 +1,24 @@
+http://www.w3.org/2000/svg";>
+ 
+  qos
+  
+  
+   
+  
+ 
+ 
+  Layer 1
+  
+  
+  
+  
+  TX
+  Core1
+  NIC1
+  NIC2
+  NIC3
+  
+  QoS
+  core 
10
+ 
+
diff --git a/doc/guides/howto/img/dtg_rx_rate.svg 
b/doc/guides/howto/img/dtg_rx_rate.svg
new file mode 100644
index 0..311c9c43f
--- /dev/null
+++ b/doc/guides/howto/img/dtg_rx_rate.svg
@@ -0,0 +1,20 @@
+http://www.w3.org/2000/svg";>
+ 
+  rx rate
+  
+  
+   
+  
+ 
+ 
+  Layer 1
+  
+  
+  
+  RX
+  Core0
+  NIC1
+  NIC2
+  NIC3
+ 
+
diff --git a/doc/guides/howto/img/dtg_rx_tx_drop.svg 
b/doc/guides/howto/img/dtg_rx_tx_drop.svg
new file mode 100644
index 0..2f4e9d587
--- /dev/null
+++ b/doc/guides/howto/img/dtg_rx_tx_drop.svg
@@ -0,0 +1,28 @@
+http://www.w3.org/2000/svg";>
+ 
+  rx-tx drops
+  
+  
+   
+  
+ 
+ 
+  Layer 1
+  
+  
+  
+  RX
+  Core0
+  NIC1
+  NIC2
+  NIC3
+  
+  
+  
+  TX
+  Core1
+  NIC1
+  NIC2
+  NIC3
+ 
+
diff --git a/doc/guides/howto/img/dtg_sample_app_model.svg 
b/doc/guides/howto

[dpdk-dev] [Bug 194] vhost pmd has become unusable from secondary processes.

2019-01-20 Thread bugzilla
https://bugs.dpdk.org/show_bug.cgi?id=194

Bug ID: 194
   Summary: vhost pmd has become unusable from secondary
processes.
   Product: DPDK
   Version: 18.11
  Hardware: All
OS: All
Status: CONFIRMED
  Severity: critical
  Priority: Normal
 Component: vhost/virtio
  Assignee: dev@dpdk.org
  Reporter: o...@valinux.co.jp
  Target Milestone: ---

This problem was discovered when trying to migrate the base of
SPP(http://git.dpdk.org/apps/spp/) from DPDK v18.08 to v18.11.
In SPP, secondary processes attach (rte_eal_hotplug_add) and use vhost pmd (ex.
devargs: "eth_vhost0,iface=/tmp/sock0,queues=1,client=1").
It was no problem under DPDK v18.08 but secondary processes crash under v18.11.

As a result of some investigations, it was found that the direct cause of crash
is because no value is set (i.e. null pointer) for [rt]x_pkt_burst member of
rte_eth_dev of vhost.
Certainly there is no place to set on the code.
(Is this comment related to something?
https://github.com/DPDK/dpdk/blob/master/drivers/net/vhost/rte_eth_vhost.c#L1352
)

In addition, even if the value is set, it will not work.
This is because eth_vhost_[rt]x refers to vid which is the index of
vhsot_devices
(https://github.com/DPDK/dpdk/blob/master/lib/librte_vhost/vhost.c#L28).
vhost_devices is per process data (i.e. not shared data) and the primary
process only uses vhost_devices under v18.11 (unlike v18.08) and it is not
accessed from 
secondary processes.
Perhaps some fix, such as making vhost_devices a shared data, is necessary.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[dpdk-dev] [PATCH v2] gso: fix VxLAN/GRE tunnel checks

2019-01-20 Thread Andrew Rybchenko
Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
As the result, for example, IPIP or MPLSinUDP tunnel packets may be
incorrected treated internally as VXLAN.

Fixes: b058d92ea95d ("gso: support VxLAN GSO")
Fixes: 70e737e448c7 ("gso: support GRE GSO")
Cc: sta...@dpdk.org

Signed-off-by: Andrew Rybchenko 
---
 lib/librte_gso/gso_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
index 6cd764ff5..b6ff1b886 100644
--- a/lib/librte_gso/gso_common.h
+++ b/lib/librte_gso/gso_common.h
@@ -22,12 +22,12 @@
(PKT_TX_TCP_SEG | PKT_TX_IPV4))
 
 #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
-   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_VXLAN)) == \
+   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
 PKT_TX_TUNNEL_VXLAN))
 
 #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
-   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_GRE)) == \
+   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
 PKT_TX_TUNNEL_GRE))
 
-- 
2.17.1



Re: [dpdk-dev] [PATCH v2] gso: fix VxLAN/GRE tunnel checks

2019-01-20 Thread Hu, Jiayu


> -Original Message-
> From: Andrew Rybchenko [mailto:arybche...@solarflare.com]
> Sent: Monday, January 21, 2019 2:28 PM
> To: Hu, Jiayu 
> Cc: dev@dpdk.org; sta...@dpdk.org
> Subject: [PATCH v2] gso: fix VxLAN/GRE tunnel checks
> 
> Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
> As the result, for example, IPIP or MPLSinUDP tunnel packets may be
> incorrected treated internally as VXLAN.

There is a typo: 'incorrected' -> 'incorrectly'.

Thanks,
Jiayu
> 
> Fixes: b058d92ea95d ("gso: support VxLAN GSO")
> Fixes: 70e737e448c7 ("gso: support GRE GSO")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Andrew Rybchenko 
> ---
>  lib/librte_gso/gso_common.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
> index 6cd764ff5..b6ff1b886 100644
> --- a/lib/librte_gso/gso_common.h
> +++ b/lib/librte_gso/gso_common.h
> @@ -22,12 +22,12 @@
>   (PKT_TX_TCP_SEG | PKT_TX_IPV4))
> 
>  #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |
> PKT_TX_IPV4 | \
> - PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_VXLAN)) == \
> + PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_MASK)) == \
>   (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
> \
>PKT_TX_TUNNEL_VXLAN))
> 
>  #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |
> PKT_TX_IPV4 | \
> - PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_GRE)) == \
> + PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_MASK)) == \
>   (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
> \
>PKT_TX_TUNNEL_GRE))
> 
> --
> 2.17.1



[dpdk-dev] [PATCH v3] gso: fix VxLAN/GRE tunnel checks

2019-01-20 Thread Andrew Rybchenko
Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
As the result, for example, IPIP or MPLSinUDP tunnel packets may be
incorrectly treated internally as VXLAN.

Fixes: b058d92ea95d ("gso: support VxLAN GSO")
Fixes: 70e737e448c7 ("gso: support GRE GSO")
Cc: sta...@dpdk.org

Signed-off-by: Andrew Rybchenko 
---
 lib/librte_gso/gso_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
index 6cd764ff5..b6ff1b886 100644
--- a/lib/librte_gso/gso_common.h
+++ b/lib/librte_gso/gso_common.h
@@ -22,12 +22,12 @@
(PKT_TX_TCP_SEG | PKT_TX_IPV4))
 
 #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
-   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_VXLAN)) == \
+   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
 PKT_TX_TUNNEL_VXLAN))
 
 #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG | PKT_TX_IPV4 | \
-   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_GRE)) == \
+   PKT_TX_OUTER_IPV4 | PKT_TX_TUNNEL_MASK)) == \
(PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 | \
 PKT_TX_TUNNEL_GRE))
 
-- 
2.17.1



Re: [dpdk-dev] [PATCH v3] gso: fix VxLAN/GRE tunnel checks

2019-01-20 Thread Hu, Jiayu


> -Original Message-
> From: Andrew Rybchenko [mailto:arybche...@solarflare.com]
> Sent: Monday, January 21, 2019 2:43 PM
> To: Hu, Jiayu 
> Cc: dev@dpdk.org; sta...@dpdk.org
> Subject: [PATCH v3] gso: fix VxLAN/GRE tunnel checks
> 
> Tunnel type is an enum in PKT_TX_TUNNEL_MASK bits.
> As the result, for example, IPIP or MPLSinUDP tunnel packets may be
> incorrectly treated internally as VXLAN.
> 
> Fixes: b058d92ea95d ("gso: support VxLAN GSO")
> Fixes: 70e737e448c7 ("gso: support GRE GSO")
> Cc: sta...@dpdk.org
> 
> Signed-off-by: Andrew Rybchenko 
> ---
>  lib/librte_gso/gso_common.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_gso/gso_common.h b/lib/librte_gso/gso_common.h
> index 6cd764ff5..b6ff1b886 100644
> --- a/lib/librte_gso/gso_common.h
> +++ b/lib/librte_gso/gso_common.h
> @@ -22,12 +22,12 @@
>   (PKT_TX_TCP_SEG | PKT_TX_IPV4))
> 
>  #define IS_IPV4_VXLAN_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |
> PKT_TX_IPV4 | \
> - PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_VXLAN)) == \
> + PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_MASK)) == \
>   (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
> \
>PKT_TX_TUNNEL_VXLAN))
> 
>  #define IS_IPV4_GRE_TCP4(flag) (((flag) & (PKT_TX_TCP_SEG |
> PKT_TX_IPV4 | \
> - PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_GRE)) == \
> + PKT_TX_OUTER_IPV4 |
> PKT_TX_TUNNEL_MASK)) == \
>   (PKT_TX_TCP_SEG | PKT_TX_IPV4 | PKT_TX_OUTER_IPV4 |
> \
>PKT_TX_TUNNEL_GRE))
> 
> --
> 2.17.1

Acked-by: Jiayu Hu 


Re: [dpdk-dev] [PATCH] net/mlx4: fix creation of flow rule w/o ETH spec

2019-01-20 Thread Shahaf Shuler
Thursday, January 17, 2019 2:12 PM, Dekel Peled:
> Subject: [dpdk-dev] [PATCH] net/mlx4: fix creation of flow rule w/o ETH spec
> 
> The original commit enabled the creation of flow rule with empty ETH
> address and with specific VLAN.
> It works fine on PF, but such flow rule is still rejected on VF due to kernel
> limitation, which blocks MAC address of all zeroes.
> 
> This patch complements the original commit.
> It sets byte 0 of MAC address to 0xFF.
> 
> Fixes: c0d239263156 ("net/mlx4: support flow w/o ETH spec and with VLAN")
> Cc: dek...@mellanox.com
> 
> Signed-off-by: Dekel Peled 

Applied to next-net-mlx, thanks.