Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107511570
D37436.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
D37436.diff
View Options
diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c
--- a/sys/dev/netmap/netmap_freebsd.c
+++ b/sys/dev/netmap/netmap_freebsd.c
@@ -351,6 +351,8 @@
ret = EBUSY; /* already set */
goto out;
}
+
+ ifp->if_capenable |= IFCAP_NETMAP;
gna->save_if_input = ifp->if_input;
ifp->if_input = freebsd_generic_rx_handler;
} else {
@@ -360,6 +362,8 @@
ret = EINVAL; /* not saved */
goto out;
}
+
+ ifp->if_capenable &= ~IFCAP_NETMAP;
ifp->if_input = gna->save_if_input;
gna->save_if_input = NULL;
}
diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c
--- a/sys/net/if_lagg.c
+++ b/sys/net/if_lagg.c
@@ -84,6 +84,10 @@
extern void nd6_setmtu(struct ifnet *);
#endif
+#ifdef DEV_NETMAP
+MODULE_DEPEND(if_lagg, netmap, 1, 1, 1);
+#endif
+
#define LAGG_SX_INIT(_sc) sx_init(&(_sc)->sc_sx, "if_lagg sx")
#define LAGG_SX_DESTROY(_sc) sx_destroy(&(_sc)->sc_sx)
#define LAGG_XLOCK(_sc) sx_xlock(&(_sc)->sc_sx)
@@ -2201,6 +2205,13 @@
m = NULL;
}
+#ifdef DEV_NETMAP
+ if (m != NULL && scifp->if_capenable & IFCAP_NETMAP) {
+ scifp->if_input(scifp, m);
+ m = NULL;
+ }
+#endif /* DEV_NETMAP */
+
NET_EPOCH_EXIT(et);
return (m);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 16, 6:19 AM (20 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15821161
Default Alt Text
D37436.diff (1 KB)
Attached To
Mode
D37436: if_lagg: Allow lagg interfaces to be used with NetMap
Attached
Detach File
Event Timeline
Log In to Comment