From: Dapeng Yu Date: Thu, 29 Apr 2021 07:06:14 +0000 (+0800) Subject: net/softnic: fix meter policies initialization X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=9421152d7dcf951aae30c1b22c0c9c63875ff90a;p=dpdk.git net/softnic: fix meter policies initialization 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 Acked-by: Cristian Dumitrescu --- diff --git a/drivers/net/softnic/rte_eth_softnic_meter.c b/drivers/net/softnic/rte_eth_softnic_meter.c index acb8b87fd1..5831892a39 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);