File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,7 @@ static int netvsc_init_buf(struct hv_device *device,
311
311
struct nvsp_message * init_packet ;
312
312
unsigned int buf_size ;
313
313
size_t map_words ;
314
- int ret = 0 ;
314
+ int i , ret = 0 ;
315
315
316
316
/* Get receive buffer area. */
317
317
buf_size = device_info -> recv_sections * device_info -> recv_section_size ;
@@ -405,6 +405,16 @@ static int netvsc_init_buf(struct hv_device *device,
405
405
goto cleanup ;
406
406
}
407
407
408
+ for (i = 0 ; i < VRSS_CHANNEL_MAX ; i ++ ) {
409
+ struct netvsc_channel * nvchan = & net_device -> chan_table [i ];
410
+
411
+ nvchan -> recv_buf = kzalloc (net_device -> recv_section_size , GFP_KERNEL );
412
+ if (nvchan -> recv_buf == NULL ) {
413
+ ret = - ENOMEM ;
414
+ goto cleanup ;
415
+ }
416
+ }
417
+
408
418
/* Setup receive completion ring.
409
419
* Add 1 to the recv_section_cnt because at least one entry in a
410
420
* ring buffer has to be empty.
@@ -1549,12 +1559,6 @@ struct netvsc_device *netvsc_device_add(struct hv_device *device,
1549
1559
for (i = 0 ; i < VRSS_CHANNEL_MAX ; i ++ ) {
1550
1560
struct netvsc_channel * nvchan = & net_device -> chan_table [i ];
1551
1561
1552
- nvchan -> recv_buf = kzalloc (device_info -> recv_section_size , GFP_KERNEL );
1553
- if (nvchan -> recv_buf == NULL ) {
1554
- ret = - ENOMEM ;
1555
- goto cleanup2 ;
1556
- }
1557
-
1558
1562
nvchan -> channel = device -> channel ;
1559
1563
nvchan -> net_device = net_device ;
1560
1564
u64_stats_init (& nvchan -> tx_stats .syncp );
Original file line number Diff line number Diff line change @@ -465,7 +465,7 @@ void rsc_add_data(struct netvsc_channel *nvchan,
465
465
}
466
466
nvchan -> rsc .pktlen = len ;
467
467
if (hash_info != NULL ) {
468
- nvchan -> rsc .csum_info = * csum_info ;
468
+ nvchan -> rsc .hash_info = * hash_info ;
469
469
nvchan -> rsc .ppi_flags |= NVSC_RSC_HASH_INFO ;
470
470
} else {
471
471
nvchan -> rsc .ppi_flags &= ~NVSC_RSC_HASH_INFO ;
You can’t perform that action at this time.
0 commit comments