Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163511578
D11948.id31852.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D11948.id31852.diff
View Options
Index: sys/dev/hyperv/netvsc/if_hn.c
===================================================================
--- sys/dev/hyperv/netvsc/if_hn.c
+++ sys/dev/hyperv/netvsc/if_hn.c
@@ -1266,16 +1266,37 @@
rm_runlock(&hn_vfmap_lock, &pt);
if (hn_ifp != NULL) {
- /*
- * Fix up rcvif and go through hn(4)'s if_input and
- * increase ipackets.
- */
for (mn = m; mn != NULL; mn = mn->m_nextpkt) {
- /* Allow tapping on the VF. */
+ /*
+ * Allow tapping on the VF.
+ */
ETHER_BPF_MTAP(vf_ifp, mn);
+
+ /*
+ * Update VF stats.
+ */
+ if ((vf_ifp->if_capenable & IFCAP_HWSTATS) == 0) {
+ if_inc_counter(vf_ifp, IFCOUNTER_IBYTES,
+ mn->m_pkthdr.len);
+ }
+ /*
+ * XXX IFCOUNTER_IMCAST
+ * This stat updating is kinda invasive, since it
+ * requires two checks on the mbuf: the length check
+ * and the ethernet header check. As of this write,
+ * all multicast packets go directly to hn(4), which
+ * makes imcast stat updating in the VF a try in vian.
+ */
+
+ /*
+ * Fix up rcvif and increase hn(4)'s ipackets.
+ */
mn->m_pkthdr.rcvif = hn_ifp;
if_inc_counter(hn_ifp, IFCOUNTER_IPACKETS, 1);
}
+ /*
+ * Go through hn(4)'s if_input.
+ */
hn_ifp->if_input(hn_ifp, m);
} else {
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 11:44 PM (6 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35456298
Default Alt Text
D11948.id31852.diff (1 KB)
Attached To
Mode
D11948: hyperv/hn: Update VF's ibytes properly under transparent VF mode.
Attached
Detach File
Event Timeline
Log In to Comment