Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177967616
D61037.1795673302.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
858 B
Referenced Files
None
Subscribers
None
D61037.1795673302.diff
View Options
diff --git a/sys/net/if_epair.c b/sys/net/if_epair.c
--- a/sys/net/if_epair.c
+++ b/sys/net/if_epair.c
@@ -208,9 +208,16 @@
int ret;
ret = rss_m2bucket(m, &bucket);
- if (ret) {
- /* Actually hash the packet. */
+ if (ret && m->m_len >= ETHER_HDR_LEN) {
+ /*
+ * Actually hash the packet. The software hash reads the IP
+ * header at the start of the mbuf, so step over the Ethernet
+ * header while it runs.
+ */
eh = mtod(m, struct ether_header *);
+ m->m_data += ETHER_HDR_LEN;
+ m->m_len -= ETHER_HDR_LEN;
+ m->m_pkthdr.len -= ETHER_HDR_LEN;
switch (ntohs(eh->ether_type)) {
#ifdef INET
@@ -227,7 +234,11 @@
bucket = 0;
break;
}
- }
+ m->m_data -= ETHER_HDR_LEN;
+ m->m_len += ETHER_HDR_LEN;
+ m->m_pkthdr.len += ETHER_HDR_LEN;
+ } else if (ret)
+ bucket = 0;
bucket %= sc->num_queues;
#else
bucket = 0;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 26, 6:08 AM (12 m, 43 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41264188
Default Alt Text
D61037.1795673302.diff (858 B)
Attached To
Mode
D61037: if_epair: Hash the IP header, not the Ethernet header, for fanout
Attached
Detach File
Event Timeline