175a6faf6SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */ 2b772112cSMark Starovoytov /* Atlantic Network Driver 3b772112cSMark Starovoytov * 4b772112cSMark Starovoytov * Copyright (C) 2014-2019 aQuantia Corporation 5b772112cSMark Starovoytov * Copyright (C) 2019-2020 Marvell International Ltd. 6970a2e98SDavid VomLehn */ 7970a2e98SDavid VomLehn 8970a2e98SDavid VomLehn /* File aq_vec.h: Definition of common structures for vector of Rx and Tx rings. 9970a2e98SDavid VomLehn * Declaration of functions for Rx and Tx rings. 10970a2e98SDavid VomLehn */ 11970a2e98SDavid VomLehn 12970a2e98SDavid VomLehn #ifndef AQ_VEC_H 13970a2e98SDavid VomLehn #define AQ_VEC_H 14970a2e98SDavid VomLehn 15970a2e98SDavid VomLehn #include "aq_common.h" 16*0d14657fSTaehee Yoo #include "aq_nic.h" 17*0d14657fSTaehee Yoo #include "aq_ring.h" 18*0d14657fSTaehee Yoo #include "aq_hw.h" 19*0d14657fSTaehee Yoo 20970a2e98SDavid VomLehn #include <linux/irqreturn.h> 21*0d14657fSTaehee Yoo #include <linux/filter.h> 22*0d14657fSTaehee Yoo #include <linux/netdevice.h> 23970a2e98SDavid VomLehn 24970a2e98SDavid VomLehn struct aq_hw_s; 25970a2e98SDavid VomLehn struct aq_hw_ops; 26db550615SIgor Russkikh struct aq_nic_s; 27db550615SIgor Russkikh struct aq_nic_cfg_s; 28970a2e98SDavid VomLehn struct aq_ring_stats_rx_s; 29970a2e98SDavid VomLehn struct aq_ring_stats_tx_s; 30970a2e98SDavid VomLehn 31970a2e98SDavid VomLehn irqreturn_t aq_vec_isr(int irq, void *private); 32970a2e98SDavid VomLehn irqreturn_t aq_vec_isr_legacy(int irq, void *private); 33970a2e98SDavid VomLehn struct aq_vec_s *aq_vec_alloc(struct aq_nic_s *aq_nic, unsigned int idx, 34970a2e98SDavid VomLehn struct aq_nic_cfg_s *aq_nic_cfg); 358ce84271SDmitry Bezrukov int aq_vec_ring_alloc(struct aq_vec_s *self, struct aq_nic_s *aq_nic, 368ce84271SDmitry Bezrukov unsigned int idx, struct aq_nic_cfg_s *aq_nic_cfg); 374cbc9f92SIgor Russkikh int aq_vec_init(struct aq_vec_s *self, const struct aq_hw_ops *aq_hw_ops, 38970a2e98SDavid VomLehn struct aq_hw_s *aq_hw); 39970a2e98SDavid VomLehn void aq_vec_deinit(struct aq_vec_s *self); 40970a2e98SDavid VomLehn void aq_vec_free(struct aq_vec_s *self); 418ce84271SDmitry Bezrukov void aq_vec_ring_free(struct aq_vec_s *self); 42970a2e98SDavid VomLehn int aq_vec_start(struct aq_vec_s *self); 43970a2e98SDavid VomLehn void aq_vec_stop(struct aq_vec_s *self); 44970a2e98SDavid VomLehn cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self); 45508f2e3dSMark Starovoytov bool aq_vec_is_valid_tc(struct aq_vec_s *self, const unsigned int tc); 46b772112cSMark Starovoytov unsigned int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data); 47970a2e98SDavid VomLehn 48970a2e98SDavid VomLehn #endif /* AQ_VEC_H */ 49