X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fthunderx%2Fnicvf_ethdev.c;h=fc334cf734ef60e5427c65bf5dceca7049b196f3;hb=891f8260dd49d4bc683cffaca79b7f7d5247b968;hp=762647e3b6eecc10aa61188376b9af688378c486;hpb=295968d1740760337e16b0d7914875c5cac52850;p=dpdk.git diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 762647e3b6..fc334cf734 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -1858,6 +1858,8 @@ nicvf_dev_close(struct rte_eth_dev *dev) nicvf_periodic_alarm_stop(nicvf_vf_interrupt, nic->snicvf[i]); } + rte_intr_instance_free(nic->intr_handle); + return 0; } @@ -2157,6 +2159,14 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev) goto fail; } + /* Allocate interrupt instance */ + nic->intr_handle = rte_intr_instance_alloc(RTE_INTR_INSTANCE_F_SHARED); + if (nic->intr_handle == NULL) { + PMD_INIT_LOG(ERR, "Failed to allocate intr handle"); + ret = -ENODEV; + goto fail; + } + nicvf_disable_all_interrupts(nic); ret = nicvf_periodic_alarm_start(nicvf_interrupt, eth_dev);