Page MenuHomeFreeBSD

D61578.1794769215.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D61578.1794769215.diff

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
@@ -375,13 +375,6 @@
struct netmap_adapter *na = &gna->up.up;
if_t ifp = netmap_generic_getifp(gna);
- /* Each tx slot is copied into a single mbuf cluster. */
- if (intercept && NETMAP_BUF_SIZE(na) > NM_GENERIC_MAX_BUF_SIZE) {
- nm_prerr("%s: buf size %u exceeds emulated mode max %d",
- na->name, NETMAP_BUF_SIZE(na), NM_GENERIC_MAX_BUF_SIZE);
- return (EINVAL);
- }
-
nm_os_ifnet_lock();
if (intercept) {
na->if_transmit = if_gettransmitfn(ifp);
diff --git a/sys/dev/netmap/netmap_generic.c b/sys/dev/netmap/netmap_generic.c
--- a/sys/dev/netmap/netmap_generic.c
+++ b/sys/dev/netmap/netmap_generic.c
@@ -318,6 +318,15 @@
}
if (na->active_fds == 0) {
+#ifdef NM_GENERIC_MAX_BUF_SIZE
+ /* Each tx slot is copied into a single mbuf cluster. */
+ if (NETMAP_BUF_SIZE(na) > NM_GENERIC_MAX_BUF_SIZE) {
+ nm_prerr("%s: buf size %u exceeds emulated mode max %d",
+ na->name, NETMAP_BUF_SIZE(na),
+ NM_GENERIC_MAX_BUF_SIZE);
+ return (EINVAL);
+ }
+#endif
nm_prinf("Emulated adapter for %s activated", na->name);
/* Do all memory allocations when (na->active_fds == 0), to
* simplify error management. */

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 15, 7:00 PM (23 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41747134
Default Alt Text
D61578.1794769215.diff (1 KB)

Event Timeline