DPDK patches and discussions
 help / color / mirror / Atom feed
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Cc: jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com,
	david.hunt@intel.com
Subject: [dpdk-dev] [RFC 7/7] l2fwd: new parameter to set mbuf pool ops
Date: Mon, 19 Sep 2016 15:42:47 +0200	[thread overview]
Message-ID: <1474292567-21912-8-git-send-email-olivier.matz@6wind.com> (raw)
In-Reply-To: <1474292567-21912-1-git-send-email-olivier.matz@6wind.com>

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 examples/l2fwd/main.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/examples/l2fwd/main.c b/examples/l2fwd/main.c
index 028900b..dfa622f 100644
--- a/examples/l2fwd/main.c
+++ b/examples/l2fwd/main.c
@@ -138,6 +138,8 @@ struct l2fwd_port_statistics port_statistics[RTE_MAX_ETHPORTS];
 /* A tsc-based timer responsible for triggering statistics printout */
 static uint64_t timer_period = 10; /* default period is 10 seconds */
 
+static const char *mbuf_pool_ops; /**< mbuf pool handler */
+
 /* Print out statistics on packets dropped */
 static void
 print_stats(void)
@@ -382,15 +384,19 @@ static const char short_options[] =
 	"T:"  /* timer period */
 	;
 
+#define CMD_LINE_OPT_MBUF_POOL_OPS "mbuf-pool-ops"
+
 enum {
 	/* long options mapped to a short option */
 
 	/* first long only option value must be >= 256, so that we won't
 	 * conflict with short options */
 	CMD_LINE_OPT_MIN_NUM = 256,
+	CMD_LINE_OPT_MBUF_POOL_OPS_NUM,
 };
 
 static const struct option lgopts[] = {
+	{CMD_LINE_OPT_MBUF_POOL_OPS, 1, 0, CMD_LINE_OPT_MBUF_POOL_OPS_NUM},
 	{NULL, 0, 0, 0}
 };
 
@@ -440,6 +446,10 @@ l2fwd_parse_args(int argc, char **argv)
 			timer_period = timer_secs;
 			break;
 
+		case CMD_LINE_OPT_MBUF_POOL_OPS_NUM:
+			mbuf_pool_ops = strdup(optarg);
+			break;
+
 		default:
 			l2fwd_usage(prgname);
 			return -1;
-- 
2.8.1

  parent reply	other threads:[~2016-09-19 13:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 13:42 [dpdk-dev] [RFC 0/7] changing mbuf pool handler Olivier Matz
2016-09-19 13:42 ` [dpdk-dev] [RFC 1/7] mbuf: set the handler at mbuf pool creation Olivier Matz
2016-09-19 13:42 ` [dpdk-dev] [RFC 2/7] mbuf: use helper to create the pool Olivier Matz
2017-01-16 15:30   ` Santosh Shukla
2017-01-31 10:31     ` Olivier Matz
2016-09-19 13:42 ` [dpdk-dev] [RFC 3/7] testpmd: new parameter to set mbuf pool ops Olivier Matz
2016-09-19 13:42 ` [dpdk-dev] [RFC 4/7] l3fwd: rework long options parsing Olivier Matz
2016-09-19 13:42 ` [dpdk-dev] [RFC 5/7] l3fwd: new parameter to set mbuf pool ops Olivier Matz
2016-09-19 13:42 ` [dpdk-dev] [RFC 6/7] l2fwd: rework long options parsing Olivier Matz
2016-09-19 13:42 ` Olivier Matz [this message]
2016-09-22 11:52 ` [dpdk-dev] [RFC 0/7] changing mbuf pool handler Hemant Agrawal
2016-10-03 15:49   ` Olivier Matz
2016-10-05  9:41     ` Hunt, David
2016-10-05 11:49       ` Hemant Agrawal
2016-10-05 13:15         ` Hunt, David

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474292567-21912-8-git-send-email-olivier.matz@6wind.com \
    --to=olivier.matz@6wind.com \
    --cc=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).