DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/softnic: initialize meter policy list before use
@ 2021-04-29  7:06 dapengx.yu
  2021-04-29  7:48 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 3+ messages in thread
From: dapengx.yu @ 2021-04-29  7:06 UTC (permalink / raw)
  To: Jasvinder Singh, Cristian Dumitrescu; +Cc: dev, Dapeng Yu, stable

From: Dapeng Yu <dapengx.yu@intel.com>

Initialize meter policy list before use to avoid segment fault

Fixes: 0d73ddf25faa ("net/softnic: add meter profile")
Cc: stable@dpdk.org

Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
---
 drivers/net/softnic/rte_eth_softnic_meter.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/softnic/rte_eth_softnic_meter.c b/drivers/net/softnic/rte_eth_softnic_meter.c
index acb8b87fd..5831892a3 100644
--- a/drivers/net/softnic/rte_eth_softnic_meter.c
+++ b/drivers/net/softnic/rte_eth_softnic_meter.c
@@ -17,6 +17,9 @@ softnic_mtr_init(struct pmd_internals *p)
 	/* Initialize meter profiles list */
 	TAILQ_INIT(&p->mtr.meter_profiles);
 
+	/* Initialize meter policies list */
+	TAILQ_INIT(&p->mtr.meter_policies);
+
 	/* Initialize MTR objects list */
 	TAILQ_INIT(&p->mtr.mtrs);
 
-- 
2.27.0


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

end of thread, other threads:[~2021-04-29 14:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29  7:06 [dpdk-dev] [PATCH] net/softnic: initialize meter policy list before use dapengx.yu
2021-04-29  7:48 ` Dumitrescu, Cristian
2021-04-29 14:12   ` 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).