diff options
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h index 81fe9f849973..eb61014ad615 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | |||
@@ -38,7 +38,9 @@ struct rcb_common_cb; | |||
38 | #define HNS_RCB_MAX_COALESCED_FRAMES 1023 | 38 | #define HNS_RCB_MAX_COALESCED_FRAMES 1023 |
39 | #define HNS_RCB_MIN_COALESCED_FRAMES 1 | 39 | #define HNS_RCB_MIN_COALESCED_FRAMES 1 |
40 | #define HNS_RCB_DEF_COALESCED_FRAMES 50 | 40 | #define HNS_RCB_DEF_COALESCED_FRAMES 50 |
41 | #define HNS_RCB_MAX_TIME_OUT 0x500 | 41 | #define HNS_RCB_CLK_FREQ_MHZ 350 |
42 | #define HNS_RCB_MAX_COALESCED_USECS 0x3ff | ||
43 | #define HNS_RCB_DEF_COALESCED_USECS 3 | ||
42 | 44 | ||
43 | #define HNS_RCB_COMMON_ENDIAN 1 | 45 | #define HNS_RCB_COMMON_ENDIAN 1 |
44 | 46 | ||
@@ -82,7 +84,7 @@ struct ring_pair_cb { | |||
82 | 84 | ||
83 | int virq[HNS_RCB_IRQ_NUM_PER_QUEUE]; | 85 | int virq[HNS_RCB_IRQ_NUM_PER_QUEUE]; |
84 | 86 | ||
85 | u8 port_id_in_dsa; | 87 | u8 port_id_in_comm; |
86 | u8 used_by_vf; | 88 | u8 used_by_vf; |
87 | 89 | ||
88 | struct hns_ring_hw_stats hw_stats; | 90 | struct hns_ring_hw_stats hw_stats; |
@@ -97,8 +99,6 @@ struct rcb_common_cb { | |||
97 | 99 | ||
98 | u8 comm_index; | 100 | u8 comm_index; |
99 | u32 ring_num; | 101 | u32 ring_num; |
100 | u32 coalesced_frames; /* frames threshold of rx interrupt */ | ||
101 | u32 timeout; /* time threshold of rx interrupt */ | ||
102 | u32 desc_num; /* desc num per queue*/ | 102 | u32 desc_num; /* desc num per queue*/ |
103 | 103 | ||
104 | struct ring_pair_cb ring_pair_cb[0]; | 104 | struct ring_pair_cb ring_pair_cb[0]; |
@@ -125,13 +125,14 @@ void hns_rcbv2_int_clr_hw(struct hnae_queue *q, u32 flag); | |||
125 | void hns_rcb_init_hw(struct ring_pair_cb *ring); | 125 | void hns_rcb_init_hw(struct ring_pair_cb *ring); |
126 | void hns_rcb_reset_ring_hw(struct hnae_queue *q); | 126 | void hns_rcb_reset_ring_hw(struct hnae_queue *q); |
127 | void hns_rcb_wait_fbd_clean(struct hnae_queue **qs, int q_num, u32 flag); | 127 | void hns_rcb_wait_fbd_clean(struct hnae_queue **qs, int q_num, u32 flag); |
128 | 128 | u32 hns_rcb_get_coalesced_frames( | |
129 | u32 hns_rcb_get_coalesced_frames(struct dsaf_device *dsaf_dev, int comm_index); | 129 | struct rcb_common_cb *rcb_common, u32 port_idx); |
130 | u32 hns_rcb_get_coalesce_usecs(struct dsaf_device *dsaf_dev, int comm_index); | 130 | u32 hns_rcb_get_coalesce_usecs( |
131 | void hns_rcb_set_coalesce_usecs(struct dsaf_device *dsaf_dev, | 131 | struct rcb_common_cb *rcb_common, u32 port_idx); |
132 | int comm_index, u32 timeout); | 132 | int hns_rcb_set_coalesce_usecs( |
133 | int hns_rcb_set_coalesced_frames(struct dsaf_device *dsaf_dev, | 133 | struct rcb_common_cb *rcb_common, u32 port_idx, u32 timeout); |
134 | int comm_index, u32 coalesce_frames); | 134 | int hns_rcb_set_coalesced_frames( |
135 | struct rcb_common_cb *rcb_common, u32 port_idx, u32 coalesced_frames); | ||
135 | void hns_rcb_update_stats(struct hnae_queue *queue); | 136 | void hns_rcb_update_stats(struct hnae_queue *queue); |
136 | 137 | ||
137 | void hns_rcb_get_stats(struct hnae_queue *queue, u64 *data); | 138 | void hns_rcb_get_stats(struct hnae_queue *queue, u64 *data); |