Skip to contentSkip to conversation

app/testpmd: fixes for testpmd application

PATCH Applied Wei Hu (Xavier) 3 participants 12 messages Jan 21, 2020 – Feb 13, 2020

v1 of 2 Applied Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover app/testpmd: fixes for testpmd application

These patchset are fixes for testpmd application.

Wei Hu (Xavier) (3):
app/testpmd: update Rx offload after setting MTU sccessfully app/testpmd: fix the initial value when setting PFC app/testpmd: fix uninitialized members when setting PFC

 app/test-pmd/cmdline.c |  3 ++-
 app/test-pmd/config.c  | 18 +++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/3 app/testpmd: update Rx offload after setting MTU sccessfully

From: "Wei Hu (Xavier)" <[email protected]>

Currently, Rx offload capabilities and max_rx_pkt_len in the struct variable named rte_port are not updated after setting mtu successfully in port_mtu_set function by 'port config mtu <port_id> <value>' command. This may lead to reconfig mtu to the initial value in the driver when recalling rte_eth_dev_configure API interface.

This patch updates Rx offload capabilities and max_rx_pkt_len after setting mtu successfully when configuring mtu.

Fixes ae03d0d18adf ("app/testpmd: command to configure MTU")
---
 app/test-pmd/config.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
app/test-pmd/config.c +17 -1
index 9669cbd4c..09a1579f5 100644
@@ -1216,7 +1216,9 @@ void
 port_mtu_set(portid_t port_id, uint16_t mtu)
 {
 	int diag;
+	struct rte_port *rte_port = &ports[port_id];
 	struct rte_eth_dev_info dev_info;
+	uint16_t eth_overhead;
 	int ret;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -1232,8 +1234,22 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		return;
 	}
 	diag = rte_eth_dev_set_mtu(port_id, mtu);
-	if (diag == 0)
+	if (diag == 0) {
+		/*
+		 * Ether overhead in driver is equal to the difference of
+		 * max_rx_pktlen and max_mtu in rte_eth_dev_info.
+		 */
+		eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
+		if (mtu > RTE_ETHER_MAX_LEN - eth_overhead)
+			rte_port->dev_conf.rxmode.offloads |=
+						DEV_RX_OFFLOAD_JUMBO_FRAME;
+		else
+			rte_port->dev_conf.rxmode.offloads &=
+						~DEV_RX_OFFLOAD_JUMBO_FRAME;
+		rte_port->dev_conf.rxmode.max_rx_pkt_len = mtu + eth_overhead;
+
 		return;
+	}
 	printf("Set MTU failed. diag=%d\n", diag);
 }
 
Signature · 1 line
2.23.0
#2 lore raw

Re: [dpdk-dev] [PATCH 1/3] app/testpmd: update Rx offload after setting MTU sccessfully

Quoted 41 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Currently, Rx offload capabilities and max_rx_pkt_len in the struct variable named rte_port are not updated after setting mtu successfully in port_mtu_set function by 'port config mtu <port_id> <value>' command. This may lead to reconfig mtu to the initial value in the driver when recalling rte_eth_dev_configure API interface.

This patch updates Rx offload capabilities and max_rx_pkt_len after setting mtu successfully when configuring mtu.

Fixes ae03d0d18adf ("app/testpmd: command to configure MTU")
---
 app/test-pmd/config.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
app/test-pmd/config.c +4 -1
index 9669cbd4c..09a1579f5 100644
@@ -1216,7 +1216,9 @@ void
 port_mtu_set(portid_t port_id, uint16_t mtu)
 {
 	int diag;
+	struct rte_port *rte_port = &ports[port_id];
 	struct rte_eth_dev_info dev_info;
+	uint16_t eth_overhead;
 	int ret;
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -1232,8 +1234,22 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
 		return;
 	}
 	diag = rte_eth_dev_set_mtu(port_id, mtu);
