[v3] app/testpmd: remove port stop check for macsec

Message ID 1560146823-57155-1-git-send-email-wei.zhao1@intel.com (mailing list archive)
State Rejected, archived
Delegated to: Ferruh Yigit
Headers
Series [v3] app/testpmd: remove port stop check for macsec |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/intel-Performance-Testing success Performance Testing PASS
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Zhao1, Wei June 10, 2019, 6:07 a.m. UTC
  There is no need to do such a check when set macsec for ixgbe, and
reconfig_device_queueand is also useless. If we do not delete this
unnessary code, users have to stop port before enable or disable
macsec, then restart this port after make configuration. All these
process are useless. As this cmdline is a private API which is only
used by ixgbe NIC, so remove it.

Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Tested-by: Peng Yuan <yuan.peng@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

---

v2:
 -update log info and delete code in disable function

v3:
-update typo in log
---
 app/test-pmd/cmdline.c | 10 ----------
 1 file changed, 10 deletions(-)
  

Comments

Ferruh Yigit June 27, 2019, 5:23 p.m. UTC | #1
On 6/10/2019 7:07 AM, Wei Zhao wrote:
> There is no need to do such a check when set macsec for ixgbe, and
> reconfig_device_queueand is also useless. If we do not delete this
> unnessary code, users have to stop port before enable or disable
> macsec, then restart this port after make configuration. All these
> process are useless. As this cmdline is a private API which is only
> used by ixgbe NIC, so remove it.
> 
> Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> Tested-by: Peng Yuan <yuan.peng@intel.com>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>

Applied to dpdk-next-net/master, thanks.
  
Thomas Monjalon June 30, 2019, 9:50 p.m. UTC | #2
27/06/2019 19:23, Ferruh Yigit:
> On 6/10/2019 7:07 AM, Wei Zhao wrote:
> > There is no need to do such a check when set macsec for ixgbe, and
> > reconfig_device_queueand is also useless. If we do not delete this
> > unnessary code, users have to stop port before enable or disable
> > macsec, then restart this port after make configuration. All these
> > process are useless. As this cmdline is a private API which is only
> > used by ixgbe NIC, so remove it.
> > 
> > Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > Tested-by: Peng Yuan <yuan.peng@intel.com>
> > Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
> 
> Applied to dpdk-next-net/master, thanks.

I disagree with the purpose of this patch.
It is removing some "generic" code with the argument that it is
not needed in the case of ixgbe, and ixgbe is the only user.
We may (and probably will) have other PMDs using this command,
so the argument is not OK.

I do not merge this patch in master for now.
Sorry for the inconvenience.
  
Ferruh Yigit July 1, 2019, 4:39 p.m. UTC | #3
On 6/30/2019 10:50 PM, Thomas Monjalon wrote:
> 27/06/2019 19:23, Ferruh Yigit:
>> On 6/10/2019 7:07 AM, Wei Zhao wrote:
>>> There is no need to do such a check when set macsec for ixgbe, and
>>> reconfig_device_queueand is also useless. If we do not delete this
>>> unnessary code, users have to stop port before enable or disable
>>> macsec, then restart this port after make configuration. All these
>>> process are useless. As this cmdline is a private API which is only
>>> used by ixgbe NIC, so remove it.
>>>
>>> Fixes: 597f9fafe13b ("app/testpmd: convert to new Tx offloads API")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
>>> Tested-by: Peng Yuan <yuan.peng@intel.com>
>>> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
>>
>> Applied to dpdk-next-net/master, thanks.
> 
> I disagree with the purpose of this patch.
> It is removing some "generic" code with the argument that it is
> not needed in the case of ixgbe, and ixgbe is the only user.
> We may (and probably will) have other PMDs using this command,
> so the argument is not OK.
> 
> I do not merge this patch in master for now.
> Sorry for the inconvenience.

Dropped from the next-net based on nack
  

Patch

diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index d1e0d44..e7c4bee 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -14044,10 +14044,6 @@  cmd_set_macsec_offload_on_parsed(
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
-	if (!port_is_stopped(port_id)) {
-		printf("Please stop port %d first\n", port_id);
-		return;
-	}
 
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MACSEC_INSERT) {
@@ -14062,7 +14058,6 @@  cmd_set_macsec_offload_on_parsed(
 	case 0:
 		ports[port_id].dev_conf.txmode.offloads |=
 						DEV_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
 		break;
 	case -ENODEV:
 		printf("invalid port_id %d\n", port_id);
@@ -14138,10 +14133,6 @@  cmd_set_macsec_offload_off_parsed(
 
 	if (port_id_is_invalid(port_id, ENABLED_WARN))
 		return;
-	if (!port_is_stopped(port_id)) {
-		printf("Please stop port %d first\n", port_id);
-		return;
-	}
 
 	rte_eth_dev_info_get(port_id, &dev_info);
 	if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_MACSEC_INSERT) {
@@ -14153,7 +14144,6 @@  cmd_set_macsec_offload_off_parsed(
 	case 0:
 		ports[port_id].dev_conf.txmode.offloads &=
 						~DEV_TX_OFFLOAD_MACSEC_INSERT;
-		cmd_reconfig_device_queue(port_id, 1, 1);
 		break;
 	case -ENODEV:
 		printf("invalid port_id %d\n", port_id);