app/testpmd: configure flowgen packet size with --txpkts
"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>
This commit is contained in:
parent
2a977b891f
commit
2ebacaa7d1
@ -953,7 +953,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);
|
||||
|
||||
|
@ -73,7 +73,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;
|
||||
@ -117,7 +116,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;
|
||||
|
@ -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");
|
||||
}
|
||||
|
@ -454,7 +454,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``
|
||||
|
||||
|
@ -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]*)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user