-	if (diag == 0)
+	if (diag == 0) {
+		/*

app/test-pmd/config.c port_mtu_set(portid_t port_id, uint16_t mtu) · line 1248

Quoted 10 lines
app/test-pmd/config.c +10 -0
+		 * Ether overhead in driver is equal to the difference of
+		 * max_rx_pktlen and max_mtu in rte_eth_dev_info.
+		 */
+		eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
+		if (mtu > RTE_ETHER_MAX_LEN - eth_overhead)
+			rte_port->dev_conf.rxmode.offloads |=
+						DEV_RX_OFFLOAD_JUMBO_FRAME;
+		else
+			rte_port->dev_conf.rxmode.offloads &=
+						~DEV_RX_OFFLOAD_JUMBO_FRAME;

If the jumbo frame capability supported or not should be tested before setting it.

app/test-pmd/config.c port_mtu_set(portid_t port_id, uint16_t mtu) · line 1249

Quoted 1 line
app/test-pmd/config.c +1 -0
+		rte_port->dev_conf.rxmode.max_rx_pkt_len = mtu + eth_overhead;

May need to check against 'dev_info.max_rx_pktlen', if the 'max_rx_pkt_len' is bigger than this, it will fail in next configure.

Also some divers already does this in PMD code, should we clean that code or not is a question.

#3 lore raw

Re: [dpdk-dev] [PATCH 1/3] app/testpmd: update Rx offload after setting MTU sccessfully

Hi, Ferruh Yigit

Quoted 55 lines · Ferruh Yigit
Quoted 41 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Currently, Rx offload capabilities and max_rx_pkt_len in the struct variable named rte_port are not updated after setting mtu successfully in port_mtu_set function by 'port config mtu <port_id> <value>' command. This may lead to reconfig mtu to the initial value in the driver when recalling rte_eth_dev_configure API interface.

This patch updates Rx offload capabilities and max_rx_pkt_len after setting mtu successfully when configuring mtu.

Fixes ae03d0d18adf ("app/testpmd: command to configure MTU")
---
  app/test-pmd/config.c | 18 +++++++++++++++++-
  1 file changed, 17 insertions(+), 1 deletion(-)
app/test-pmd/config.c +4 -1
index 9669cbd4c..09a1579f5 100644
@@ -1216,7 +1216,9 @@ void
  port_mtu_set(portid_t port_id, uint16_t mtu)
  {
  	int diag;
+	struct rte_port *rte_port = &ports[port_id];
  	struct rte_eth_dev_info dev_info;
+	uint16_t eth_overhead;
  	int ret;
 
  	if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -1232,8 +1234,22 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
  		return;
  	}
  	diag = rte_eth_dev_set_mtu(port_id, mtu);
-	if (diag == 0)
+	if (diag == 0) {
+		/*

app/test-pmd/config.c port_mtu_set(portid_t port_id, uint16_t mtu) · line 1248

Quoted 10 lines
app/test-pmd/config.c +10 -0
+		 * Ether overhead in driver is equal to the difference of
+		 * max_rx_pktlen and max_mtu in rte_eth_dev_info.
+		 */
+		eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
+		if (mtu > RTE_ETHER_MAX_LEN - eth_overhead)
+			rte_port->dev_conf.rxmode.offloads |=
+						DEV_RX_OFFLOAD_JUMBO_FRAME;
+		else
+			rte_port->dev_conf.rxmode.offloads &=
+						~DEV_RX_OFFLOAD_JUMBO_FRAME;

If the jumbo frame capability supported or not should be tested before setting it.

Quoted 8 lines

app/test-pmd/config.c port_mtu_set(portid_t port_id, uint16_t mtu) · line 1249

Quoted 1 line
app/test-pmd/config.c +1 -0
+		rte_port->dev_conf.rxmode.max_rx_pkt_len = mtu + eth_overhead;

May need to check against 'dev_info.max_rx_pktlen', if the 'max_rx_pkt_len' is bigger than this, it will fail in next configure.

Also some divers already does this in PMD code, should we clean that code or not is a question.

The snippset is adjusted as follows:

if (mtu > RTE_ETHER_MAX_LEN - eth_overhead && dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) {
	rte_port->dev_conf.rxmode.offloads |= 			
                                         DEV_RX_OFFLOAD_JUMBO_FRAME;
	rte_port->dev_conf.rxmode.max_rx_pkt_len = mtu + eth_overhead;
} else
	rte_port->dev_conf.rxmode.offloads &=
					~DEV_RX_OFFLOAD_JUMBO_FRAME;

We only modifies the internal variables of testpmd, don't impact on the implementation of the driver.

Thanks for more suggestions.

Xavier

#4 lore raw

Re: [dpdk-dev] [PATCH 1/3] app/testpmd: update Rx offload after setting MTU sccessfully

Hi, Ferruh Yigit

Quoted 75 lines · Wei Hu (Xavier)

Hi, Ferruh Yigit

Quoted 54 lines · Ferruh Yigit
Quoted 40 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Currently, Rx offload capabilities and max_rx_pkt_len in the struct variable named rte_port are not updated after setting mtu successfully in port_mtu_set function by 'port config mtu <port_id> <value>' command. This may lead to reconfig mtu to the initial value in the driver when recalling rte_eth_dev_configure API interface.

This patch updates Rx offload capabilities and max_rx_pkt_len after setting mtu successfully when configuring mtu.

Fixes ae03d0d18adf ("app/testpmd: command to configure MTU")

---
  app/test-pmd/config.c | 18 +++++++++++++++++-

  1 file changed, 17 insertions(+), 1 deletion(-)
app/test-pmd/config.c +4 -1
index 9669cbd4c..09a1579f5 100644
@@ -1216,7 +1216,9 @@ void
   port_mtu_set(portid_t port_id, uint16_t mtu)
   {
       int diag;
+    struct rte_port *rte_port = &ports[port_id];
       struct rte_eth_dev_info dev_info;
+    uint16_t eth_overhead;
       int ret;
       if (port_id_is_invalid(port_id, ENABLED_WARN))
@@ -1232,8 +1234,22 @@ port_mtu_set(portid_t port_id, uint16_t mtu)
           return;
       }
       diag = rte_eth_dev_set_mtu(port_id, mtu);
-    if (diag == 0)
+    if (diag == 0) {
+        /*

app/test-pmd/config.c port_mtu_set(portid_t port_id, uint16_t mtu) · line 1248

Quoted 10 lines
app/test-pmd/config.c +10 -0
+         * Ether overhead in driver is equal to the difference of
+         * max_rx_pktlen and max_mtu in rte_eth_dev_info.
+         */
+        eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
+        if (mtu > RTE_ETHER_MAX_LEN - eth_overhead)
+            rte_port->dev_conf.rxmode.offloads |=
+                        DEV_RX_OFFLOAD_JUMBO_FRAME;
+        else
+            rte_port->dev_conf.rxmode.offloads &=
+                        ~DEV_RX_OFFLOAD_JUMBO_FRAME;

If the jumbo frame capability supported or not should be tested before setting it.

Quoted 8 lines

app/test-pmd/config.c port_mtu_set(portid_t port_id, uint16_t mtu) · line 1249

Quoted 1 line
app/test-pmd/config.c +1 -0
+        rte_port->dev_conf.rxmode.max_rx_pkt_len = mtu + eth_overhead;

May need to check against 'dev_info.max_rx_pktlen', if the 'max_rx_pkt_len' is bigger than this, it will fail in next configure.

Also some divers already does this in PMD code, should we clean that code or not is a question.

The snippset is adjusted as follows:

if (mtu > RTE_ETHER_MAX_LEN - eth_overhead && dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) {
    rte_port->dev_conf.rxmode.offloads |=
                                         DEV_RX_OFFLOAD_JUMBO_FRAME; rte_port->dev_conf.rxmode.max_rx_pkt_len = mtu + eth_overhead;
} else
    rte_port->dev_conf.rxmode.offloads &=
                    ~DEV_RX_OFFLOAD_JUMBO_FRAME;

Quoted 5 lines

We only modifies the internal variables of testpmd, don't impact on the implementation of the driver.

Thanks for more suggestions.

XavierThe code is modified as follows:

diag = rte_eth_dev_set_mtu(port_id, mtu);
if (diag == 0 &&

    dev_info.rx_offload_capa & DEV_RX_OFFLOAD_JUMBO_FRAME) {
         /*
          * Ether overhead in driver is equal to the difference of
          * max_rx_pktlen and max_mtu in rte_eth_dev_info when the
          * device supports jumbo frame.
          */
         eth_overhead = dev_info.max_rx_pktlen - dev_info.max_mtu;
         if (mtu > RTE_ETHER_MAX_LEN - eth_overhead) {
                rte_port->dev_conf.rxmode.offloads |= 

                        DEV_RX_OFFLOAD_JUMBO_FRAME;
                rte_port->dev_conf.rxmode.max_rx_pkt_len =
                        mtu + eth_overhead;
         } else
                rte_port->dev_conf.rxmode.offloads &= 

                       ~DEV_RX_OFFLOAD_JUMBO_FRAME;

        return;
}

We will send V2. Thanks

Xavier

#5 lore raw

PATCH 2/3 app/testpmd: fix the initial value when setting PFC

In reply to Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Currently, the initial values of the local structure variable named rx_tx_onoff_2_lfc_mode and rx_tx_onoff_2_pfc_mode are different in the similar part of these two following functions:
cmd_link_flow_ctrl_set_parsed cmd_priority_flow_ctrl_set_parsed
1) The code snippset in cmd_link_flow_ctrl_set_parsed function:

	static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
	};

	if (!cmd || cmd == &cmd_link_flow_control_set_rx)
		rx_fc_en = (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0;
	if (!cmd || cmd == &cmd_link_flow_control_set_tx)
		tx_fc_en = (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0;

	fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];
	<...>
	ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf);
	<...>
2) The code snippset in cmd_priority_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
	};

	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
	pfc_conf.fc.mode =
		 rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
	<...>
	ret = rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf);
	<...>

