From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0043.outbound.protection.outlook.com [104.47.40.43]) by dpdk.org (Postfix) with ESMTP id 14D0B5A56 for ; Fri, 26 Aug 2016 13:47:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=OA1fx5V06X1G/1lolmgG4Au7rJm931QUze6L4Y/5Gxg=; b=Aqwo7QDH67Nvmxo3ubTwXuKDzNMZuf9UUwO/yKf945+8SOSVOJ6WZhesfRYqTuIM4J8VGR58VUdezvF+rct/1E0MyTDOsCkp+BOui2+7kVICBkXPaLRvjUh6z1XqDmC+3l+pinD2rJAoiFWDjPDD40+vaZuQ+/mHdYnJ7+mJbOc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Maciej.Czekaj@cavium.com; Received: from mjc-pc.semihalf.local (31.172.191.173) by CY4PR07MB2885.namprd07.prod.outlook.com (10.169.252.139) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13; Fri, 26 Aug 2016 11:46:56 +0000 From: To: CC: , Maciej Czekaj Date: Fri, 26 Aug 2016 13:46:42 +0200 Message-ID: <1472212002-27020-1-git-send-email-maciej.czekaj@caviumnetworks.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [31.172.191.173] X-ClientProxiedBy: DB5PR03CA0010.eurprd03.prod.outlook.com (10.162.150.20) To CY4PR07MB2885.namprd07.prod.outlook.com (10.169.252.139) X-MS-Office365-Filtering-Correlation-Id: 1146185b-2515-43e4-dc6a-08d3cda6aed6 X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2885; 2:ejJjCVIZRxe8ULbSPxzqx84yzFxlr9ahiNBT1BByYO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dAijsltsaZjkPPUJCVRpPxZHFcqtBlMV4f101iMbq+d5s4qetXCrs3BkTuFFv9FyyKi5Zb8Q3/HcBPgdPXIpv5LepEFgd/0kDn8nHGTK1DkyzOFyDXum1EyHfMQ3aNTRmIHPPdKjphd4UkNCunjkOkVYH3U93D8UzktLv0LdPKqKrdOo6Uz75sqWdmpf1YzlUueo+ghxr8azZr4g+wDhIOUMCRIOZFhfJd3BqKn88z1IEam9Sg0xcyITQlCeS9QRRrMtZOwyuAmmL6p2fOsWgmmcyo85iqIMt6MPDmYJnPIBGoocdWiZhjyubLVddrqp/yuEU3dmkrw75VZJis7hhBR1u5bErvDeql0uWtsQRqfdZtKp2422Dmr/+cuZnSXxgrYND5tU3RSLc9gU0k2Iw2qWU4iO05YcFkSAISeaWWneDm4CGtshEBlDgdd4GKHQagZ+DHQVjxsLQjuH9jdn20cqjiFD79CPYCveUhRitADi96bX9Loh/QHts+3GF4nOdeBEhLbMFukTgLFL8BOpfQ4PKN78IUpOX1JcklV2Dagn1uAN5jUp9fYICvDi/sz7d6tKljSBxtiUol0P1PBk4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:CY4PR07MB2885; BCL:0; PCL:0; RULEID:; SRVR:CY4PR07MB2885; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2885; 4:QKkKFfNvni+TedpQMGVQFOfUfs39HqnE8MR+2cqLKfDGnMu+5Mx/082kRVHyG1j7P+kcX1L06JKcS4CRu0S/BopDLxd5s9adL0EuTtNXXmTZ/ahbcUNgVPRFy2Yl/zvFWNskIhDKDNBTnmVRlhNvhPJ7ywOUnPeaLjJ8Rxuqv1TnDNlcTt1ium7rJ/cnF51ojzwY5kD+dSgZaH05WuySbnHMoJgvhXSZTNyHWwK8drvJqWHsKxluleYRZn2NmkhN+0C2J3jK0mI9hb29r0SuPBZ5ZSOdHz4T+OOeel0gJF2Giv4Inmd5yKU2orq3MWXcbcKWgl/MeaYR2GE5VBo+vZ7XJ1U3g72gAUMbHwrQr4L3ZVzDaJC4PO6dvariPqc09YgIVPTX8Bpk/ZfwY6XIkw== X-Forefront-PRVS: 00462943DE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(199003)(189002)(50226002)(586003)(48376002)(86152002)(4001430100002)(5003940100001)(8676002)(36756003)(81156014)(575784001)(50466002)(66066001)(7846002)(7736002)(305945005)(81166006)(4326007)(68736007)(2906002)(106356001)(33646002)(2876002)(5660300001)(47776003)(50986999)(19580405001)(105586002)(101416001)(42186005)(6116002)(107886002)(92566002)(189998001)(77096005)(110136002)(3846002)(229853001)(19580395003)(97736004)(2351001)(16060500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB2885; H:mjc-pc.semihalf.local; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR07MB2885; 23:y4fh1iIunMlHIz7/9wRrmcw9IcqPNPkyp4agi8R0a?= =?us-ascii?Q?Bb4J9sXReglU1nLHmhxz0fhChhYvg2J/bNcktMQE/QzzNzCDcg0jBjz+eO0v?= =?us-ascii?Q?Z8xYGCxI+rAKyJIHs7qtk9T0xlIalARoIJ4lMsoCA4X0Ot74ZQKO73MemJJ1?= =?us-ascii?Q?qvfBUAVBYyT5m85cGGCWoQoanUm2DuyAOZygnoG0fanI+b0yqzs8ReBXTYvT?= =?us-ascii?Q?3lFl+upQAl034OI3vrmlB68AiildDWKat/YT4XiLkycKSF1UfeF1pZUfbZXN?= =?us-ascii?Q?Rxq7UkW4DrLM9fI2jAmD6vgSeCuAAL/Ks31wpLuloaWexPNaKRmxLs2gjaIR?= =?us-ascii?Q?JOqnqKXCKT+TZ6tTihBm7f7sSroeXPzESlkUwFYCeAu7XDwWiSL+NvWj2gDE?= =?us-ascii?Q?GmGhF22OshhyaOZhpZj4Vcm59+1ooMhUdHllgx8pr4Tnf/O7R/guIQsU1RuU?= =?us-ascii?Q?Nd973BiWsa9fW3BwfJjIpHzAKQLlRHqEpJaOdbjmq7lLNbVAScmTf45djFTu?= =?us-ascii?Q?Byx8TT/zObhIUtQwtDZ4Ywbl5cyrgPPOSz3/XyT7BtBKipcv9xY1rf6OLJFo?= =?us-ascii?Q?OeiRgzAvPAHPEG4XZ0fAWaN+3T/LfvMFatI9pXCZXaVgI51/n4jOALacBVXA?= =?us-ascii?Q?F8pY8SXvAdokYGSmFyoWS7YUK1wOiKEjvNPErAZXWQrO136HgbIZqlZtvdrn?= =?us-ascii?Q?42JJnFgOoOsgPoHtxdn+78sPh4FYRPikqfE4XITzP38D8DKh1DP155f+tOf2?= =?us-ascii?Q?o+J0EF+uSSaKQWmnRmpNWhaKRJkTEbqRHlhhIXP1K1+ApIpYzzCtMbV0V3QU?= =?us-ascii?Q?tMpHmA3LrdHLtNhuSDWzEytLpuynepq+ObrvCbkUVsQesBjBSvyD+7Nsqpcp?= =?us-ascii?Q?+Rys6YP9eLh0xA4YFMFEjiyNfbe2zG68yZeuXOywP77eqt4ACBGQzlQzCNGn?= =?us-ascii?Q?L0E0BXrUARiWY9eY1CQFWYgszrkd2zp3kst5JyubERX028g9iwIoApy5kAGo?= =?us-ascii?Q?Ikmj83rh9h/xq5rq/o37nxSGderspXYfCKTa3XQa2JND4MAgyWFY2RFo/Z3B?= =?us-ascii?Q?VcT0rcuQHdLaZbX5c+RDHfzfiD//LqqMCN5+jez/jlsqrAgVFa2dHZoKSnPD?= =?us-ascii?Q?k2mPghjUe5sz8rPAhByWGgCieWe4q5MyC/ZRN80ksrQ8JAyWvQECA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB2885; 6:Z1jbsiA0oUx0E+Mp/EOAvzyNQF8stEJkG33CPquEpyB8VzJnf6UTsaHV2xADar/3g02W6RcwTSNHKk1lXitvATpfeRcHIc9p62OS0HFZebXiZnD7kY3SRCb5vH9loNp2DTlhicoy70rKdrZwZ/RHfY/yvAAwcnNhY1kHm6XxapE+cWEEsb1fWo0CPc6tITfkKJ+t9SzHxE3fR0Yt3sU/TKbwjXpzoWvf7dIoyswlZnzb1fzee0k1hAqaiYmDnwbp/uHLVq4fIM0+XMztNe1OGB8F4wjMEGhrQPqnEXZRUJY=; 5:81WDSGZ8/PzQLgzQOKs9116PcbhdcRhcJaBIGWsZw4HavETnA17ReIIo1nKxQIvHqtW0hWUis7ZvmQpOmyUE5Woll3beDR3wUV0KQw/E2XYb2PegztR2mokq005GPp2viLeV5EOtFztsJlLyHrylbQ==; 24:inDfs47f3YPuKM67RYKGgRRzBlmNZzx+MEc1ebpwaX5Kd8+kNmZwxM8IjXY5H0t1MXKvnbPanH1qFTqQVDgGaLjnz9kVavQUMTA0kwbC1ds=; 7:McT+BJ6TuK1KjRrM0090U0RtP1XGYD5Qlh+6Y6wTAcxRwAJJqkNkK0VaXZ+IbUq25ivCbtJt2NEgWEwOMhXS4Q70VtNcIABZHqxYDDrCHp4UFA7WH6IaF41yeNkce3YMO+XL4fugMCC5IexaZ6W2omPDTD/px5QTMKVEtiGWk/151kweKtxYJlwXr5vIxYWjYMbFLomdvx+8CNoZVgUzAkXBHC3JMkiBBvMAchFULW803K8w548Ez+g0zW2CLpmM SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Aug 2016 11:46:56.2326 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB2885 Subject: [dpdk-dev] [PATCH] app/testpmd: configure flowgen packet size though --txpkts X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Aug 2016 11:47:00 -0000 From: Maciej Czekaj "flowgen" forwarding mode has fixed packet size (300). Let it re-use --txpkts option for specifying generated packet size. Signed-off-by: Maciej Czekaj --- 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