DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size though --txpkts
@ 2016-08-26 11:46 maciej.czekaj
  2016-09-21 23:00 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: maciej.czekaj @ 2016-08-26 11:46 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch, Maciej Czekaj

From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

	"flowgen" forwarding mode has fixed packet size (300).
	Let it re-use --txpkts option for specifying generated packet size.

Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
---
 app/test-pmd/config.c                       | 2 +-
 app/test-pmd/flowgen.c                      | 3 +--
 app/test-pmd/parameters.c                   | 3 ++-
 doc/guides/testpmd_app_ug/run_app.rst       | 3 ++-
 doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index bfcbff9..db682bd 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -954,7 +954,7 @@ rxtx_config_display(void)
 	       rx_mode.hw_strip_crc ? "enabled" : "disabled",
 	       nb_pkt_per_burst);
 
-	if (cur_fwd_eng == &tx_only_engine)
+	if (cur_fwd_eng == &tx_only_engine || cur_fwd_eng == &flow_gen_engine)
 		printf("  packet len=%u - nb packet segments=%d\n",
 				(unsigned)tx_pkt_length, (int) tx_pkt_nb_segs);
 
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index a6abe91..e6b1ea2 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -74,7 +74,6 @@
 
 /* hardcoded configuration (for now) */
 static unsigned cfg_n_flows	= 1024;
-static unsigned cfg_pkt_size	= 300;
 static uint32_t cfg_ip_src	= IPv4(10, 254, 0, 0);
 static uint32_t cfg_ip_dst	= IPv4(10, 253, 0, 0);
 static uint16_t cfg_udp_src	= 1000;
@@ -118,7 +117,7 @@ ip_sum(const unaligned_uint16_t *hdr, int hdr_len)
 static void
 pkt_burst_flow_gen(struct fwd_stream *fs)
 {
-	unsigned pkt_size = cfg_pkt_size - 4;	/* Adjust FCS */
+	unsigned pkt_size = tx_pkt_length - 4;	/* Adjust FCS */
 	struct rte_mbuf  *pkts_burst[MAX_PKT_BURST];
 	struct rte_mempool *mbp;
 	struct rte_mbuf  *pkt;
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 8792c2c..c498b4b 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -191,7 +191,8 @@ usage(char* progname)
 	       "(0 <= mapping <= %d).\n", RTE_ETHDEV_QUEUE_STAT_CNTRS - 1);
 	printf("  --no-flush-rx: Don't flush RX streams before forwarding."
 	       " Used mainly with PCAP drivers.\n");
-	printf("  --txpkts=X[,Y]*: set TX segment sizes.\n");
+	printf("  --txpkts=X[,Y]*: set TX segment sizes"
+		" or total packet length.\n");
 	printf("  --disable-link-check: disable check on link status when "
 	       "starting/stopping ports.\n");
 }
diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst
index 7712bd2..34bf924 100644
--- a/doc/guides/testpmd_app_ug/run_app.rst
+++ b/doc/guides/testpmd_app_ug/run_app.rst
@@ -450,7 +450,8 @@ The commandline options are:
 
 *   ``--txpkts=X[,Y]``
 
-    Set TX segment sizes.
+    Set TX segment sizes or total packet length. Valid for ``tx-only``
+    and ``flowgen`` forwarding modes.
 
 *   ``--disable-link-check``
 
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index f87e0c2..c1868e6 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -405,7 +405,7 @@ When retry is enabled, the transmit delay time and number of retries can also be
 set txpkts
 ~~~~~~~~~~
 
-Set the length of each segment of the TX-ONLY packets::
+Set the length of each segment of the TX-ONLY packets or length of packet for FLOWGEN mode::
 
    testpmd> set txpkts (x[,y]*)
 
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size though --txpkts
  2016-08-26 11:46 [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size though --txpkts maciej.czekaj
@ 2016-09-21 23:00 ` De Lara Guarch, Pablo
  2016-10-13 15:24   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2016-09-21 23:00 UTC (permalink / raw)
  To: maciej.czekaj, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of
> maciej.czekaj@caviumnetworks.com
> Sent: Friday, August 26, 2016 4:47 AM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo; Maciej Czekaj
> Subject: [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size
> though --txpkts
> 
> From: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> 
> 	"flowgen" forwarding mode has fixed packet size (300).
> 	Let it re-use --txpkts option for specifying generated packet size.
> 
> Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>

Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size though --txpkts
  2016-09-21 23:00 ` De Lara Guarch, Pablo
@ 2016-10-13 15:24   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-10-13 15:24 UTC (permalink / raw)
  To: maciej.czekaj; +Cc: dev, De Lara Guarch, Pablo

> > 	"flowgen" forwarding mode has fixed packet size (300).
> > 	Let it re-use --txpkts option for specifying generated packet size.
> > 
> > Signed-off-by: Maciej Czekaj <maciej.czekaj@caviumnetworks.com>
> 
> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-10-13 15:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 11:46 [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size though --txpkts maciej.czekaj
2016-09-21 23:00 ` De Lara Guarch, Pablo
2016-10-13 15:24   ` Thomas Monjalon

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).