The initial value of rx_tx_onoff_2_pfc_mode is wrong, it should be the same as rx_tx_onoff_2_lfc_mode.

Fixes 9b53e542e9e1 ("app/testpmd: add priority flow control")
---
 app/test-pmd/cmdline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test-pmd/cmdline.c +1 -1
index dab22bc4d..a09cb87e1 100644
@@ -7087,7 +7087,7 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
 	 * the RTE_FC_RX_PAUSE, Respond to the pause frame at the Tx side.
 	 */
 	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
-			{RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
+		{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
 	};
 
 	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
Signature · 1 line
2.23.0
Reviewed-by on v1 2/3
#6 lore raw

Re: [dpdk-dev] [PATCH 2/3] app/testpmd: fix the initial value when setting PFC

Quoted 36 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Currently, the initial values of the local structure variable named rx_tx_onoff_2_lfc_mode and rx_tx_onoff_2_pfc_mode are different in the similar part of these two following functions:
cmd_link_flow_ctrl_set_parsed cmd_priority_flow_ctrl_set_parsed
1) The code snippset in cmd_link_flow_ctrl_set_parsed function:

	static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
	};

	if (!cmd || cmd == &cmd_link_flow_control_set_rx)
		rx_fc_en = (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0;
	if (!cmd || cmd == &cmd_link_flow_control_set_tx)
		tx_fc_en = (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0;

	fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];
	<...>
	ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf);
	<...>
