2 * Huawei HiNIC PCI Express Linux driver
3 * Copyright(c) 2017 Huawei Technologies Co., Ltd
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.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19 #include <linux/types.h>
20 #include <linux/netdevice.h>
21 #include <linux/skbuff.h>
22 #include <linux/u64_stats_sync.h>
24 #include "hinic_common.h"
25 #include "hinic_hw_qp.h"
27 struct hinic_txq_stats
{
34 struct u64_stats_sync syncp
;
38 struct net_device
*netdev
;
41 struct hinic_txq_stats txq_stats
;
44 struct hinic_sge
*sges
;
45 struct hinic_sge
*free_sges
;
48 struct napi_struct napi
;
51 void hinic_txq_clean_stats(struct hinic_txq
*txq
);
53 void hinic_txq_get_stats(struct hinic_txq
*txq
, struct hinic_txq_stats
*stats
);
55 netdev_tx_t
hinic_xmit_frame(struct sk_buff
*skb
, struct net_device
*netdev
);
57 int hinic_init_txq(struct hinic_txq
*txq
, struct hinic_sq
*sq
,
58 struct net_device
*netdev
);
60 void hinic_clean_txq(struct hinic_txq
*txq
);