treewide: remove redundant IS_ERR() before error code check
[linux/fpc-iii.git] / drivers / net / ethernet / huawei / hinic / hinic_tx.h
blobf158b7db7fb84e6c08597ef8bc3d6d0cef4c8421
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Huawei HiNIC PCI Express Linux driver
4 * Copyright(c) 2017 Huawei Technologies Co., Ltd
5 */
7 #ifndef HINIC_TX_H
8 #define HINIC_TX_H
10 #include <linux/types.h>
11 #include <linux/netdevice.h>
12 #include <linux/skbuff.h>
13 #include <linux/u64_stats_sync.h>
15 #include "hinic_common.h"
16 #include "hinic_hw_qp.h"
18 struct hinic_txq_stats {
19 u64 pkts;
20 u64 bytes;
21 u64 tx_busy;
22 u64 tx_wake;
23 u64 tx_dropped;
24 u64 big_frags_pkts;
26 struct u64_stats_sync syncp;
29 struct hinic_txq {
30 struct net_device *netdev;
31 struct hinic_sq *sq;
33 struct hinic_txq_stats txq_stats;
35 int max_sges;
36 struct hinic_sge *sges;
37 struct hinic_sge *free_sges;
39 char *irq_name;
40 struct napi_struct napi;
43 void hinic_txq_clean_stats(struct hinic_txq *txq);
45 void hinic_txq_get_stats(struct hinic_txq *txq, struct hinic_txq_stats *stats);
47 netdev_tx_t hinic_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
49 int hinic_init_txq(struct hinic_txq *txq, struct hinic_sq *sq,
50 struct net_device *netdev);
52 void hinic_clean_txq(struct hinic_txq *txq);
54 #endif