DPDK patches and discussions
 help / color / mirror / Atom feed
From: Wei Dai <wei.dai@intel.com>
To: wenzhuo.lu@intel.com, jingjing.wu@intel.com
Cc: dev@dpdk.org, Wei Dai <wei.dai@intel.com>
Subject: [dpdk-dev] [PATCH 2/2] app/testpmd: add commands to test new Tx offload API
Date: Mon, 12 Mar 2018 16:15:43 +0800	[thread overview]
Message-ID: <1520842543-46810-3-git-send-email-wei.dai@intel.com> (raw)
In-Reply-To: <1520842543-46810-1-git-send-email-wei.dai@intel.com>

Add following testpmd run-time commands to support test of
new Tx offload API:
tx_offload get capability <port_id>
tx_offload get configuration <port_id>
tx_offload enable|disable per_port vlan_insert|udp_cksum... <port_id>
tx_offload enable|disable per_queue vlan_insert|udp_cksum... <port_id>
<queue_id>

Above last 2 commands should be run when the port is stopped.

Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 app/test-pmd/cmdline.c | 474 +++++++++++++++++++++++++++++++++++++++++++++++++
 app/test-pmd/testpmd.c |  13 +-
 app/test-pmd/testpmd.h |   1 +
 3 files changed, 486 insertions(+), 2 deletions(-)

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1a08b3d..dcc7638 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -16448,6 +16448,476 @@ cmdline_parse_inst_t cmd_config_per_queue_rx_offload = {
 	}
 };
 
