]>
Commit | Line | Data |
---|---|---|
2025cf9e | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
c3e79baf AK |
2 | /* |
3 | * Huawei HiNIC PCI Express Linux driver | |
4 | * Copyright(c) 2017 Huawei Technologies Co., Ltd | |
c3e79baf AK |
5 | */ |
6 | ||
7 | #ifndef HINIC_TX_H | |
8 | #define HINIC_TX_H | |
9 | ||
10 | #include <linux/types.h> | |
11 | #include <linux/netdevice.h> | |
00e57a6d | 12 | #include <linux/skbuff.h> |
c3e79baf AK |
13 | #include <linux/u64_stats_sync.h> |
14 | ||
00e57a6d | 15 | #include "hinic_common.h" |
c3e79baf AK |
16 | #include "hinic_hw_qp.h" |
17 | ||
18 | struct hinic_txq_stats { | |
19 | u64 pkts; | |
20 | u64 bytes; | |
21 | u64 tx_busy; | |
22 | u64 tx_wake; | |
23 | u64 tx_dropped; | |
24 | ||
25 | struct u64_stats_sync syncp; | |
26 | }; | |
27 | ||
28 | struct hinic_txq { | |
29 | struct net_device *netdev; | |
30 | struct hinic_sq *sq; | |
31 | ||
32 | struct hinic_txq_stats txq_stats; | |
00e57a6d AK |
33 | |
34 | int max_sges; | |
35 | struct hinic_sge *sges; | |
36 | struct hinic_sge *free_sges; | |
37 | ||
38 | char *irq_name; | |
39 | struct napi_struct napi; | |
c3e79baf AK |
40 | }; |
41 | ||
42 | void hinic_txq_clean_stats(struct hinic_txq *txq); | |
43 | ||
edd384f6 AK |
44 | void hinic_txq_get_stats(struct hinic_txq *txq, struct hinic_txq_stats *stats); |
45 | ||
00e57a6d AK |
46 | netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct net_device *netdev); |
47 | ||
c3e79baf AK |
48 | int hinic_init_txq(struct hinic_txq *txq, struct hinic_sq *sq, |
49 | struct net_device *netdev); | |
50 | ||
51 | void hinic_clean_txq(struct hinic_txq *txq); | |
52 | ||
53 | #endif |