app/testpmd: fix port status for new bonded devices

Message ID 1541071232-11529-1-git-send-email-radu.nicolau@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: fix port status for new bonded devices |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Radu Nicolau Nov. 1, 2018, 11:20 a.m. UTC
  Set port status to stopped for newly added devices.

Fixes: 2950a769315e ("bond: testpmd support")
Cc: stable@dpdk.org

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
 app/test-pmd/cmdline.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Iremonger, Bernard Nov. 1, 2018, 12:11 p.m. UTC | #1
> -----Original Message-----
> From: Nicolau, Radu
> Sent: Thursday, November 1, 2018 11:21 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>;
> Doherty, Declan <declan.doherty@intel.com>; chas3@att.com; Nicolau, Radu
> <radu.nicolau@intel.com>; stable@dpdk.org
> Subject: [PATCH] app/testpmd: fix port status for new bonded devices
> 
> Set port status to stopped for newly added devices.
> 
> Fixes: 2950a769315e ("bond: testpmd support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>

Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
  
Ferruh Yigit Nov. 2, 2018, 8:37 p.m. UTC | #2
On 11/1/2018 12:11 PM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Nicolau, Radu
>> Sent: Thursday, November 1, 2018 11:21 AM
>> To: dev@dpdk.org
>> Cc: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>;
>> Doherty, Declan <declan.doherty@intel.com>; chas3@att.com; Nicolau, Radu
>> <radu.nicolau@intel.com>; stable@dpdk.org
>> Subject: [PATCH] app/testpmd: fix port status for new bonded devices
>>
>> Set port status to stopped for newly added devices.
>>
>> Fixes: 2950a769315e ("bond: testpmd support")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
> 
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

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

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1050fde..a29c6cc 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -5976,6 +5976,8 @@  static void cmd_create_bonded_device_parsed(void *parsed_result,
 		nb_ports = rte_eth_dev_count_avail();
 		reconfig(port_id, res->socket);
 		rte_eth_promiscuous_enable(port_id);
+		ports[port_id].need_setup = 0;
+		ports[port_id].port_status = RTE_PORT_STOPPED;
 	}
 
 }