+static const char * const tx_offload_names[] = {
+	"VLAN_INSERT",
+	"IPV4_CKSUM",
+	"UDP_CKSUM",
+	"TCP_CKSUM",
+	"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"
+};
+
+#define MAX_NUM_OF_TX_OFFLOADS	\
+	((int)(sizeof(tx_offload_names)/sizeof(tx_offload_names[0])))
+
+/* Get Tx offloads capability */
+struct cmd_tx_offload_get_capa_result {
+	cmdline_fixed_string_t tx_offload;
+	cmdline_fixed_string_t get;
+	cmdline_fixed_string_t capability;
+	portid_t port_id;
+};
+
+cmdline_parse_token_string_t cmd_tx_offload_get_capa_tx_offload =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_tx_offload_get_capa_result,
+		 tx_offload, "tx_offload");
+cmdline_parse_token_string_t cmd_tx_offload_get_capa_get =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_tx_offload_get_capa_result,
+		 get, "get");
+cmdline_parse_token_string_t cmd_tx_offload_get_capa_capability =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_tx_offload_get_capa_result,
+		 capability, "capability");
+cmdline_parse_token_num_t cmd_tx_offload_get_capa_port_id =
+	TOKEN_NUM_INITIALIZER
+		(struct cmd_tx_offload_get_capa_result,
+		 port_id, UINT16);
+
+static void
+cmd_tx_offload_get_capa_parsed(
+	void *parsed_result,
+	__attribute__((unused)) struct cmdline *cl,
+	__attribute__((unused)) void *data)
+{
+	struct cmd_tx_offload_get_capa_result *res = parsed_result;
+	struct rte_eth_dev_info dev_info;
+	portid_t port_id = res->port_id;
+	uint64_t queue_offloads;
+	uint64_t port_offloads;
+	uint64_t mask;
+	int k;
+
+	rte_eth_dev_info_get(port_id, &dev_info);
+	queue_offloads = dev_info.tx_queue_offload_capa;
+	port_offloads = dev_info.tx_offload_capa ^ queue_offloads;
+
+	printf("Tx Offloading Capabilities of port %d :\n", port_id);
+	printf("  Per Queue :");
+	mask = 1;
+	for (k = 0; k < MAX_NUM_OF_TX_OFFLOADS; k++) {
+		if (queue_offloads & mask)
+			printf(" %s", tx_offload_names[k]);
+		mask <<= 1;
+	}
+	printf("\n");
+	printf("  Per Port  :");
+	mask = 1;
+	for (k = 0; k < MAX_NUM_OF_TX_OFFLOADS; k++) {
+		if (port_offloads & mask)
+			printf(" %s", tx_offload_names[k]);
+		mask <<= 1;
+	}
+	printf("\n\n");
+}
+
+cmdline_parse_inst_t cmd_tx_offload_get_capa = {
+	.f = cmd_tx_offload_get_capa_parsed,
+	.data = NULL,
+	.help_str = "tx_offload get capability <port_id>",
+	.tokens = {
+		(void *)&cmd_tx_offload_get_capa_tx_offload,
+		(void *)&cmd_tx_offload_get_capa_get,
+		(void *)&cmd_tx_offload_get_capa_capability,
+		(void *)&cmd_tx_offload_get_capa_port_id,
+		NULL,
+	}
+};
+
+/* Get Tx offloads configuration */
+struct cmd_tx_offload_get_configuration_result {
+	cmdline_fixed_string_t tx_offload;
+	cmdline_fixed_string_t get;
+	cmdline_fixed_string_t configuration;
+	portid_t port_id;
+};
+
+cmdline_parse_token_string_t cmd_tx_offload_get_configuration_tx_offload =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_tx_offload_get_configuration_result,
+		 tx_offload, "tx_offload");
+cmdline_parse_token_string_t cmd_tx_offload_get_configuration_get =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_tx_offload_get_configuration_result,
+		 get, "get");
+cmdline_parse_token_string_t cmd_tx_offload_get_configuration_configuration =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_tx_offload_get_configuration_result,
+		 configuration, "configuration");
+cmdline_parse_token_num_t cmd_tx_offload_get_configuration_port_id =
+	TOKEN_NUM_INITIALIZER
+		(struct cmd_tx_offload_get_configuration_result,
+		 port_id, UINT16);
+
+static void
+cmd_tx_offload_get_configuration_parsed(
+	void *parsed_result,
+	__attribute__((unused)) struct cmdline *cl,
+	__attribute__((unused)) void *data)
+{
+	struct cmd_tx_offload_get_configuration_result *res = parsed_result;
+	struct rte_eth_dev_info dev_info;
+	portid_t port_id = res->port_id;
+	struct rte_port *port = &ports[port_id];
+	uint64_t port_offloads;
+	uint64_t queue_offloads;
+	uint64_t mask;
+	uint16_t nb_tx_queues;
+	int q;
+	int k;
+
+	printf("Tx Offloading Configuration of port %d :\n", port_id);
+
+	port_offloads = port->dev_conf.txmode.offloads;
+	printf("  Port :");
+	mask = 1;
+	for (k = 0; k < MAX_NUM_OF_TX_OFFLOADS; k++) {
+		if (port_offloads & mask)
+			printf(" %s", tx_offload_names[k]);
+		mask <<= 1;
+	}
+	printf("\n");
+
+	rte_eth_dev_info_get(port_id, &dev_info);
+	nb_tx_queues = dev_info.nb_tx_queues;
+	for (q = 0; q < nb_tx_queues; q++) {
+		queue_offloads = port->tx_offloads[q];
+		printf("  Queue[%2d] :", q);
+		mask = 1;
+		for (k = 0; k < MAX_NUM_OF_TX_OFFLOADS; k++) {
+			if (queue_offloads & mask)
+				printf(" %s", tx_offload_names[k]);
+			mask <<= 1;
+		}
+		printf("\n");
+	}
+	printf("\n");
+}
+
+cmdline_parse_inst_t cmd_tx_offload_get_configuration = {
+	.f = cmd_tx_offload_get_configuration_parsed,
+	.data = NULL,
+	.help_str = "tx_offload get configuration <port_id>",
+	.tokens = {
+		(void *)&cmd_tx_offload_get_configuration_tx_offload,
+		(void *)&cmd_tx_offload_get_configuration_get,
+		(void *)&cmd_tx_offload_get_configuration_configuration,
+		(void *)&cmd_tx_offload_get_configuration_port_id,
+		NULL,
+	}
+};
+
+/* Enable/Disable a per port offloading */
+struct cmd_config_per_port_tx_offload_result {
+	cmdline_fixed_string_t tx_offload;
+	cmdline_fixed_string_t en_dis;
+	cmdline_fixed_string_t per_port;
+	cmdline_fixed_string_t offload;
+	portid_t port_id;
+};
+
+cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_tx_offload =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_port_tx_offload_result,
+		 tx_offload, "tx_offload");
+cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_en_dis =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_port_tx_offload_result,
+		 en_dis, "enable#disable");
+cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_per_port =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_port_tx_offload_result,
+		 per_port, "per_port");
+cmdline_parse_token_string_t cmd_config_per_port_tx_offload_result_offload =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_port_tx_offload_result,
+		 offload, "vlan_insert#ipv4_cksum#udp_cksum#udp_cksum#"
+			  "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#fast_free#security");
+cmdline_parse_token_num_t cmd_config_per_port_tx_offload_result_port_id =
+	TOKEN_NUM_INITIALIZER
+		(struct cmd_config_per_port_tx_offload_result,
+		 port_id, UINT16);
+
+static int
+config_tx_offload(const char *name, uint64_t *offload, int on)
+{
+	uint64_t local = *offload;
+
+	if (!strcmp(name, "vlan_insert")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_VLAN_INSERT;
+		else
+			local &= ~DEV_TX_OFFLOAD_VLAN_INSERT;
+	} else if (!strcmp(name, "ipv4_cksum")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_IPV4_CKSUM;
+		else
+			local &= ~DEV_TX_OFFLOAD_IPV4_CKSUM;
+	} else if (!strcmp(name, "udp_cksum")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_UDP_CKSUM;
+		else
+			local &= ~DEV_TX_OFFLOAD_UDP_CKSUM;
+	} else if (!strcmp(name, "tcp_cksum")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_TCP_CKSUM;
+		else
+			local &= ~DEV_TX_OFFLOAD_TCP_CKSUM;
+	} else if (!strcmp(name, "sccp_cksum")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_SCTP_CKSUM;
+		else
+			local &= ~DEV_TX_OFFLOAD_SCTP_CKSUM;
+	} else if (!strcmp(name, "tcp_tso")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_TCP_TSO;
+		else
+			local &= ~DEV_TX_OFFLOAD_TCP_TSO;
+	} else if (!strcmp(name, "udp_tso")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_UDP_TSO;
+		else
+			local &= ~DEV_TX_OFFLOAD_UDP_TSO;
+	} else if (!strcmp(name, "outer_ipv4_cksum")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
+		else
+			local &= ~DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM;
+	} else if (!strcmp(name, "qinq_insert")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_QINQ_INSERT;
+		else
+			local &= ~DEV_TX_OFFLOAD_QINQ_INSERT;
+	} else if (!strcmp(name, "vxlan_tnl_tso")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
+		else
+			local &= ~DEV_TX_OFFLOAD_VXLAN_TNL_TSO;
+	} else if (!strcmp(name, "gre_tnl_tso")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_GRE_TNL_TSO;
+		else
+			local &= ~DEV_TX_OFFLOAD_GRE_TNL_TSO;
+	} else if (!strcmp(name, "ipip_tnl_tso")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_IPIP_TNL_TSO;
+		else
+			local &= ~DEV_TX_OFFLOAD_IPIP_TNL_TSO;
+	} else if (!strcmp(name, "geneve_tnl_tso")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
+		else
+			local &= ~DEV_TX_OFFLOAD_GENEVE_TNL_TSO;
+	} else if (!strcmp(name, "macsec_insert")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_MACSEC_INSERT;
+		else
+			local &= ~DEV_TX_OFFLOAD_MACSEC_INSERT;
+	} else if (!strcmp(name, "mt_lockfree")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_MT_LOCKFREE;
+		else
+			local &= ~DEV_TX_OFFLOAD_MT_LOCKFREE;
+	} else if (!strcmp(name, "multi_segs")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_MULTI_SEGS;
+		else
+			local &= ~DEV_TX_OFFLOAD_MULTI_SEGS;
+	} else if (!strcmp(name, "mbuf_fast_free")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+		else
+			local &= ~DEV_TX_OFFLOAD_MBUF_FAST_FREE;
+	} else if (!strcmp(name, "security")) {
+		if (on)
+			local |= DEV_TX_OFFLOAD_SECURITY;
+		else
+			local &= ~DEV_TX_OFFLOAD_SECURITY;
+	} else
+		return -1;
+
+	*offload = local;
+	return 0;
+}
+
+static void
+cmd_config_per_port_tx_offload_parsed(void *parsed_result,
+				__attribute__((unused)) struct cmdline *cl,
+				__attribute__((unused)) void *data)
+{
+	struct cmd_config_per_port_tx_offload_result *res = parsed_result;
+	portid_t port_id = res->port_id;
+	struct rte_port *port = &ports[port_id];
+	int on;
+
+	if (port->port_status != RTE_PORT_STOPPED) {
+		printf("Error: Can't config offload when Port %d "
+		       "is not stopped\n", port_id);
+		return;
+	}
+
+	if (!strcmp(res->en_dis, "enable"))
+		on = 1;
+	else if (!strcmp(res->en_dis, "disable"))
+		on = 0;
+	else {
+		printf("Unknown parameter: %s\n", res->en_dis);
+		return;
+	}
+
+	if (config_tx_offload(res->offload,
+			      &port->dev_conf.txmode.offloads, on)) {
+		printf("Unknown offload name: %s", res->offload);
+	}
+}
+
+cmdline_parse_inst_t cmd_config_per_port_tx_offload = {
+	.f = cmd_config_per_port_tx_offload_parsed,
+	.data = NULL,
+	.help_str = "tx_offload enable|disable per_port "
+		    "vlan_insert|ipv4_cksum|udp_cksum|udp_cksum|"
+		    "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|fast_free|security "
+		    "<port_id>",
+	.tokens = {
+		(void *)&cmd_config_per_port_tx_offload_result_tx_offload,
+		(void *)&cmd_config_per_port_tx_offload_result_en_dis,
+		(void *)&cmd_config_per_port_tx_offload_result_per_port,
+		(void *)&cmd_config_per_port_tx_offload_result_offload,
+		(void *)&cmd_config_per_port_tx_offload_result_port_id,
+		NULL,
+	}
+};
+
+/* Enable/Disable a per queue offloading */
+struct cmd_config_per_queue_tx_offload_result {
+	cmdline_fixed_string_t tx_offload;
+	cmdline_fixed_string_t en_dis;
+	cmdline_fixed_string_t per_queue;
+	cmdline_fixed_string_t offload;
+	portid_t port_id;
+	uint16_t queue_id;
+};
+
+cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_tx_offload =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_queue_tx_offload_result,
+		 tx_offload, "tx_offload");
+cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_en_dis =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_queue_tx_offload_result,
+		 en_dis, "enable#disable");
+cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_per_queue =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_queue_tx_offload_result,
+		 per_queue, "per_queue");
+cmdline_parse_token_string_t cmd_config_per_queue_tx_offload_result_offload =
+	TOKEN_STRING_INITIALIZER
+		(struct cmd_config_per_queue_tx_offload_result,
+		 offload, "vlan_insert#ipv4_cksum#udp_cksum#udp_cksum#"
+			  "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#fast_free#security ");
+cmdline_parse_token_num_t cmd_config_per_queue_tx_offload_result_port_id =
+	TOKEN_NUM_INITIALIZER
+		(struct cmd_config_per_queue_tx_offload_result,
+		 port_id, UINT16);
+cmdline_parse_token_num_t cmd_config_per_queue_tx_offload_result_queue_id =
+	TOKEN_NUM_INITIALIZER
+		(struct cmd_config_per_queue_tx_offload_result,
+		 queue_id, UINT16);
+
+
+static void
+cmd_config_per_queue_tx_offload_parsed(void *parsed_result,
+				__attribute__((unused)) struct cmdline *cl,
+				__attribute__((unused)) void *data)
+{
+	struct cmd_config_per_queue_tx_offload_result *res = parsed_result;
+	struct rte_eth_dev_info dev_info;
+	portid_t port_id = res->port_id;
+	uint16_t queue_id = res->queue_id;
+	struct rte_port *port = &ports[port_id];
+	int on;
+
+	if (port->port_status != RTE_PORT_STOPPED) {
+		printf("Error: Can't config offload when Port %d "
+		       "is not stopped\n", port_id);
+		return;
+	}
+
+	if (!strcmp(res->en_dis, "enable"))
+		on = 1;
+	else if (!strcmp(res->en_dis, "disable"))
+		on = 0;
+	else {
+		printf("Unknown parameter: %s\n", res->en_dis);
+		return;
+	}
+
+	rte_eth_dev_info_get(port_id, &dev_info);
+	if (queue_id >= dev_info.nb_tx_queues) {
+		printf("Error: input queue_id should be 0 ... "
+		       "%d", dev_info.nb_tx_queues - 1);
+		return;
+	}
+
+	if (config_tx_offload(res->offload,
+			      &port->tx_offloads[queue_id], on)) {
+		printf("Unknown offload name: %s", res->offload);
+	}
+}
+
+cmdline_parse_inst_t cmd_config_per_queue_tx_offload = {
+	.f = cmd_config_per_queue_tx_offload_parsed,
+	.data = NULL,
+	.help_str = "tx_offload enable|disable per_queue "
+		    "vlan_insert|ipv4_cksum|udp_cksum|udp_cksum|"
+		    "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|fast_free|security "
+		    "<port_id> <queue_id>",
+	.tokens = {
+		(void *)&cmd_config_per_queue_tx_offload_result_tx_offload,
+		(void *)&cmd_config_per_queue_tx_offload_result_en_dis,
+		(void *)&cmd_config_per_queue_tx_offload_result_per_queue,
+		(void *)&cmd_config_per_queue_tx_offload_result_offload,
+		(void *)&cmd_config_per_queue_tx_offload_result_port_id,
+		(void *)&cmd_config_per_queue_tx_offload_result_queue_id,
+		NULL,
+	}
+};
+
 /* Common result structure for file commands */
 struct cmd_cmdfile_result {
 	cmdline_fixed_string_t load;
@@ -16728,6 +17198,10 @@ cmdline_parse_ctx_t main_ctx[] = {
 	(cmdline_parse_inst_t *)&cmd_rx_offload_get_configuration,
 	(cmdline_parse_inst_t *)&cmd_config_per_port_rx_offload,
 	(cmdline_parse_inst_t *)&cmd_config_per_queue_rx_offload,
+	(cmdline_parse_inst_t *)&cmd_tx_offload_get_capa,
+	(cmdline_parse_inst_t *)&cmd_tx_offload_get_configuration,
+	(cmdline_parse_inst_t *)&cmd_config_per_port_tx_offload,
+	(cmdline_parse_inst_t *)&cmd_config_per_queue_tx_offload,
 	NULL,
 };
 
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 9786bfe..690074e 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -718,6 +718,16 @@ init_config(void)
 				 "failed\n", port->dev_info.max_rx_queues);
 		for (k = 0; k < port->dev_info.max_rx_queues; k++)
 			port->rx_offloads[k] = port->dev_conf.rxmode.offloads;
