Page MenuHomeFreeBSD

D61037.1795673302.diff
No OneTemporary

Authored By
Unknown
Size
858 B
Referenced Files
None
Subscribers
None

D61037.1795673302.diff

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

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)

Event Timeline