numam-dpdk/drivers/common/octeontx2/otx2_irq.h
Jerin Jacob 5868ccdbf1 common/octeontx2: introduce irq handling functions
All PCIe drivers(ethdev, mempool, cryptodev and eventdev) in octeontx2,
needs to handle interrupt for mailbox and error handling.
Create a helper function over rte interrupt API to register,
unregister, disable interrupts.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
2019-06-25 23:35:57 +02:00

26 lines
695 B
C

/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(C) 2019 Marvell International Ltd.
*/
#ifndef _OTX2_IRQ_H_
#define _OTX2_IRQ_H_
#include <rte_pci.h>
#include <rte_interrupts.h>
#include "otx2_common.h"
typedef struct {
/* 128 devices translate to two 64 bits dwords */
#define MAX_VFPF_DWORD_BITS 2
uint64_t bits[MAX_VFPF_DWORD_BITS];
} otx2_intr_t;
int otx2_register_irq(struct rte_intr_handle *intr_handle,
rte_intr_callback_fn cb, void *data, unsigned int vec);
void otx2_unregister_irq(struct rte_intr_handle *intr_handle,
rte_intr_callback_fn cb, void *data, unsigned int vec);
int otx2_disable_irqs(struct rte_intr_handle *intr_handle);
#endif /* _OTX2_IRQ_H_ */