" Right now only applicable for CSUM and TXONLY"
" modes\n\n"
+ "set txtimes (x, y)\n"
+ " Set the scheduling on timestamps"
+ " timings for the TXONLY mode\n\n"
+
"set corelist (x[,y]*)\n"
" Set the list of forwarding cores.\n\n"
"show port tm node stats (port_id) (node_id) (clear)\n"
" Display the port TM node stats.\n\n"
-#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED
- "set port tm hierarchy default (port_id)\n"
- " Set default traffic Management hierarchy on a port\n\n"
-#endif
-
"add port tm node shaper profile (port_id) (shaper_profile_id)"
" (cmit_tb_rate) (cmit_tb_size) (peak_tb_rate) (peak_tb_size)"
" (packet_length_adjust)\n"
rss_conf.rss_hf = ETH_RSS_GENEVE;
else if (!strcmp(res->value, "nvgre"))
rss_conf.rss_hf = ETH_RSS_NVGRE;
+ else if (!strcmp(res->value, "l3-pre32"))
+ rss_conf.rss_hf = RTE_ETH_RSS_L3_PRE32;
+ else if (!strcmp(res->value, "l3-pre40"))
+ rss_conf.rss_hf = RTE_ETH_RSS_L3_PRE40;
+ else if (!strcmp(res->value, "l3-pre48"))
+ rss_conf.rss_hf = RTE_ETH_RSS_L3_PRE48;
+ else if (!strcmp(res->value, "l3-pre56"))
+ rss_conf.rss_hf = RTE_ETH_RSS_L3_PRE56;
+ else if (!strcmp(res->value, "l3-pre64"))
+ rss_conf.rss_hf = RTE_ETH_RSS_L3_PRE64;
+ else if (!strcmp(res->value, "l3-pre96"))
+ rss_conf.rss_hf = RTE_ETH_RSS_L3_PRE96;
else if (!strcmp(res->value, "l3-src-only"))
rss_conf.rss_hf = ETH_RSS_L3_SRC_ONLY;
else if (!strcmp(res->value, "l3-dst-only"))
},
};
+/* *** SET TIMES FOR TXONLY PACKETS SCHEDULING ON TIMESTAMPS *** */
+
+struct cmd_set_txtimes_result {
+ cmdline_fixed_string_t cmd_keyword;
+ cmdline_fixed_string_t txtimes;
+ cmdline_fixed_string_t tx_times;
+};
+
+static void
+cmd_set_txtimes_parsed(void *parsed_result,
+ __rte_unused struct cmdline *cl,
+ __rte_unused void *data)
+{
+ struct cmd_set_txtimes_result *res;
+ unsigned int tx_times[2] = {0, 0};
+ unsigned int n_times;
+
+ res = parsed_result;
+ n_times = parse_item_list(res->tx_times, "tx times",
+ 2, tx_times, 0);
+ if (n_times == 2)
+ set_tx_pkt_times(tx_times);
+}
+
+cmdline_parse_token_string_t cmd_set_txtimes_keyword =
+ TOKEN_STRING_INITIALIZER(struct cmd_set_txtimes_result,
+ cmd_keyword, "set");
+cmdline_parse_token_string_t cmd_set_txtimes_name =
+ TOKEN_STRING_INITIALIZER(struct cmd_set_txtimes_result,
+ txtimes, "txtimes");
+cmdline_parse_token_string_t cmd_set_txtimes_value =
+ TOKEN_STRING_INITIALIZER(struct cmd_set_txtimes_result,
+ tx_times, NULL);
+
+cmdline_parse_inst_t cmd_set_txtimes = {
+ .f = cmd_set_txtimes_parsed,
+ .data = NULL,
+ .help_str = "set txtimes <inter_burst>,<intra_burst>",
+ .tokens = {
+ (void *)&cmd_set_txtimes_keyword,
+ (void *)&cmd_set_txtimes_name,
+ (void *)&cmd_set_txtimes_value,
+ NULL,
+ },
+};
+
/* *** ADD/REMOVE ALL VLAN IDENTIFIERS TO/FROM A PORT VLAN RX FILTER *** */
struct cmd_rx_vlan_filter_all_result {
cmdline_fixed_string_t rx_vlan;
pkt_fwd_config_display(&cur_fwd_config);
else if (!strcmp(res->what, "txpkts"))
show_tx_pkt_segments();
+ else if (!strcmp(res->what, "txtimes"))
+ show_tx_pkt_times();
}
cmdline_parse_token_string_t cmd_showcfg_show =
TOKEN_STRING_INITIALIZER(struct cmd_showcfg_result, cfg, "config");
cmdline_parse_token_string_t cmd_showcfg_what =
TOKEN_STRING_INITIALIZER(struct cmd_showcfg_result, what,
- "rxtx#cores#fwd#txpkts");
+ "rxtx#cores#fwd#txpkts#txtimes");
cmdline_parse_inst_t cmd_showcfg = {
.f = cmd_showcfg_parsed,
.data = NULL,
- .help_str = "show config rxtx|cores|fwd|txpkts",
+ .help_str = "show config rxtx|cores|fwd|txpkts|txtimes",
.tokens = {
(void *)&cmd_showcfg_show,
(void *)&cmd_showcfg_port,
},
};
-
-#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED
-
-/* *** Set Port default Traffic Management Hierarchy *** */
-struct cmd_set_port_tm_hierarchy_default_result {
- cmdline_fixed_string_t set;
- cmdline_fixed_string_t port;
- cmdline_fixed_string_t tm;
- cmdline_fixed_string_t hierarchy;
- cmdline_fixed_string_t def;
- portid_t port_id;
-};
-
-cmdline_parse_token_string_t cmd_set_port_tm_hierarchy_default_set =
- TOKEN_STRING_INITIALIZER(
- struct cmd_set_port_tm_hierarchy_default_result, set, "set");
-cmdline_parse_token_string_t cmd_set_port_tm_hierarchy_default_port =
- TOKEN_STRING_INITIALIZER(
- struct cmd_set_port_tm_hierarchy_default_result, port, "port");
-cmdline_parse_token_string_t cmd_set_port_tm_hierarchy_default_tm =
- TOKEN_STRING_INITIALIZER(
- struct cmd_set_port_tm_hierarchy_default_result, tm, "tm");
-cmdline_parse_token_string_t cmd_set_port_tm_hierarchy_default_hierarchy =
- TOKEN_STRING_INITIALIZER(
- struct cmd_set_port_tm_hierarchy_default_result,
- hierarchy, "hierarchy");
-cmdline_parse_token_string_t cmd_set_port_tm_hierarchy_default_default =
- TOKEN_STRING_INITIALIZER(
- struct cmd_set_port_tm_hierarchy_default_result,
- def, "default");
-cmdline_parse_token_num_t cmd_set_port_tm_hierarchy_default_port_id =
- TOKEN_NUM_INITIALIZER(
- struct cmd_set_port_tm_hierarchy_default_result,
- port_id, UINT16);
-
-static void cmd_set_port_tm_hierarchy_default_parsed(void *parsed_result,
- __rte_unused struct cmdline *cl,
- __rte_unused void *data)
-{
- struct cmd_set_port_tm_hierarchy_default_result *res = parsed_result;
- struct rte_port *p;
- portid_t port_id = res->port_id;
-
- if (port_id_is_invalid(port_id, ENABLED_WARN))
- return;
-
- p = &ports[port_id];
-
- /* Forward mode: tm */
- if (strcmp(cur_fwd_config.fwd_eng->fwd_mode_name, "softnic")) {
- printf(" softnicfwd mode not enabled(error)\n");
- return;
- }
-
- /* Set the default tm hierarchy */
- p->softport.default_tm_hierarchy_enable = 1;
-}
-
-cmdline_parse_inst_t cmd_set_port_tm_hierarchy_default = {
- .f = cmd_set_port_tm_hierarchy_default_parsed,
- .data = NULL,
- .help_str = "set port tm hierarchy default <port_id>",
- .tokens = {
- (void *)&cmd_set_port_tm_hierarchy_default_set,
- (void *)&cmd_set_port_tm_hierarchy_default_port,
- (void *)&cmd_set_port_tm_hierarchy_default_tm,
- (void *)&cmd_set_port_tm_hierarchy_default_hierarchy,
- (void *)&cmd_set_port_tm_hierarchy_default_default,
- (void *)&cmd_set_port_tm_hierarchy_default_port_id,
- NULL,
- },
-};
-#endif
-
/** Set VXLAN encapsulation details */
struct cmd_set_vxlan_result {
cmdline_fixed_string_t set;
"sctp_cksum#tcp_tso#udp_tso#outer_ipv4_cksum#"
"qinq_insert#vxlan_tnl_tso#gre_tnl_tso#"
"ipip_tnl_tso#geneve_tnl_tso#macsec_insert#"
- "mt_lockfree#multi_segs#mbuf_fast_free#security");
+ "mt_lockfree#multi_segs#mbuf_fast_free#security#"
+ "send_on_timestamp");
cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_on_off =
TOKEN_STRING_INITIALIZER
(struct cmd_config_per_port_tx_offload_result,
"sctp_cksum|tcp_tso|udp_tso|outer_ipv4_cksum|"
"qinq_insert|vxlan_tnl_tso|gre_tnl_tso|"
"ipip_tnl_tso|geneve_tnl_tso|macsec_insert|"
- "mt_lockfree|multi_segs|mbuf_fast_free|security on|off",
+ "mt_lockfree|multi_segs|mbuf_fast_free|security|"
+ "send_on_timestamp on|off",
.tokens = {
(void *)&cmd_config_per_port_tx_offload_result_port,
(void *)&cmd_config_per_port_tx_offload_result_config,
(cmdline_parse_inst_t *)&cmd_set_log,
(cmdline_parse_inst_t *)&cmd_set_txpkts,
(cmdline_parse_inst_t *)&cmd_set_txsplit,
+ (cmdline_parse_inst_t *)&cmd_set_txtimes,
(cmdline_parse_inst_t *)&cmd_set_fwd_list,
(cmdline_parse_inst_t *)&cmd_set_fwd_mask,
(cmdline_parse_inst_t *)&cmd_set_fwd_mode,
(cmdline_parse_inst_t *)&cmd_vf_tc_max_bw,
(cmdline_parse_inst_t *)&cmd_strict_link_prio,
(cmdline_parse_inst_t *)&cmd_tc_min_bw,
-#if defined RTE_LIBRTE_PMD_SOFTNIC && defined RTE_LIBRTE_SCHED
- (cmdline_parse_inst_t *)&cmd_set_port_tm_hierarchy_default,
-#endif
(cmdline_parse_inst_t *)&cmd_set_vxlan,
(cmdline_parse_inst_t *)&cmd_set_vxlan_tos_ttl,
(cmdline_parse_inst_t *)&cmd_set_vxlan_with_vlan,