@@ -2042,6 +2042,7 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
20422042{
20432043	struct cmd_config_rx_mode_flag *res = parsed_result;
20442044	portid_t pid;
2045+ 	int k;
20452046
20462047	if (!all_ports_stopped()) {
20472048		printf("Please stop all ports first\n");
@@ -2142,6 +2143,10 @@ cmd_config_rx_mode_flag_parsed(void *parsed_result,
21422143			return;
21432144		}
21442145		port->dev_conf.rxmode.offloads = rx_offloads;
2146+ 		/* Apply Rx offloads configuration */
2147+ 		for (k = 0; k < port->dev_info.max_rx_queues; k++)
2148+ 			port->rx_conf[k].offloads =
2149+ 				port->dev_conf.rxmode.offloads;
21452150	}
21462151
21472152	init_port_config();
@@ -4354,6 +4359,17 @@ csum_show(int port_id)
43544359	}
43554360}
43564361
4362+ static void
4363+ cmd_config_queue_tx_offloads(struct rte_port *port)
4364+ {
4365+ 	int k;
4366+ 
4367+ 	/* Apply queue tx offloads configuration */
4368+ 	for (k = 0; k < port->dev_info.max_rx_queues; k++)
4369+ 		port->tx_conf[k].offloads =
4370+ 			port->dev_conf.txmode.offloads;
4371+ }
4372+ 
43574373static void
43584374cmd_csum_parsed(void *parsed_result,
43594375		       __attribute__((unused)) struct cmdline *cl,
@@ -4438,6 +4454,7 @@ cmd_csum_parsed(void *parsed_result,
44384454			ports[res->port_id].dev_conf.txmode.offloads &=
44394455							(~csum_offloads);
44404456		}
4457+ 		cmd_config_queue_tx_offloads(&ports[res->port_id]);
44414458	}
44424459	csum_show(res->port_id);
44434460
@@ -4589,6 +4606,7 @@ cmd_tso_set_parsed(void *parsed_result,
45894606		printf("TSO segment size for non-tunneled packets is %d\n",
45904607			ports[res->port_id].tso_segsz);
45914608	}
4609+ 	cmd_config_queue_tx_offloads(&ports[res->port_id]);
45924610
45934611	/* display warnings if configuration is not supported by the NIC */
45944612	rte_eth_dev_info_get(res->port_id, &dev_info);
@@ -4744,6 +4762,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,
47444762				"if outer L3 is IPv4; not necessary for IPv6\n");
47454763	}
47464764
4765+ 	cmd_config_queue_tx_offloads(&ports[res->port_id]);
47474766	cmd_reconfig_device_queue(res->port_id, 1, 1);
47484767}
47494768
@@ -8348,32 +8367,32 @@ cmd_set_vf_rxmode_parsed(void *parsed_result,
83488367		       __attribute__((unused)) void *data)
83498368{
83508369	int ret = -ENOTSUP;
8351- 	uint16_t rx_mode  = 0;
8370+ 	uint16_t vf_rxmode  = 0;
83528371	struct cmd_set_vf_rxmode *res = parsed_result;
83538372
83548373	int is_on = (strcmp(res->on, "on") == 0) ? 1 : 0;
83558374	if (!strcmp(res->what,"rxmode")) {
83568375		if (!strcmp(res->mode, "AUPE"))
8357- 			rx_mode  |= ETH_VMDQ_ACCEPT_UNTAG;
8376+ 			vf_rxmode  |= ETH_VMDQ_ACCEPT_UNTAG;
83588377		else if (!strcmp(res->mode, "ROPE"))
8359- 			rx_mode  |= ETH_VMDQ_ACCEPT_HASH_UC;
8378+ 			vf_rxmode  |= ETH_VMDQ_ACCEPT_HASH_UC;
83608379		else if (!strcmp(res->mode, "BAM"))
8361- 			rx_mode  |= ETH_VMDQ_ACCEPT_BROADCAST;
8380+ 			vf_rxmode  |= ETH_VMDQ_ACCEPT_BROADCAST;
83628381		else if (!strncmp(res->mode, "MPE",3))
8363- 			rx_mode  |= ETH_VMDQ_ACCEPT_MULTICAST;
8382+ 			vf_rxmode  |= ETH_VMDQ_ACCEPT_MULTICAST;
83648383	}
83658384
83668385	RTE_SET_USED(is_on);
83678386
83688387#ifdef RTE_LIBRTE_IXGBE_PMD
83698388	if (ret == -ENOTSUP)
83708389		ret = rte_pmd_ixgbe_set_vf_rxmode(res->port_id, res->vf_id,
8371- 						  rx_mode , (uint8_t)is_on);
8390+ 						  vf_rxmode , (uint8_t)is_on);
83728391#endif
83738392#ifdef RTE_LIBRTE_BNXT_PMD
83748393	if (ret == -ENOTSUP)
83758394		ret = rte_pmd_bnxt_set_vf_rxmode(res->port_id, res->vf_id,
8376- 						 rx_mode , (uint8_t)is_on);
8395+ 						 vf_rxmode , (uint8_t)is_on);
83778396#endif
83788397	if (ret < 0)
83798398		printf("bad VF receive mode parameter, return code = %d \n",
0 commit comments