@@ -168,8 +168,8 @@ void hns3_set_vector_coalesce_rl(struct hns3_enet_tqp_vector *tqp_vector,
168
168
* GL and RL(Rate Limiter) are 2 ways to acheive interrupt coalescing
169
169
*/
170
170
171
- if (rl_reg > 0 && !tqp_vector -> tx_group .gl_adapt_enable &&
172
- !tqp_vector -> rx_group .gl_adapt_enable )
171
+ if (rl_reg > 0 && !tqp_vector -> tx_group .coal . gl_adapt_enable &&
172
+ !tqp_vector -> rx_group .coal . gl_adapt_enable )
173
173
/* According to the hardware, the range of rl_reg is
174
174
* 0-59 and the unit is 4.
175
175
*/
@@ -205,17 +205,17 @@ static void hns3_vector_gl_rl_init(struct hns3_enet_tqp_vector *tqp_vector,
205
205
*/
206
206
207
207
/* Default: enable interrupt coalescing self-adaptive and GL */
208
- tqp_vector -> tx_group .gl_adapt_enable = 1 ;
209
- tqp_vector -> rx_group .gl_adapt_enable = 1 ;
208
+ tqp_vector -> tx_group .coal . gl_adapt_enable = 1 ;
209
+ tqp_vector -> rx_group .coal . gl_adapt_enable = 1 ;
210
210
211
- tqp_vector -> tx_group .int_gl = HNS3_INT_GL_50K ;
212
- tqp_vector -> rx_group .int_gl = HNS3_INT_GL_50K ;
211
+ tqp_vector -> tx_group .coal . int_gl = HNS3_INT_GL_50K ;
212
+ tqp_vector -> rx_group .coal . int_gl = HNS3_INT_GL_50K ;
213
213
214
214
/* Default: disable RL */
215
215
h -> kinfo .int_rl_setting = 0 ;
216
216
217
- tqp_vector -> rx_group .flow_level = HNS3_FLOW_LOW ;
218
- tqp_vector -> tx_group .flow_level = HNS3_FLOW_LOW ;
217
+ tqp_vector -> rx_group .coal . flow_level = HNS3_FLOW_LOW ;
218
+ tqp_vector -> tx_group .coal . flow_level = HNS3_FLOW_LOW ;
219
219
}
220
220
221
221
static void hns3_vector_gl_rl_init_hw (struct hns3_enet_tqp_vector * tqp_vector ,
@@ -224,9 +224,9 @@ static void hns3_vector_gl_rl_init_hw(struct hns3_enet_tqp_vector *tqp_vector,
224
224
struct hnae3_handle * h = priv -> ae_handle ;
225
225
226
226
hns3_set_vector_coalesce_tx_gl (tqp_vector ,
227
- tqp_vector -> tx_group .int_gl );
227
+ tqp_vector -> tx_group .coal . int_gl );
228
228
hns3_set_vector_coalesce_rx_gl (tqp_vector ,
229
- tqp_vector -> rx_group .int_gl );
229
+ tqp_vector -> rx_group .coal . int_gl );
230
230
hns3_set_vector_coalesce_rl (tqp_vector , h -> kinfo .int_rl_setting );
231
231
}
232
232
@@ -2393,12 +2393,12 @@ static bool hns3_get_new_int_gl(struct hns3_enet_ring_group *ring_group)
2393
2393
u16 new_int_gl ;
2394
2394
int usecs ;
2395
2395
2396
- if (!ring_group -> int_gl )
2396
+ if (!ring_group -> coal . int_gl )
2397
2397
return false;
2398
2398
2399
2399
if (ring_group -> total_packets == 0 ) {
2400
- ring_group -> int_gl = HNS3_INT_GL_50K ;
2401
- ring_group -> flow_level = HNS3_FLOW_LOW ;
2400
+ ring_group -> coal . int_gl = HNS3_INT_GL_50K ;
2401
+ ring_group -> coal . flow_level = HNS3_FLOW_LOW ;
2402
2402
return true;
2403
2403
}
2404
2404
@@ -2408,10 +2408,10 @@ static bool hns3_get_new_int_gl(struct hns3_enet_ring_group *ring_group)
2408
2408
* 20-1249MB/s high (18000 ints/s)
2409
2409
* > 40000pps ultra (8000 ints/s)
2410
2410
*/
2411
- new_flow_level = ring_group -> flow_level ;
2412
- new_int_gl = ring_group -> int_gl ;
2411
+ new_flow_level = ring_group -> coal . flow_level ;
2412
+ new_int_gl = ring_group -> coal . int_gl ;
2413
2413
tqp_vector = ring_group -> ring -> tqp_vector ;
2414
- usecs = (ring_group -> int_gl << 1 );
2414
+ usecs = (ring_group -> coal . int_gl << 1 );
2415
2415
bytes_per_usecs = ring_group -> total_bytes / usecs ;
2416
2416
/* 1000000 microseconds */
2417
2417
packets_per_secs = ring_group -> total_packets * 1000000 / usecs ;
@@ -2458,9 +2458,9 @@ static bool hns3_get_new_int_gl(struct hns3_enet_ring_group *ring_group)
2458
2458
2459
2459
ring_group -> total_bytes = 0 ;
2460
2460
ring_group -> total_packets = 0 ;
2461
- ring_group -> flow_level = new_flow_level ;
2462
- if (new_int_gl != ring_group -> int_gl ) {
2463
- ring_group -> int_gl = new_int_gl ;
2461
+ ring_group -> coal . flow_level = new_flow_level ;
2462
+ if (new_int_gl != ring_group -> coal . int_gl ) {
2463
+ ring_group -> coal . int_gl = new_int_gl ;
2464
2464
return true;
2465
2465
}
2466
2466
return false;
@@ -2472,18 +2472,18 @@ static void hns3_update_new_int_gl(struct hns3_enet_tqp_vector *tqp_vector)
2472
2472
struct hns3_enet_ring_group * tx_group = & tqp_vector -> tx_group ;
2473
2473
bool rx_update , tx_update ;
2474
2474
2475
- if (rx_group -> gl_adapt_enable ) {
2475
+ if (rx_group -> coal . gl_adapt_enable ) {
2476
2476
rx_update = hns3_get_new_int_gl (rx_group );
2477
2477
if (rx_update )
2478
2478
hns3_set_vector_coalesce_rx_gl (tqp_vector ,
2479
- rx_group -> int_gl );
2479
+ rx_group -> coal . int_gl );
2480
2480
}
2481
2481
2482
- if (tx_group -> gl_adapt_enable ) {
2482
+ if (tx_group -> coal . gl_adapt_enable ) {
2483
2483
tx_update = hns3_get_new_int_gl (& tqp_vector -> tx_group );
2484
2484
if (tx_update )
2485
2485
hns3_set_vector_coalesce_tx_gl (tqp_vector ,
2486
- tx_group -> int_gl );
2486
+ tx_group -> coal . int_gl );
2487
2487
}
2488
2488
}
2489
2489
0 commit comments