[dpdk-dev] [PATCH v2 01/10] examples/l2fwd-event: add default poll mode routines
Sunil Kumar Kori
skori at marvell.com
Thu Sep 19 11:43:35 CEST 2019
Regards
Sunil Kumar Kori
>-----Original Message-----
>From: pbhagavatula at marvell.com <pbhagavatula at marvell.com>
>Sent: Thursday, September 19, 2019 2:56 PM
>To: Jerin Jacob Kollanukkaran <jerinj at marvell.com>;
>bruce.richardson at intel.com; akhil.goyal at nxp.com; Marko Kovacevic
><marko.kovacevic at intel.com>; Ori Kam <orika at mellanox.com>; Radu
>Nicolau <radu.nicolau at intel.com>; Tomasz Kantecki
><tomasz.kantecki at intel.com>; Sunil Kumar Kori <skori at marvell.com>; Pavan
>Nikhilesh Bhagavatula <pbhagavatula at marvell.com>
>Cc: dev at dpdk.org
>Subject: [dpdk-dev] [PATCH v2 01/10] examples/l2fwd-event: add default poll
>mode routines
>
>From: Sunil Kumar Kori <skori at marvell.com>
>
>Add the default l2fwd poll mode routines similar to examples/l2fwd.
>
>Signed-off-by: Sunil Kumar Kori <skori at marvell.com>
>---
> examples/Makefile | 1 +
> examples/l2fwd-event/Makefile | 57 +++
> examples/l2fwd-event/l2fwd_common.h | 26 +
> examples/l2fwd-event/main.c | 737 ++++++++++++++++++++++++++++
> examples/l2fwd-event/meson.build | 12 +
> examples/l2fwd/main.c | 10 +-
> 6 files changed, 838 insertions(+), 5 deletions(-) create mode 100644
>examples/l2fwd-event/Makefile create mode 100644 examples/l2fwd-
>event/l2fwd_common.h
> create mode 100644 examples/l2fwd-event/main.c create mode 100644
>examples/l2fwd-event/meson.build
>
>+++ b/examples/l2fwd-event/l2fwd_common.h
>@@ -0,0 +1,26 @@
>+/* SPDX-License-Identifier: BSD-3-Clause
>+ * Copyright(C) 2019 Marvell International Ltd.
>+ */
>+
>+#ifndef __L2FWD_COMMON_H__
>+#define __L2FWD_COMMON_H__
>+
>+#define MAX_PKT_BURST 32
>+#define MAX_RX_QUEUE_PER_LCORE 16
>+#define MAX_TX_QUEUE_PER_PORT 16
>+
>+#define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
>+
>+#define RTE_TEST_RX_DESC_DEFAULT 1024
>+#define RTE_TEST_TX_DESC_DEFAULT 1024
>+
>+/* Per-port statistics struct */
>+struct l2fwd_port_statistics {
>+ uint64_t dropped;
>+ uint64_t tx;
>+ uint64_t rx;
>+} __rte_cache_aligned;
>+
>+void print_stats(void);
>+
>+#endif /* __L2FWD_EVENTDEV_H__ */
Comment needs to be updated /* __L2FWD_COMMON_H__ */
>diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c index
>1e2b14297..f6d3d2cd7 100644
>--- a/examples/l2fwd/main.c
>+++ b/examples/l2fwd/main.c
>@@ -294,11 +294,11 @@ l2fwd_usage(const char *prgname)
> printf("%s [EAL options] -- -p PORTMASK [-q NQ]\n"
> " -p PORTMASK: hexadecimal bitmask of ports to configure\n"
> " -q NQ: number of queue (=ports) per lcore (default is 1)\n"
>- " -T PERIOD: statistics will be refreshed each PERIOD
>seconds (0 to disable, 10 default, 86400 maximum)\n"
>- " --[no-]mac-updating: Enable or disable MAC addresses
>updating (enabled by default)\n"
>- " When enabled:\n"
>- " - The source MAC address is replaced by the TX port
>MAC address\n"
>- " - The destination MAC address is replaced by
>02:00:00:00:00:TX_PORT_ID\n",
>+ " -T PERIOD: statistics will be refreshed each PERIOD seconds (0 to
>disable, 10 default, 86400 maximum)\n"
>+ " --[no-]mac-updating: Enable or disable MAC addresses updating
>(enabled by default)\n"
>+ " When enabled:\n"
>+ " - The source MAC address is replaced by the TX port MAC
>address\n"
>+ " - The destination MAC address is replaced by
>02:00:00:00:00:TX_PORT_ID\n",
> prgname);
> }
>
This change should not be part of l2fwd-event patch set.
>--
>2.17.1
More information about the dev
mailing list