Skip to contentSkip to conversation

net/softnic: initialize meter policy list before use

PATCH Applied [email protected] 3 participants 3 messages Apr 29, 2021 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/softnic: initialize meter policy list before use

From: Dapeng Yu <[email protected]>

Initialize meter policy list before use to avoid segment fault

Fixes 0d73ddf25faa ("net/softnic: add meter profile")
---
 drivers/net/softnic/rte_eth_softnic_meter.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/softnic/rte_eth_softnic_meter.c +3 -0
index acb8b87fd..5831892a3 100644
@@ -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);
 
Signature · 1 line
2.27.0
Acked-by on v1 1/1
#1 lore raw
Quoted 38 lines

-----Original Message-----
From: Yu, DapengX <[email protected]>
Sent: Thursday, April 29, 2021 8:06 AM
To: Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/softnic: initialize meter policy list before use

From: Dapeng Yu <[email protected]>

Initialize meter policy list before use to avoid segment fault

Fixes 0d73ddf25faa ("net/softnic: add meter profile")
---
 drivers/net/softnic/rte_eth_softnic_meter.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/softnic/rte_eth_softnic_meter.c +3 -1
index acb8b87fd..5831892a3 100644
@@ -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);
 
--
Quoted 1 line

2.27.0

Applied
#2 lore raw
Quoted 10 lines · Cristian
Quoted 10 lines

-----Original Message-----
From: Yu, DapengX <[email protected]>
Sent: Thursday, April 29, 2021 8:06 AM
To: Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Cc: [email protected]; Yu, DapengX <[email protected]>; [email protected]
Subject: [PATCH] net/softnic: initialize meter policy list before use

Quoted 8 lines
Quoted 8 lines

From: Dapeng Yu <[email protected]>

Initialize meter policy list before use to avoid segment fault

Fixes 0d73ddf25faa ("net/softnic: add meter profile")

net/softnic: initialize meter policy list before use

Quoted 3 lines

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