DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH v4 3/3] ipfrag: add unit test case
@ 2020-04-15 18:58 Pavan Nikhilesh Bhagavatula
  2020-04-16 12:45 ` Aaron Conole
  0 siblings, 1 reply; 5+ messages in thread
From: Pavan Nikhilesh Bhagavatula @ 2020-04-15 18:58 UTC (permalink / raw)
  To: Aaron Conole, dev
  Cc: Konstantin Ananyev, Bruce Richardson, David Marchand,
	Ferruh Yigit, Anatoly Burakov


>Initial IP fragmentation unit test.
>
>Signed-off-by: Aaron Conole <aconole@redhat.com>
>---
> MAINTAINERS            |   1 +
> app/test/meson.build   |   2 +
> app/test/test_ipfrag.c | 276
>+++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 279 insertions(+)
> create mode 100644 app/test/test_ipfrag.c
>
>diff --git a/MAINTAINERS b/MAINTAINERS
>index fe59f0224f..a77c7c17ce 100644
>--- a/MAINTAINERS
>+++ b/MAINTAINERS
>@@ -1228,6 +1228,7 @@ F: app/test/test_crc.c
> IP fragmentation & reassembly
> M: Konstantin Ananyev <konstantin.ananyev@intel.com>
> F: lib/librte_ip_frag/
>+F: app/test/test_ipfrag.c
> F: doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
> F: examples/ip_fragmentation/
> F: doc/guides/sample_app_ug/ip_frag.rst
>diff --git a/app/test/meson.build b/app/test/meson.build
>index 04b59cffa4..4b3c3852a2 100644
>--- a/app/test/meson.build
>+++ b/app/test/meson.build
>@@ -58,6 +58,7 @@ test_sources = files('commands.c',
> 	'test_hash_perf.c',
> 	'test_hash_readwrite_lf_perf.c',
> 	'test_interrupts.c',
>+        'test_ipfrag.c',
> 	'test_ipsec.c',
> 	'test_ipsec_sad.c',
> 	'test_kni.c',
>@@ -187,6 +188,7 @@ fast_tests = [
>         ['flow_classify_autotest', false],
>         ['hash_autotest', true],
>         ['interrupt_autotest', true],
>+        ['ipfrag_autotest', false],
>         ['logs_autotest', true],
>         ['lpm_autotest', true],
>         ['lpm6_autotest', true],
>diff --git a/app/test/test_ipfrag.c b/app/test/test_ipfrag.c
>new file mode 100644
>index 0000000000..6a13e334d5
>--- /dev/null
>+++ b/app/test/test_ipfrag.c
>@@ -0,0 +1,276 @@
>+/* SPDX-License-Identifier: BSD-3-Clause
>+ * Copyright(c) 2020 Red Hat, Inc.
>+ */
>+
>+#include <time.h>
>+
>+#include <rte_common.h>
>+#include <rte_cycles.h>
>+#include <rte_hexdump.h>
>+#include <rte_ip.h>
>+#include <rte_ip_frag.h>
>+#include <rte_mbuf.h>
>+#include <rte_memcpy.h>
>+#include <rte_random.h>
>+
>+#include "test.h"
>+
>+#ifndef ARRAY_SIZE
>+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
>+#endif

Please use RTE_DIM recently we had a major cleanup of ARRAY_SIZE across DPDK.

Thanks, 
Pavan.

>+
>+static struct rte_mempool *pkt_pool,
>+			  *direct_pool,
>+			  *indirect_pool;
>+


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH v3 0/4] ip_frag: add a unit test for fragmentation
@ 2020-04-01 18:39 Aaron Conole
  2020-04-15 17:25 ` [dpdk-dev] [PATCH v4 0/3] " Aaron Conole
  0 siblings, 1 reply; 5+ messages in thread
From: Aaron Conole @ 2020-04-01 18:39 UTC (permalink / raw)
  To: dev
  Cc: Konstantin Ananyev, Sunil Kumar Kori, Anatoly Burakov,
	Chas Williams, Bruce Richardson, David Marchand

This adds a simple unit test for the ip fragmentation library
and covers fragmenting ipv4 and ipv6.  Additionally, some fixes
are introduced, which are really just sanity rather than real
issues in the field.

v2->v3:
- Remove c99-ism from 4/4

v1->v2:
- Fix patch 4/4 which had a missing assignment for pktid.

Aaron Conole (4):
  ip_frag: ensure minimum v4 fragmentation length
  ip_frag: ensure minimum v6 fragmentation length
  ip_frag: ipv6 fragments must not be resubmitted to fragmentation
  ipfrag: add unit test case

 MAINTAINERS                                 |   1 +
 app/test/meson.build                        |   2 +
 app/test/test_ipfrag.c                      | 276 ++++++++++++++++++++
 lib/librte_ip_frag/rte_ipv4_fragmentation.c |   6 +
 lib/librte_ip_frag/rte_ipv6_fragmentation.c |  15 ++
 5 files changed, 300 insertions(+)
 create mode 100644 app/test/test_ipfrag.c

-- 
2.25.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-04-16 18:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15 18:58 [dpdk-dev] [PATCH v4 3/3] ipfrag: add unit test case Pavan Nikhilesh Bhagavatula
2020-04-16 12:45 ` Aaron Conole
  -- strict thread matches above, loose matches on Subject: below --
2020-04-01 18:39 [dpdk-dev] [PATCH v3 0/4] ip_frag: add a unit test for fragmentation Aaron Conole
2020-04-15 17:25 ` [dpdk-dev] [PATCH v4 0/3] " Aaron Conole
2020-04-15 17:25   ` [dpdk-dev] [PATCH v4 3/3] ipfrag: add unit test case Aaron Conole
2020-04-16 15:30     ` Lukasz Wojciechowski
2020-04-16 18:52       ` Aaron Conole

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).