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/u64_stats_sync.h>
13 #include <linux/interrupt.h>
15 #include "hinic_hw_qp.h"
17 #define HINIC_RX_CSUM_OFFLOAD_EN 0xFFF
18 #define HINIC_RX_CSUM_HW_CHECK_NONE BIT(7)
19 #define HINIC_RX_CSUM_IPSU_OTHER_ERR BIT(8)
21 struct hinic_rxq_stats
{
28 struct u64_stats_sync syncp
;
32 struct net_device
*netdev
;
35 struct hinic_rxq_stats rxq_stats
;
41 struct napi_struct napi
;
44 void hinic_rxq_clean_stats(struct hinic_rxq
*rxq
);
46 void hinic_rxq_get_stats(struct hinic_rxq
*rxq
, struct hinic_rxq_stats
*stats
);
48 int hinic_init_rxq(struct hinic_rxq
*rxq
, struct hinic_rq
*rq
,
49 struct net_device
*netdev
);
51 void hinic_clean_rxq(struct hinic_rxq
*rxq
);