1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Huawei HiNIC PCI Express Linux driver
4 * Copyright(c) 2017 Huawei Technologies Co., Ltd
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 {
26 struct u64_stats_sync syncp;
30 struct net_device *netdev;
33 struct hinic_txq_stats txq_stats;
36 struct hinic_sge *sges;
37 struct hinic_sge *free_sges;
40 struct napi_struct napi;
43 void hinic_txq_get_stats(struct hinic_txq *txq, struct hinic_txq_stats *stats);
45 netdev_tx_t hinic_lb_xmit_frame(struct sk_buff *skb, struct net_device *netdev);
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);