Show a patch.

GET /api/patches/73537/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 73537,
    "url": "https://patches.dpdk.org/api/patches/73537/?format=api",
    "web_url": "https://patches.dpdk.org/patch/73537/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk"
    },
    "msgid": "<1594223249-24629-2-git-send-email-viacheslavo@mellanox.com>",
    "date": "2020-07-08T15:47:29",
    "name": "[v5,2/2] app/testpmd: add send scheduling test capability",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5a6bf78827f625a7030728fe974a04e569543b9d",
    "submitter": {
        "id": 1102,
        "url": "https://patches.dpdk.org/api/people/1102/?format=api",
        "name": "Slava Ovsiienko",
        "email": "viacheslavo@mellanox.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@intel.com"
    },
    "mbox": "https://patches.dpdk.org/patch/73537/mbox/",
    "series": [
        {
            "id": 10894,
            "url": "https://patches.dpdk.org/api/series/10894/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10894",
            "date": "2020-07-08T15:47:28",
            "name": "[v5,1/2] mbuf: introduce accurate packet Tx scheduling",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/10894/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/73537/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/73537/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "References": "<1591771085-24959-1-git-send-email-viacheslavo@mellanox.com>\n <1594223249-24629-1-git-send-email-viacheslavo@mellanox.com>",
        "X-Mailman-Version": "2.1.15",
        "Date": "Wed,  8 Jul 2020 15:47:29 +0000",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "X-BeenThere": "dev@dpdk.org",
        "Message-Id": "<1594223249-24629-2-git-send-email-viacheslavo@mellanox.com>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 053EEA0527;\n\tWed,  8 Jul 2020 17:47:43 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id E01BB1E4C8;\n\tWed,  8 Jul 2020 17:47:40 +0200 (CEST)",
            "from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129])\n by dpdk.org (Postfix) with ESMTP id EDB881E4C6\n for <dev@dpdk.org>; Wed,  8 Jul 2020 17:47:38 +0200 (CEST)",
            "from Internal Mail-Server by MTLPINE1 (envelope-from\n viacheslavo@mellanox.com) with SMTP; 8 Jul 2020 18:47:34 +0300",
            "from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx\n [10.210.17.40])\n by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 068FlYvW016184;\n Wed, 8 Jul 2020 18:47:34 +0300",
            "from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1])\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id 068FlYNl024689;\n Wed, 8 Jul 2020 15:47:34 GMT",
            "(from viacheslavo@localhost)\n by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id 068FlY1e024688;\n Wed, 8 Jul 2020 15:47:34 GMT"
        ],
        "List-Post": "<mailto:dev@dpdk.org>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>",
        "Subject": "[dpdk-dev] [PATCH v5 2/2] app/testpmd: add send scheduling test\n\tcapability",
        "Precedence": "list",
        "From": "Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "Errors-To": "dev-bounces@dpdk.org",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Cc": "matan@mellanox.com, rasland@mellanox.com, olivier.matz@6wind.com,\n bernard.iremonger@intel.com, thomas@monjalon.com, mb@smartsharesystems.com",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "In-Reply-To": "<1594223249-24629-1-git-send-email-viacheslavo@mellanox.com>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "X-Authentication-Warning": "pegasus12.mtr.labs.mlnx: viacheslavo set sender to\n viacheslavo@mellanox.com using -f",
        "To": "dev@dpdk.org"
    },
    "content": "This commit adds testpmd capability to provide timestamps on the packets\nbeing sent in the txonly mode. This includes:\n\n - SEND_ON_TIMESTAMP support\n   new device Tx offload capability support added, example:\n\n     testpmd> port config 0 tx_offload send_on_timestamp on\n\n - set txtimes, registers field and flag, example:\n\n     testpmd> set txtimes 1000000,0\n\n   This command enables the packet send scheduling on timestamps if\n   the first parameter is not zero, generic format:\n\n     testpmd> set txtimes (inter),(intra)\n\n   where:\n\n     inter - is the delay between the bursts in the device clock units.\n     intra - is the delay between the packets within the burst specified\n\t     in the device clock units\n\n     As the result the bursts of packet will be transmitted with\n     specific delay between the packets within the burst and specific\n     delay between the bursts. The rte_eth_get_clock() is supposed to be\n     engaged to get the current device clock value and provide\n     the reference for the timestamps.\n\n - show txtimes, displays the timing settings\n - txonly burst time pattern\n\nSigned-off-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>\n---\n app/test-pmd/cmdline.c                      | 59 ++++++++++++++++++++--\n app/test-pmd/config.c                       | 43 ++++++++++++++++\n app/test-pmd/testpmd.c                      |  3 ++\n app/test-pmd/testpmd.h                      |  3 ++\n app/test-pmd/txonly.c                       | 77 +++++++++++++++++++++++++++--\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 36 +++++++++++++-\n 6 files changed, 212 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 996a498..57e34a0 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -3926,6 +3926,52 @@ struct cmd_set_txsplit_result {\n \t},\n };\n \n+/* *** SET TIMES FOR TXONLY PACKETS SCHEDULING ON TIMESTAMPS *** */\n+\n+struct cmd_set_txtimes_result {\n+\tcmdline_fixed_string_t cmd_keyword;\n+\tcmdline_fixed_string_t txtimes;\n+\tcmdline_fixed_string_t tx_times;\n+};\n+\n+static void\n+cmd_set_txtimes_parsed(void *parsed_result,\n+\t\t       __rte_unused struct cmdline *cl,\n+\t\t       __rte_unused void *data)\n+{\n+\tstruct cmd_set_txtimes_result *res;\n+\tunsigned int tx_times[2] = {0, 0};\n+\tunsigned int n_times;\n+\n+\tres = parsed_result;\n+\tn_times = parse_item_list(res->tx_times, \"tx times\",\n+\t\t\t\t  2, tx_times, 0);\n+\tif (n_times == 2)\n+\t\tset_tx_pkt_times(tx_times);\n+}\n+\n+cmdline_parse_token_string_t cmd_set_txtimes_keyword =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_txtimes_result,\n+\t\t\t\t cmd_keyword, \"set\");\n+cmdline_parse_token_string_t cmd_set_txtimes_name =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_txtimes_result,\n+\t\t\t\t txtimes, \"txtimes\");\n+cmdline_parse_token_string_t cmd_set_txtimes_value =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_set_txtimes_result,\n+\t\t\t\t tx_times, NULL);\n+\n+cmdline_parse_inst_t cmd_set_txtimes = {\n+\t.f = cmd_set_txtimes_parsed,\n+\t.data = NULL,\n+\t.help_str = \"set txtimes <inter_burst>,<intra_burst>\",\n+\t.tokens = {\n+\t\t(void *)&cmd_set_txtimes_keyword,\n+\t\t(void *)&cmd_set_txtimes_name,\n+\t\t(void *)&cmd_set_txtimes_value,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** ADD/REMOVE ALL VLAN IDENTIFIERS TO/FROM A PORT VLAN RX FILTER *** */\n struct cmd_rx_vlan_filter_all_result {\n \tcmdline_fixed_string_t rx_vlan;\n@@ -7414,6 +7460,8 @@ static void cmd_showcfg_parsed(void *parsed_result,\n \t\tpkt_fwd_config_display(&cur_fwd_config);\n \telse if (!strcmp(res->what, \"txpkts\"))\n \t\tshow_tx_pkt_segments();\n+\telse if (!strcmp(res->what, \"txtimes\"))\n+\t\tshow_tx_pkt_times();\n }\n \n cmdline_parse_token_string_t cmd_showcfg_show =\n@@ -7422,12 +7470,12 @@ static void cmd_showcfg_parsed(void *parsed_result,\n \tTOKEN_STRING_INITIALIZER(struct cmd_showcfg_result, cfg, \"config\");\n cmdline_parse_token_string_t cmd_showcfg_what =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showcfg_result, what,\n-\t\t\t\t \"rxtx#cores#fwd#txpkts\");\n+\t\t\t\t \"rxtx#cores#fwd#txpkts#txtimes\");\n \n cmdline_parse_inst_t cmd_showcfg = {\n \t.f = cmd_showcfg_parsed,\n \t.data = NULL,\n-\t.help_str = \"show config rxtx|cores|fwd|txpkts\",\n+\t.help_str = \"show config rxtx|cores|fwd|txpkts|txtimes\",\n \t.tokens = {\n \t\t(void *)&cmd_showcfg_show,\n \t\t(void *)&cmd_showcfg_port,\n@@ -18662,7 +18710,8 @@ struct cmd_config_per_port_tx_offload_result {\n \t\t\t  \"sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#\"\n \t\t\t  \"qinq_insert#vxlan_tnl_tso#gre_tnl_tso#\"\n \t\t\t  \"ipip_tnl_tso#geneve_tnl_tso#macsec_insert#\"\n-\t\t\t  \"mt_lockfree#multi_segs#mbuf_fast_free#security\");\n+\t\t\t  \"mt_lockfree#multi_segs#mbuf_fast_free#security#\"\n+\t\t\t  \"send_on_timestamp\");\n cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_on_off =\n \tTOKEN_STRING_INITIALIZER\n \t\t(struct cmd_config_per_port_tx_offload_result,\n@@ -18747,7 +18796,8 @@ struct cmd_config_per_port_tx_offload_result {\n \t\t    \"sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|\"\n \t\t    \"qinq_insert|vxlan_tnl_tso|gre_tnl_tso|\"\n \t\t    \"ipip_tnl_tso|geneve_tnl_tso|macsec_insert|\"\n-\t\t    \"mt_lockfree|multi_segs|mbuf_fast_free|security on|off\",\n+\t\t    \"mt_lockfree|multi_segs|mbuf_fast_free|security|\"\n+\t\t    \"send_on_timestamp on|off\",\n \t.tokens = {\n \t\t(void *)&cmd_config_per_port_tx_offload_result_port,\n \t\t(void *)&cmd_config_per_port_tx_offload_result_config,\n@@ -19419,6 +19469,7 @@ struct cmd_showport_macs_result {\n \t(cmdline_parse_inst_t *)&cmd_set_log,\n \t(cmdline_parse_inst_t *)&cmd_set_txpkts,\n \t(cmdline_parse_inst_t *)&cmd_set_txsplit,\n+\t(cmdline_parse_inst_t *)&cmd_set_txtimes,\n \t(cmdline_parse_inst_t *)&cmd_set_fwd_list,\n \t(cmdline_parse_inst_t *)&cmd_set_fwd_mask,\n \t(cmdline_parse_inst_t *)&cmd_set_fwd_mode,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex a7112c9..1625978 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1027,6 +1027,15 @@ static int bus_match_all(const struct rte_bus *bus, const void *data)\n \t\t\tprintf(\"off\\n\");\n \t}\n \n+\tif (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP) {\n+\t\tprintf(\"Tx scheduling on timestamp:    \");\n+\t\tif (ports[port_id].dev_conf.txmode.offloads &\n+\t\t    DEV_TX_OFFLOAD_SEND_ON_TIMESTAMP)\n+\t\t\tprintf(\"on\\n\");\n+\t\telse\n+\t\t\tprintf(\"off\\n\");\n+\t}\n+\n }\n \n int\n@@ -2993,6 +3002,40 @@ struct igb_ring_desc_16_bytes {\n }\n \n void\n+show_tx_pkt_times(void)\n+{\n+\tprintf(\"Interburst gap: %u\\n\", tx_pkt_times[0]);\n+\tprintf(\"Intraburst gap: %u\\n\", tx_pkt_times[1]);\n+}\n+\n+void\n+set_tx_pkt_times(unsigned int *tx_times)\n+{\n+\tint offset;\n+\tint flag;\n+\n+\tstatic const struct rte_mbuf_dynfield desc_offs = {\n+\t\t.name = RTE_MBUF_DYNFIELD_TIMESTAMP_NAME,\n+\t\t.size = sizeof(uint64_t),\n+\t\t.align = __alignof__(uint64_t),\n+\t};\n+\tstatic const struct rte_mbuf_dynflag desc_flag = {\n+\t\t.name = RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME,\n+\t};\n+\n+\toffset = rte_mbuf_dynfield_register(&desc_offs);\n+\tif (offset < 0 && rte_errno != EEXIST)\n+\t\tprintf(\"Dynamic timestamp field registration error: %d\",\n+\t\t       rte_errno);\n+\tflag = rte_mbuf_dynflag_register(&desc_flag);\n+\tif (flag < 0 && rte_errno != EEXIST)\n+\t\tprintf(\"Dynamic timestamp flag registration error: %d\",\n+\t\t       rte_errno);\n+\ttx_pkt_times[0] = tx_times[0];\n+\ttx_pkt_times[1] = tx_times[1];\n+}\n+\n+void\n setup_gro(const char *onoff, portid_t port_id)\n {\n \tif (!rte_eth_dev_is_valid_port(port_id)) {\ndiff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c\nindex 4989d22..aab9a23 100644\n--- a/app/test-pmd/testpmd.c\n+++ b/app/test-pmd/testpmd.c\n@@ -223,6 +223,9 @@ struct fwd_engine * fwd_engines[] = {\n uint8_t txonly_multi_flow;\n /**< Whether multiple flows are generated in TXONLY mode. */\n \n+uint32_t tx_pkt_times[2];\n+/**< Timings for send scheduling in TXONLY mode. */\n+\n uint16_t nb_pkt_per_burst = DEF_PKT_BURST; /**< Number of packets per burst. */\n uint16_t mb_mempool_cache = DEF_MBUF_CACHE; /**< Size of mbuf mempool cache. */\n \ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex a803750..345ad1d 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -442,6 +442,7 @@ struct queue_stats_mappings {\n extern uint16_t tx_pkt_length; /**< Length of TXONLY packet */\n extern uint16_t tx_pkt_seg_lengths[RTE_MAX_SEGS_PER_PKT]; /**< Seg. lengths */\n extern uint8_t  tx_pkt_nb_segs; /**< Number of segments in TX packets */\n+extern uint32_t tx_pkt_times[2];\n \n enum tx_pkt_split {\n \tTX_PKT_SPLIT_OFF,\n@@ -794,6 +795,8 @@ void vlan_tpid_set(portid_t port_id, enum rte_vlan_type vlan_type,\n void set_verbose_level(uint16_t vb_level);\n void set_tx_pkt_segments(unsigned *seg_lengths, unsigned nb_segs);\n void show_tx_pkt_segments(void);\n+void set_tx_pkt_times(unsigned int *tx_times);\n+void show_tx_pkt_times(void);\n void set_tx_pkt_split(const char *name);\n void set_nb_pkt_per_burst(uint16_t pkt_burst);\n char *list_pkt_forwarding_modes(void);\ndiff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c\nindex 076ccaf..3d261cf 100644\n--- a/app/test-pmd/txonly.c\n+++ b/app/test-pmd/txonly.c\n@@ -53,6 +53,11 @@\n static struct rte_ipv4_hdr pkt_ip_hdr; /**< IP header of transmitted packets. */\n RTE_DEFINE_PER_LCORE(uint8_t, _ip_var); /**< IP address variation */\n static struct rte_udp_hdr pkt_udp_hdr; /**< UDP header of tx packets. */\n+RTE_DEFINE_PER_LCORE(uint64_t, ts_qskew); /**< Timestamp offset per queue */\n+static uint64_t ts_mask; /**< Timestamp dynamic flag mask */\n+static int32_t ts_off; /**< Timestamp dynamic field offset */\n+static bool ts_enable; /**< Timestamp enable */\n+static uint64_t ts_init[RTE_MAX_ETHPORTS];\n \n static void\n copy_buf_to_pkt_segs(void* buf, unsigned len, struct rte_mbuf *pkt,\n@@ -150,7 +155,8 @@\n static inline bool\n pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,\n \t\tstruct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci,\n-\t\tconst uint16_t vlan_tci_outer, const uint64_t ol_flags)\n+\t\tconst uint16_t vlan_tci_outer, const uint64_t ol_flags,\n+\t\tconst uint16_t idx, const struct fwd_stream *fs)\n {\n \tstruct rte_mbuf *pkt_segs[RTE_MAX_SEGS_PER_PKT];\n \tstruct rte_mbuf *pkt_seg;\n@@ -213,6 +219,50 @@\n \tcopy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,\n \t\t\tsizeof(struct rte_ether_hdr) +\n \t\t\tsizeof(struct rte_ipv4_hdr));\n+\tif (unlikely(ts_enable)) {\n+\t\tuint64_t skew = RTE_PER_LCORE(ts_qskew);\n+\t\tstruct {\n+\t\t\trte_be32_t signature;\n+\t\t\trte_be16_t pkt_idx;\n+\t\t\trte_be16_t queue_idx;\n+\t\t\trte_be64_t ts;\n+\t\t} ts_mark;\n+\n+\t\tif (unlikely(!skew)) {\n+\t\t\tstruct rte_eth_dev *dev = &rte_eth_devices[fs->tx_port];\n+\t\t\tunsigned int txqs_n = dev->data->nb_tx_queues;\n+\t\t\tuint64_t phase = tx_pkt_times[0] * fs->tx_queue /\n+\t\t\t\t\t (txqs_n ? txqs_n : 1);\n+\t\t\t/*\n+\t\t\t * Initialize the scheduling time phase shift\n+\t\t\t * depending on queue index.\n+\t\t\t */\n+\t\t\tskew = ts_init[fs->tx_port] + tx_pkt_times[0] + phase;\n+\t\t\tRTE_PER_LCORE(ts_qskew) = skew;\n+\t\t}\n+\t\tts_mark.pkt_idx = rte_cpu_to_be_16(idx);\n+\t\tts_mark.queue_idx = rte_cpu_to_be_16(fs->tx_queue);\n+\t\tts_mark.signature = rte_cpu_to_be_32(0xBEEFC0DE);\n+\t\tif (unlikely(!idx)) {\n+\t\t\tskew +=\ttx_pkt_times[0];\n+\t\t\tpkt->ol_flags |= ts_mask;\n+\t\t\t*RTE_MBUF_DYNFIELD(pkt, ts_off, uint64_t *) = skew;\n+\t\t\tRTE_PER_LCORE(ts_qskew) = skew;\n+\t\t\tts_mark.ts = rte_cpu_to_be_64(skew);\n+\t\t} else if (tx_pkt_times[1]) {\n+\t\t\tskew +=\ttx_pkt_times[1];\n+\t\t\tpkt->ol_flags |= ts_mask;\n+\t\t\t*RTE_MBUF_DYNFIELD(pkt, ts_off, uint64_t *) = skew;\n+\t\t\tRTE_PER_LCORE(ts_qskew) = skew;\n+\t\t\tts_mark.ts = rte_cpu_to_be_64(skew);\n+\t\t} else {\n+\t\t\tts_mark.ts = RTE_BE64(0);\n+\t\t}\n+\t\tcopy_buf_to_pkt(&ts_mark, sizeof(ts_mark), pkt,\n+\t\t\tsizeof(struct rte_ether_hdr) +\n+\t\t\tsizeof(struct rte_ipv4_hdr) +\n+\t\t\tsizeof(pkt_udp_hdr));\n+\t}\n \t/*\n \t * Complete first mbuf of packet and append it to the\n \t * burst of packets to be transmitted.\n@@ -275,7 +325,8 @@\n \t\t\tif (unlikely(!pkt_burst_prepare(pkts_burst[nb_pkt], mbp,\n \t\t\t\t\t\t\t&eth_hdr, vlan_tci,\n \t\t\t\t\t\t\tvlan_tci_outer,\n-\t\t\t\t\t\t\tol_flags))) {\n+\t\t\t\t\t\t\tol_flags,\n+\t\t\t\t\t\t\tnb_pkt, fs))) {\n \t\t\t\trte_mempool_put_bulk(mbp,\n \t\t\t\t\t\t(void **)&pkts_burst[nb_pkt],\n \t\t\t\t\t\tnb_pkt_per_burst - nb_pkt);\n@@ -290,7 +341,8 @@\n \t\t\tif (unlikely(!pkt_burst_prepare(pkt, mbp, &eth_hdr,\n \t\t\t\t\t\t\tvlan_tci,\n \t\t\t\t\t\t\tvlan_tci_outer,\n-\t\t\t\t\t\t\tol_flags))) {\n+\t\t\t\t\t\t\tol_flags,\n+\t\t\t\t\t\t\tnb_pkt, fs))) {\n \t\t\t\trte_pktmbuf_free(pkt);\n \t\t\t\tbreak;\n \t\t\t}\n@@ -302,6 +354,7 @@\n \t\treturn;\n \n \tnb_tx = rte_eth_tx_burst(fs->tx_port, fs->tx_queue, pkts_burst, nb_pkt);\n+\n \t/*\n \t * Retry if necessary\n \t */\n@@ -342,15 +395,31 @@\n }\n \n static void\n-tx_only_begin(__rte_unused portid_t pi)\n+tx_only_begin(portid_t pi)\n {\n \tuint16_t pkt_data_len;\n+\tint dynf;\n \n \tpkt_data_len = (uint16_t) (tx_pkt_length - (\n \t\t\t\t\tsizeof(struct rte_ether_hdr) +\n \t\t\t\t\tsizeof(struct rte_ipv4_hdr) +\n \t\t\t\t\tsizeof(struct rte_udp_hdr)));\n \tsetup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);\n+\n+\tts_enable = false;\n+\tts_mask = 0;\n+\tts_off = -1;\n+\tRTE_PER_LCORE(ts_qskew) = 0;\n+\tdynf = rte_mbuf_dynflag_lookup\n+\t\t\t\t(RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME, NULL);\n+\tif (dynf >= 0)\n+\t\tts_mask = 1ULL << dynf;\n+\tdynf = rte_mbuf_dynfield_lookup\n+\t\t\t\t(RTE_MBUF_DYNFIELD_TIMESTAMP_NAME, NULL);\n+\tif (dynf >= 0)\n+\t\tts_off = dynf;\n+\tts_enable = tx_pkt_times[0] && ts_mask && ts_off >= 0 &&\n+\t\t    !rte_eth_read_clock(pi, &ts_init[pi]);\n }\n \n struct fwd_engine tx_only_engine = {\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex a808b6a..00413cc 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -266,7 +266,7 @@ show config\n Displays the configuration of the application.\n The configuration comes from the command-line, the runtime or the application defaults::\n \n-   testpmd> show config (rxtx|cores|fwd|txpkts)\n+   testpmd> show config (rxtx|cores|fwd|txpkts|txtimes)\n \n The available information categories are:\n \n@@ -278,6 +278,8 @@ The available information categories are:\n \n * ``txpkts``: Packets to TX configuration.\n \n+* ``txtimes``: Burst time pattern for Tx only mode.\n+\n For example:\n \n .. code-block:: console\n@@ -725,6 +727,38 @@ Set the length of each segment of the TX-ONLY packets or length of packet for FL\n \n Where x[,y]* represents a CSV list of values, without white space.\n \n+set txtimes\n+~~~~~~~~~~\n+\n+Configure the timing burst pattern for Tx only mode. This command enables\n+the packet send scheduling on dynamic timestamp mbuf field and configures\n+timing pattern in Tx only mode. In this mode, if scheduling is enabled\n+application provides timestamps in the packets being sent. It is possible\n+to configure delay (in unspecified device clock units) between bursts\n+and between the packets within the burst::\n+\n+   testpmd> set txtimes (inter),(intra)\n+\n+where:\n+\n+* ``inter``  is the delay between the bursts in the device clock units.\n+  If ``intra`` is zero, this is the time between the beginnings of the\n+  first packets in the neighbour bursts, if ``intra`` is not zero,\n+  ``inter`` specifies the time between the beginning of the first packet\n+  of the current burst and the beginning of the last packet of the\n+  previous burst. If ``inter`` parameter is zero the send scheduling\n+  on timestamps is disabled (default).\n+\n+* ``intra`` is the delay between the packets within the burst specified\n+  in the device clock units. The number of packets in the burst is defined\n+  by regular burst setting. If ``intra`` parameter is zero no timestamps\n+  provided in the packets excepting  the first one in the burst.\n+\n+As the result the bursts of packet will be transmitted with specific\n+delays between the packets within the burst and specific delay between\n+the bursts. The rte_eth_get_clock() is supposed to be engaged to get the\n+current device clock value and provide the reference for the timestamps.\n+\n set txsplit\n ~~~~~~~~~~~\n \n",
    "prefixes": [
        "v5",
        "2/2"
    ]
}