Révision cfce4ea7
Ajouté par Ermal il y a presque 10 ans
patches/stable/10/CP_speedup.diff | ||
---|---|---|
278 | 278 |
|
279 | 279 |
if (sz < xent->len) |
280 | 280 |
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c |
281 |
index 1a6ac08..b0df96b 100644
|
|
281 |
index 1a6ac08..49f678f 100644
|
|
282 | 282 |
--- a/sys/net/if_ethersubr.c |
283 | 283 |
+++ b/sys/net/if_ethersubr.c |
284 |
@@ -742,7 +742,10 @@ ether_demux(struct ifnet *ifp, struct mbuf *m)
|
|
284 |
@@ -742,7 +742,11 @@ ether_demux(struct ifnet *ifp, struct mbuf *m)
|
|
285 | 285 |
|
286 | 286 |
if (i != 0 || m == NULL) |
287 | 287 |
return; |
288 | 288 |
- } |
289 | 289 |
+ |
290 |
+ i = m->m_flags & M_FASTFWD_OURS; |
|
290 |
+ /* M_PROTO2 is for M_IP[6]_NEXTHOP */ |
|
291 |
+ i = m->m_flags & (M_FASTFWD_OURS|M_PROTO2); |
|
291 | 292 |
+ } else |
292 | 293 |
+ i = 0; |
293 | 294 |
|
294 | 295 |
eh = mtod(m, struct ether_header *); |
295 | 296 |
ether_type = ntohs(eh->ether_type); |
296 |
@@ -781,6 +784,8 @@ ether_demux(struct ifnet *ifp, struct mbuf *m)
|
|
297 |
@@ -781,6 +785,8 @@ ether_demux(struct ifnet *ifp, struct mbuf *m)
|
|
297 | 298 |
*/ |
298 | 299 |
m->m_flags &= ~M_VLANTAG; |
299 | 300 |
m_clrprotoflags(m); |
300 | 301 |
+ if (i) |
301 |
+ m->m_flags |= M_FASTFWD_OURS; |
|
302 |
+ m->m_flags |= M_FASTFWD_OURS|M_PROTO2;
|
|
302 | 303 |
m_adj(m, ETHER_HDR_LEN); |
303 | 304 |
|
304 | 305 |
/* |
Formats disponibles : Unified diff
Take in account M_PROTO2 which is used for M_IP6_NEXTHOP which gets cleared as well