Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162636805
D56420.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
D56420.diff
View Options
diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c
--- a/sys/netinet/tcp_lro.c
+++ b/sys/netinet/tcp_lro.c
@@ -1422,15 +1422,20 @@
{
int error;
+ CURVNET_SET(lc->ifp->if_vnet);
#ifdef INET
/* Quickly decide if packet cannot be LRO'ed */
- if (__predict_false(V_ipforwarding != 0))
+ if (__predict_false(V_ipforwarding != 0)) {
+ CURVNET_RESTORE();
return (TCP_LRO_CANNOT);
+ }
#endif
#ifdef INET6
/* Quickly decide if packet cannot be LRO'ed */
- if (__predict_false(V_ip6_forwarding != 0))
+ if (__predict_false(V_ip6_forwarding != 0)) {
+ CURVNET_RESTORE();
return (TCP_LRO_CANNOT);
+ }
#endif
if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) !=
@@ -1442,12 +1447,12 @@
* a packet.
*/
counter_u64_add(tcp_bad_csums, 1);
+ CURVNET_RESTORE();
return (TCP_LRO_CANNOT);
}
/* get current time */
binuptime(&lc->lro_last_queue_time);
- CURVNET_SET(lc->ifp->if_vnet);
error = tcp_lro_rx_common(lc, m, csum, true);
if (__predict_false(error != 0)) {
/*
@@ -1474,10 +1479,12 @@
return;
}
+ CURVNET_SET(lc->ifp->if_vnet);
#ifdef INET
/* Quickly decide if packet cannot be LRO'ed */
if (__predict_false(V_ipforwarding != 0)) {
/* input packet to network layer */
+ CURVNET_RESTORE();
(*lc->ifp->if_input) (lc->ifp, mb);
return;
}
@@ -1486,10 +1493,12 @@
/* Quickly decide if packet cannot be LRO'ed */
if (__predict_false(V_ip6_forwarding != 0)) {
/* input packet to network layer */
+ CURVNET_RESTORE();
(*lc->ifp->if_input) (lc->ifp, mb);
return;
}
#endif
+ CURVNET_RESTORE();
/* check if packet is not LRO capable */
if (__predict_false((lc->ifp->if_capenable & IFCAP_LRO) == 0)) {
/* input packet to network layer */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 16, 7:17 AM (13 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35129058
Default Alt Text
D56420.diff (1 KB)
Attached To
Mode
D56420: tcp lro: fix vnet handling
Attached
Detach File
Event Timeline
Log In to Comment