[dpdk-dev] app/testpmd: remove port status check from TM hierarchy commit cli

Message ID 20171027094619.147024-1-jasvinder.singh@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

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

Commit Message

Jasvinder Singh Oct. 27, 2017, 9:46 a.m. UTC
  Some drivers might allow to commit the traffic management hierarchy
while being in running state. Therefore, removes port status check
before invoking hierarchy commit API in the cli. If needed, device can
add port status check at the driver layer.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 app/test-pmd/cmdline_tm.c | 6 ------
 1 file changed, 6 deletions(-)
  

Comments

Ferruh Yigit Nov. 7, 2017, 6:38 a.m. UTC | #1
On 10/27/2017 2:46 AM, Jasvinder Singh wrote:
> Some drivers might allow to commit the traffic management hierarchy
> while being in running state. Therefore, removes port status check
> before invoking hierarchy commit API in the cli. If needed, device can
> add port status check at the driver layer.
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit Nov. 7, 2017, 6:42 a.m. UTC | #2
On 11/6/2017 10:38 PM, Ferruh Yigit wrote:
> On 10/27/2017 2:46 AM, Jasvinder Singh wrote:
>> Some drivers might allow to commit the traffic management hierarchy
>> while being in running state. Therefore, removes port status check
>> before invoking hierarchy commit API in the cli. If needed, device can
>> add port status check at the driver layer.
>>
>> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk/master, thanks.
  

Patch

diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 964ce9d..53f941c 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -2033,12 +2033,6 @@  static void cmd_port_tm_hierarchy_commit_parsed(void *parsed_result,
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
 
-	/* Port status */
-	if (port_is_started(port_id)) {
-		printf(" Port %u not stopped (error)\n", port_id);
-		return;
-	}
-
 	if (strcmp(res->clean_on_fail, "yes") == 0)
 		clean_on_fail = 1;
 	else