2) The code snippset in cmd_priority_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
	};

	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
	pfc_conf.fc.mode =
		 rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
	<...>
	ret = rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf);
	<...>

The initial value of rx_tx_onoff_2_pfc_mode is wrong, it should be the same as rx_tx_onoff_2_lfc_mode.

Quoted 6 lines
Fixes 9b53e542e9e1 ("app/testpmd: add priority flow control")

Not tested but looks reasonable from the code, it would be nice if someone can test it.

Applied
#7 lore raw

Re: [dpdk-dev] [PATCH 2/3] app/testpmd: fix the initial value when setting PFC

Quoted 40 lines · Ferruh Yigit
Quoted 39 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Currently, the initial values of the local structure variable named rx_tx_onoff_2_lfc_mode and rx_tx_onoff_2_pfc_mode are different in the similar part of these two following functions:
cmd_link_flow_ctrl_set_parsed cmd_priority_flow_ctrl_set_parsed
1) The code snippset in cmd_link_flow_ctrl_set_parsed function:

	static enum rte_eth_fc_mode rx_tx_onoff_2_lfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
	};

	if (!cmd || cmd == &cmd_link_flow_control_set_rx)
		rx_fc_en = (!strcmp(res->rx_lfc_mode, "on")) ? 1 : 0;
	if (!cmd || cmd == &cmd_link_flow_control_set_tx)
		tx_fc_en = (!strcmp(res->tx_lfc_mode, "on")) ? 1 : 0;

	fc_conf.mode = rx_tx_onoff_2_lfc_mode[rx_fc_en][tx_fc_en];
	<...>
	ret = rte_eth_dev_flow_ctrl_set(res->port_id, &fc_conf);
	<...>
