1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
2 | /* Atlantic Network Driver |
3 | * |
4 | * Copyright (C) 2014-2019 aQuantia Corporation |
5 | * Copyright (C) 2019-2020 Marvell International Ltd. |
6 | */ |
7 | |
8 | /* File aq_vec.h: Definition of common structures for vector of Rx and Tx rings. |
9 | * Declaration of functions for Rx and Tx rings. |
10 | */ |
11 | |
12 | #ifndef AQ_VEC_H |
13 | #define AQ_VEC_H |
14 | |
15 | #include "aq_common.h" |
16 | #include "aq_nic.h" |
17 | #include "aq_ring.h" |
18 | #include "aq_hw.h" |
19 | |
20 | #include <linux/irqreturn.h> |
21 | #include <linux/filter.h> |
22 | #include <linux/netdevice.h> |
23 | |
24 | struct aq_hw_s; |
25 | struct aq_hw_ops; |
26 | struct aq_nic_s; |
27 | struct aq_nic_cfg_s; |
28 | struct aq_ring_stats_rx_s; |
29 | struct aq_ring_stats_tx_s; |
30 | |
31 | irqreturn_t aq_vec_isr(int irq, void *private); |
32 | irqreturn_t aq_vec_isr_legacy(int irq, void *private); |
33 | struct aq_vec_s *aq_vec_alloc(struct aq_nic_s *aq_nic, unsigned int idx, |
34 | struct aq_nic_cfg_s *aq_nic_cfg); |
35 | int aq_vec_ring_alloc(struct aq_vec_s *self, struct aq_nic_s *aq_nic, |
36 | unsigned int idx, struct aq_nic_cfg_s *aq_nic_cfg); |
37 | int aq_vec_init(struct aq_vec_s *self, const struct aq_hw_ops *aq_hw_ops, |
38 | struct aq_hw_s *aq_hw); |
39 | void aq_vec_deinit(struct aq_vec_s *self); |
40 | void aq_vec_free(struct aq_vec_s *self); |
41 | void aq_vec_ring_free(struct aq_vec_s *self); |
42 | int aq_vec_start(struct aq_vec_s *self); |
43 | void aq_vec_stop(struct aq_vec_s *self); |
44 | cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self); |
45 | bool aq_vec_is_valid_tc(struct aq_vec_s *self, const unsigned int tc); |
46 | unsigned int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data); |
47 | |
48 | #endif /* AQ_VEC_H */ |
49 | |