Date: Thu, 16 Jan 2014 13:42:14 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r260715 - head/sys/contrib/ipfilter/netinet Message-ID: <201401161342.s0GDgEiJ015934@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Thu Jan 16 13:42:14 2014 New Revision: 260715 URL: http://svnweb.freebsd.org/changeset/base/260715 Log: Substitute flags from historical mbuf(9) allocator with modern ones. Sponsored by: Nginx, Inc. Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Jan 16 13:24:58 2014 (r260714) +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Jan 16 13:42:14 2014 (r260715) @@ -543,7 +543,7 @@ MALLOC_DECLARE(M_IPFILTER); # ifndef ALLOC_MB_T # ifdef MGETHDR # define ALLOC_MB_T(m,l) do { \ - MGETHDR((m), M_DONTWAIT, MT_HEADER); \ + MGETHDR((m), M_NOWAIT, MT_HEADER); \ if ((m) != NULL) { \ (m)->m_len = (l); \ (m)->m_pkthdr.len = (l); \ @@ -551,7 +551,7 @@ MALLOC_DECLARE(M_IPFILTER); } while (0) # else # define ALLOC_MB_T(m,l) do { \ - MGET((m), M_DONTWAIT, MT_HEADER); \ + MGET((m), M_NOWAIT, MT_HEADER); \ if ((m) != NULL) { \ (m)->m_len = (l); \ (m)->m_pkthdr.len = (l); \ Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Jan 16 13:24:58 2014 (r260714) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Thu Jan 16 13:42:14 2014 (r260715) @@ -368,14 +368,14 @@ ipf_send_reset(fin) hlen = sizeof(ip_t); #endif #ifdef MGETHDR - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_NOWAIT, MT_HEADER); #else - MGET(m, M_DONTWAIT, MT_HEADER); + MGET(m, M_NOWAIT, MT_HEADER); #endif if (m == NULL) return -1; if (sizeof(*tcp2) + hlen > MLEN) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { FREE_MB_T(m); return -1; @@ -543,9 +543,9 @@ ipf_send_icmp_err(type, fin, dst) if (ipf_checkl4sum(fin) == -1) return -1; #ifdef MGETHDR - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_NOWAIT, MT_HEADER); #else - MGET(m, M_DONTWAIT, MT_HEADER); + MGET(m, M_NOWAIT, MT_HEADER); #endif if (m == NULL) return -1; @@ -599,7 +599,7 @@ ipf_send_icmp_err(type, fin, dst) code = icmptoicmp6unreach[code]; if (iclen + max_linkhdr + fin->fin_plen > avail) { - MCLGET(m, M_DONTWAIT); + MCLGET(m, M_NOWAIT); if ((m->m_flags & M_EXT) == 0) { FREE_MB_T(m); return -1; @@ -730,7 +730,7 @@ ipf_fastroute(m0, mpp, fin, fdp) * problem. */ if (M_WRITABLE(m) == 0) { - m0 = m_dup(m, M_DONTWAIT); + m0 = m_dup(m, M_NOWAIT); if (m0 != 0) { FREE_MB_T(m); m = m0; @@ -878,9 +878,9 @@ ipf_fastroute(m0, mpp, fin, fdp) mhlen = sizeof (struct ip); for (off = hlen + len; off < ntohs(ip->ip_len); off += len) { #ifdef MGETHDR - MGETHDR(m, M_DONTWAIT, MT_HEADER); + MGETHDR(m, M_NOWAIT, MT_HEADER); #else - MGET(m, M_DONTWAIT, MT_HEADER); + MGET(m, M_NOWAIT, MT_HEADER); #endif if (m == 0) { m = m0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401161342.s0GDgEiJ015934>