+		port->tx_offloads = rte_zmalloc("testpmd: port->tx_offloads",
+						sizeof(port->tx_offloads[0]) *
+						port->dev_info.max_tx_queues,
+						sizeof(port->tx_offloads[0]));
+		if (port->tx_offloads == NULL)
+			rte_exit(EXIT_FAILURE,
+				 "rte_zmalloc(%d port->tx_offload[0]) "
+				 "failed\n", port->dev_info.max_tx_queues);
+		for (k = 0; k < port->dev_info.max_tx_queues; k++)
+			port->tx_offloads[k] = port->dev_conf.txmode.offloads;
 
 		/* set flag to initialize port/queue */
 		port->need_reconfig = 1;
@@ -1599,10 +1609,9 @@ start_port(portid_t pid)
 		if (port->need_reconfig_queues > 0) {
 			port->need_reconfig_queues = 0;
 			port->tx_conf.txq_flags = ETH_TXQ_FLAGS_IGNORE;
-			/* Apply Tx offloads configuration */
-			port->tx_conf.offloads = port->dev_conf.txmode.offloads;
 			/* setup tx queues */
 			for (qi = 0; qi < nb_txq; qi++) {
+				port->tx_conf.offloads = port->tx_offloads[qi];
 				if ((numa_support) &&
 					(txring_numa[pi] != NUMA_NO_CONFIG))
 					diag = rte_eth_tx_queue_setup(pi, qi,
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index dcad260..b0bd14e 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -184,6 +184,7 @@ struct rte_port {
 	struct rte_eth_rxconf   rx_conf;    /**< rx configuration */
 	struct rte_eth_txconf   tx_conf;    /**< tx configuration */
 	uint64_t		*rx_offloads; /**< offloads of each Rx queue */
+	uint64_t		*tx_offloads; /**< offloads of each Tx queue */
 	struct ether_addr       *mc_addr_pool; /**< pool of multicast addrs */
 	uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
 	uint8_t                 slave_flag; /**< bonding slave port */
-- 
2.7.5

  parent reply	other threads:[~2018-03-12  8:33 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-12  8:15 [dpdk-dev] [PATCH 0/2] app/testpmd: add new commands to test new Tx/Rx " Wei Dai
2018-03-12  8:15 ` [dpdk-dev] [PATCH 1/2] app/testpmd: add commands to test new Rx " Wei Dai
2018-03-12  8:42   ` Andrew Rybchenko
2018-03-13  1:06     ` Dai, Wei
2018-03-12  8:15 ` Wei Dai [this message]
2018-03-13  6:42 ` [dpdk-dev] [PATCH v2 0/2] app/testpmd: add new commands to test new Tx/Rx " Wei Dai
2018-03-13  6:42   ` [dpdk-dev] [PATCH v2 1/2] app/testpmd: add commands to test new Rx " Wei Dai
2018-03-13  7:21     ` Andrew Rybchenko
2018-03-13  9:30       ` Ananyev, Konstantin
2018-03-17 13:45         ` Dai, Wei
2018-03-14 19:40     ` Wu, Jingjing
2018-03-17 13:49       ` Dai, Wei
2018-03-13  6:42   ` [dpdk-dev] [PATCH v2 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-17 13:31   ` [dpdk-dev] [PATCH v3 0/3] app/testpmd: add new commands to test new Tx/Rx " Wei Dai
2018-03-17 13:31     ` [dpdk-dev] [PATCH v3 1/3] ethdev: add enum type for loop on Rx/Tx offloads Wei Dai
2018-03-17 13:31     ` [dpdk-dev] [PATCH v3 2/3] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-17 13:31     ` [dpdk-dev] [PATCH v3 3/3] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-19 12:33     ` [dpdk-dev] [PATCH v4 0/3] app/testpmd: add new commands to test new Tx/Rx offload Wei Dai
2018-03-19 12:33       ` [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on Rx/Tx offloads Wei Dai
2018-03-19 12:33       ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-19 12:33       ` [dpdk-dev] [PATCH v4 3/3] pp/testpmd: add commands to test new Tx " Wei Dai
2018-03-19 12:40     ` [dpdk-dev] [PATCH v4 0/3] app/testpmd: add new commands to test new Tx/Rx offload Wei Dai
2018-03-19 12:40       ` [dpdk-dev] [PATCH v4 1/3] ethdev: add enum type for loop on Rx/Tx offloads Wei Dai
2018-03-19 14:05         ` Zhang, Qi Z
2018-03-20  1:52           ` Dai, Wei
2018-03-19 12:40       ` [dpdk-dev] [PATCH v4 2/3] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-19 12:40       ` [dpdk-dev] [PATCH v4 3/3] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-20  3:09       ` [dpdk-dev] [PATCH v5 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Wei Dai
2018-03-20  3:09         ` [dpdk-dev] [PATCH v5 1/2] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-20  3:09         ` [dpdk-dev] [PATCH v5 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-22  8:00         ` [dpdk-dev] [PATCH v6 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Wei Dai
2018-03-22  8:00           ` [dpdk-dev] [PATCH v6 1/2] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-03-30  8:40             ` Wu, Jingjing
2018-03-22  8:00           ` [dpdk-dev] [PATCH v6 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-03-30 23:05             ` Wu, Jingjing
2018-04-03  8:57           ` [dpdk-dev] [PATCH v7 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Wei Dai
2018-04-03  8:57             ` [dpdk-dev] [PATCH v7 1/2] app/testpmd: add commands to test new Rx offload API Wei Dai
2018-04-03  8:57             ` [dpdk-dev] [PATCH v7 2/2] app/testpmd: add commands to test new Tx " Wei Dai
2018-04-12 17:53             ` [dpdk-dev] [PATCH v7 0/2] app/testpmd: add new commands to test new Tx/Rx offloads Ferruh Yigit
2018-05-08 13:30             ` Dai, Wei
2018-05-08 15:33               ` Ferruh Yigit
2018-05-09 12:13             ` [dpdk-dev] [PATCH v8] app/testpmd: add commands to test new offload API Wei Dai
2018-05-11  0:00               ` Ferruh Yigit
2018-05-11  0:10                 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1520842543-46810-3-git-send-email-wei.dai@intel.com \
    --to=wei.dai@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).