2) The code snippset in cmd_priority_flow_ctrl_set_parsed function:
	static enum rte_eth_fc_mode rx_tx_onoff_2_pfc_mode[2][2] = {
	    {RTE_FC_NONE, RTE_FC_RX_PAUSE}, {RTE_FC_TX_PAUSE, RTE_FC_FULL}
	};

	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
	pfc_conf.fc.mode =
		 rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
	<...>
	ret = rte_eth_dev_priority_flow_ctrl_set(res->port_id, &pfc_conf);
	<...>

The initial value of rx_tx_onoff_2_pfc_mode is wrong, it should be the same as rx_tx_onoff_2_lfc_mode.

Fixes 9b53e542e9e1 ("app/testpmd: add priority flow control")
Quoted 9 lines
Quoted 3 lines

Not tested but looks reasonable from the code, it would be nice if someone can test it.

Applied to dpdk-next-net/master, thanks.

#8 lore raw

PATCH 3/3 app/testpmd: fix uninitialized members when setting PFC

In reply to Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Only a part of members in the local structure variable named pfc_conf are initialized in the function named cmd_priority_flow_ctrl_set_parsed when typing "set pfc_ctrl..." command, and others are random values. However, those uninitialized members may cause failure.

This patch adds clearing zero operation before calling the API named rte_eth_dev_priority_flow_ctrl_set API with pfc_conf as the input parameter.

Fixes 9b53e542e9e1 ("app/testpmd: add priority flow control")
---
 app/test-pmd/cmdline.c | 1 +
 1 file changed, 1 insertion(+)
app/test-pmd/cmdline.c +1 -0
index a09cb87e1..b6d8ef0f0 100644
@@ -7090,6 +7090,7 @@ cmd_priority_flow_ctrl_set_parsed(void *parsed_result,
 		{RTE_FC_NONE, RTE_FC_TX_PAUSE}, {RTE_FC_RX_PAUSE, RTE_FC_FULL}
 	};
 
+	memset(&pfc_conf, 0, sizeof(struct rte_eth_pfc_conf));
 	rx_fc_enable = (!strncmp(res->rx_pfc_mode, "on",2)) ? 1 : 0;
 	tx_fc_enable = (!strncmp(res->tx_pfc_mode, "on",2)) ? 1 : 0;
 	pfc_conf.fc.mode       = rx_tx_onoff_2_pfc_mode[rx_fc_enable][tx_fc_enable];
Signature · 1 line
2.23.0
Reviewed-by on v1 3/3
#9 lore raw

Re: [dpdk-dev] [PATCH 3/3] app/testpmd: fix uninitialized members when setting PFC

Quoted 11 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Only a part of members in the local structure variable named pfc_conf are initialized in the function named cmd_priority_flow_ctrl_set_parsed when typing "set pfc_ctrl..." command, and others are random values. However, those uninitialized members may cause failure.

This patch adds clearing zero operation before calling the API named rte_eth_dev_priority_flow_ctrl_set API with pfc_conf as the input parameter.

Quoted 6 lines
Fixes 9b53e542e9e1 ("app/testpmd: add priority flow control")
Applied
#10 lore raw

Re: [dpdk-dev] [PATCH 3/3] app/testpmd: fix uninitialized members when setting PFC

Quoted 12 lines · Ferruh Yigit
Quoted 11 lines · Wei Hu (Xavier)

From: "Wei Hu (Xavier)" <[email protected]>

Only a part of members in the local structure variable named pfc_conf are initialized in the function named cmd_priority_flow_ctrl_set_parsed when typing "set pfc_ctrl..." command, and others are random values. However, those uninitialized members may cause failure.

This patch adds clearing zero operation before calling the API named rte_eth_dev_priority_flow_ctrl_set API with pfc_conf as the input parameter.

Quoted 9 lines
Quoted 6 lines
Fixes 9b53e542e9e1 ("app/testpmd: add priority flow control")

Applied to dpdk-next-net/master, thanks.

#11 lore raw
In reply to Wei Hu (Xavier)
Quoted 7 lines · Wei Hu (Xavier)

These patchset are fixes for testpmd application.

Wei Hu (Xavier) (3):
app/testpmd: update Rx offload after setting MTU sccessfully app/testpmd: fix the initial value when setting PFC app/testpmd: fix uninitialized members when setting PFC

Since they are not dependent to each other, applied 2/3 and 3/3.

I would like to get more input for 1/3.