forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/ethernet/aquantia/atlantic/aq_vec.h
....@@ -1,10 +1,8 @@
1
-/*
2
- * aQuantia Corporation Network Driver
3
- * Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved
1
+/* SPDX-License-Identifier: GPL-2.0-only */
2
+/* Atlantic Network Driver
43 *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms and conditions of the GNU General Public License,
7
- * version 2, as published by the Free Software Foundation.
4
+ * Copyright (C) 2014-2019 aQuantia Corporation
5
+ * Copyright (C) 2019-2020 Marvell International Ltd.
86 */
97
108 /* File aq_vec.h: Definition of common structures for vector of Rx and Tx rings.
....@@ -28,17 +26,17 @@
2826 irqreturn_t aq_vec_isr_legacy(int irq, void *private);
2927 struct aq_vec_s *aq_vec_alloc(struct aq_nic_s *aq_nic, unsigned int idx,
3028 struct aq_nic_cfg_s *aq_nic_cfg);
29
+int aq_vec_ring_alloc(struct aq_vec_s *self, struct aq_nic_s *aq_nic,
30
+ unsigned int idx, struct aq_nic_cfg_s *aq_nic_cfg);
3131 int aq_vec_init(struct aq_vec_s *self, const struct aq_hw_ops *aq_hw_ops,
3232 struct aq_hw_s *aq_hw);
3333 void aq_vec_deinit(struct aq_vec_s *self);
3434 void aq_vec_free(struct aq_vec_s *self);
35
+void aq_vec_ring_free(struct aq_vec_s *self);
3536 int aq_vec_start(struct aq_vec_s *self);
3637 void aq_vec_stop(struct aq_vec_s *self);
3738 cpumask_t *aq_vec_get_affinity_mask(struct aq_vec_s *self);
38
-int aq_vec_get_sw_stats(struct aq_vec_s *self, u64 *data,
39
- unsigned int *p_count);
40
-void aq_vec_add_stats(struct aq_vec_s *self,
41
- struct aq_ring_stats_rx_s *stats_rx,
42
- struct aq_ring_stats_tx_s *stats_tx);
39
+bool aq_vec_is_valid_tc(struct aq_vec_s *self, const unsigned int tc);
40
+unsigned int aq_vec_get_sw_stats(struct aq_vec_s *self, const unsigned int tc, u64 *data);
4341
4442 #endif /* AQ_VEC_H */