Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F176840899
D31584.1793471546.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D31584.1793471546.diff
View Options
Index: sys/net/if_gre.c
===================================================================
--- sys/net/if_gre.c
+++ sys/net/if_gre.c
@@ -643,46 +643,37 @@
static uint32_t
gre_flowid(struct gre_softc *sc, struct mbuf *m, uint32_t af)
{
- uint32_t flowid;
+ uint32_t flowid = 0;
if ((sc->gre_options & GRE_UDPENCAP) == 0 || sc->gre_port != 0)
- return (0);
-#ifndef RSS
- switch (af) {
-#ifdef INET
- case AF_INET:
- flowid = mtod(m, struct ip *)->ip_src.s_addr ^
- mtod(m, struct ip *)->ip_dst.s_addr;
- break;
-#endif
-#ifdef INET6
- case AF_INET6:
- flowid = mtod(m, struct ip6_hdr *)->ip6_src.s6_addr32[3] ^
- mtod(m, struct ip6_hdr *)->ip6_dst.s6_addr32[3];
- break;
-#endif
- default:
- flowid = 0;
- }
-#else /* RSS */
+ return (flowid);
switch (af) {
#ifdef INET
case AF_INET:
+#ifdef RSS
flowid = rss_hash_ip4_2tuple(mtod(m, struct ip *)->ip_src,
mtod(m, struct ip *)->ip_dst);
break;
+#endif
+ flowid = mtod(m, struct ip *)->ip_src.s_addr ^
+ mtod(m, struct ip *)->ip_dst.s_addr;
+ break;
#endif
#ifdef INET6
case AF_INET6:
+#ifdef RSS
flowid = rss_hash_ip6_2tuple(
&mtod(m, struct ip6_hdr *)->ip6_src,
&mtod(m, struct ip6_hdr *)->ip6_dst);
break;
+#endif
+ flowid = mtod(m, struct ip6_hdr *)->ip6_src.s6_addr32[3] ^
+ mtod(m, struct ip6_hdr *)->ip6_dst.s6_addr32[3];
+ break;
#endif
default:
- flowid = 0;
+ break;
}
-#endif
return (flowid);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 31, 6:32 PM (3 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41263536
Default Alt Text
D31584.1793471546.diff (1 KB)
Attached To
Mode
D31584: gre: simplify RSS ifdefs
Attached
Detach File
Event Timeline