patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] net/nfp: reset profile config while modify profile
@ 2023-02-28  8:56 Chaoyong He
  2023-03-07 14:26 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Chaoyong He @ 2023-02-28  8:56 UTC (permalink / raw)
  To: dev; +Cc: oss-drivers, niklas.soderlund, Jin Liu, stable, Chaoyong He

From: Jin Liu <jin.liu@corigine.com>

While changing meter profile from pps rate limit mode to bps,
the profile configuration was not reset, leaving the profile
in pps mode. This lead to incorrect operation.

Fix this by clearing the profile before configuring it.

Fixes: 434c66e7e55c ("net/nfp: add meter profile options")
Cc: stable@dpdk.org

Signed-off-by: Jin Liu <jin.liu@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_mtr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/nfp/nfp_mtr.c b/drivers/net/nfp/nfp_mtr.c
index 356bcdb370..5f85106f9d 100644
--- a/drivers/net/nfp/nfp_mtr.c
+++ b/drivers/net/nfp/nfp_mtr.c
@@ -241,6 +241,8 @@ nfp_mtr_profile_mod(struct nfp_app_fw_flower *app_fw_flower,
 	/* Get the old profile config */
 	rte_memcpy(&old_conf, &mtr_profile->conf, sizeof(old_conf));
 
+	memset(&mtr_profile->conf, 0, sizeof(struct nfp_profile_conf));
+
 	ret = nfp_mtr_profile_conf_mod(mtr_profile->profile_id,
 			profile, &mtr_profile->conf);
 	if (ret != 0) {
-- 
2.39.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] net/nfp: reset profile config while modify profile
  2023-02-28  8:56 [PATCH] net/nfp: reset profile config while modify profile Chaoyong He
@ 2023-03-07 14:26 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2023-03-07 14:26 UTC (permalink / raw)
  To: Chaoyong He, dev; +Cc: oss-drivers, niklas.soderlund, Jin Liu, stable

On 2/28/2023 8:56 AM, Chaoyong He wrote:
> From: Jin Liu <jin.liu@corigine.com>
> 
> While changing meter profile from pps rate limit mode to bps,
> the profile configuration was not reset, leaving the profile
> in pps mode. This lead to incorrect operation.
> 
> Fix this by clearing the profile before configuring it.
> 
> Fixes: 434c66e7e55c ("net/nfp: add meter profile options")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jin Liu <jin.liu@corigine.com>
> Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-07 14:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-28  8:56 [PATCH] net/nfp: reset profile config while modify profile Chaoyong He
2023-03-07 14:26 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).