Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106106741
D8520.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D8520.diff
View Options
Index: head/sys/dev/hyperv/netvsc/if_hn.c
===================================================================
--- head/sys/dev/hyperv/netvsc/if_hn.c
+++ head/sys/dev/hyperv/netvsc/if_hn.c
@@ -504,7 +504,7 @@
{
int i;
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i)
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i)
sc->hn_rx_ring[i].hn_lro.lro_length_lim = lenlim;
}
#endif
@@ -2554,7 +2554,7 @@
*/
--ackcnt;
HN_LOCK(sc);
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i)
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i)
sc->hn_rx_ring[i].hn_lro.lro_ackcnt_lim = ackcnt;
HN_UNLOCK(sc);
return 0;
@@ -2578,7 +2578,7 @@
return error;
HN_LOCK(sc);
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i) {
struct hn_rx_ring *rxr = &sc->hn_rx_ring[i];
if (on)
@@ -2646,7 +2646,7 @@
uint64_t stat;
stat = 0;
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i) {
rxr = &sc->hn_rx_ring[i];
stat += *((uint64_t *)((uint8_t *)rxr + ofs));
}
@@ -2656,7 +2656,7 @@
return error;
/* Zero out this stat. */
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i) {
rxr = &sc->hn_rx_ring[i];
*((uint64_t *)((uint8_t *)rxr + ofs)) = 0;
}
@@ -2674,7 +2674,7 @@
u_long stat;
stat = 0;
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i) {
rxr = &sc->hn_rx_ring[i];
stat += *((u_long *)((uint8_t *)rxr + ofs));
}
@@ -2684,7 +2684,7 @@
return error;
/* Zero out this stat. */
- for (i = 0; i < sc->hn_rx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_rx_ring_cnt; ++i) {
rxr = &sc->hn_rx_ring[i];
*((u_long *)((uint8_t *)rxr + ofs)) = 0;
}
@@ -2700,7 +2700,7 @@
u_long stat;
stat = 0;
- for (i = 0; i < sc->hn_tx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_tx_ring_cnt; ++i) {
txr = &sc->hn_tx_ring[i];
stat += *((u_long *)((uint8_t *)txr + ofs));
}
@@ -2710,7 +2710,7 @@
return error;
/* Zero out this stat. */
- for (i = 0; i < sc->hn_tx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_tx_ring_cnt; ++i) {
txr = &sc->hn_tx_ring[i];
*((u_long *)((uint8_t *)txr + ofs)) = 0;
}
@@ -2732,7 +2732,7 @@
return error;
HN_LOCK(sc);
- for (i = 0; i < sc->hn_tx_ring_inuse; ++i) {
+ for (i = 0; i < sc->hn_tx_ring_cnt; ++i) {
txr = &sc->hn_tx_ring[i];
*((int *)((uint8_t *)txr + ofs)) = conf;
}
@@ -3603,7 +3603,7 @@
{
int i;
- for (i = 0; i < sc->hn_tx_ring_inuse; ++i)
+ for (i = 0; i < sc->hn_tx_ring_cnt; ++i)
sc->hn_tx_ring[i].hn_chim_size = chim_size;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 12:30 PM (12 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15604730
Default Alt Text
D8520.diff (2 KB)
Attached To
Mode
D8520: hyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse.
Attached
Detach File
Event Timeline
Log In to Comment