From owner-svn-src-all@FreeBSD.ORG Wed Oct 22 05:21:38 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B7CF21D; Wed, 22 Oct 2014 05:21:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CE5D3D7; Wed, 22 Oct 2014 05:21:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9M5LbuR029340; Wed, 22 Oct 2014 05:21:37 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9M5LbGK029337; Wed, 22 Oct 2014 05:21:37 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201410220521.s9M5LbGK029337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Wed, 22 Oct 2014 05:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273453 - head/sys/netpfil/ipfw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2014 05:21:38 -0000 Author: luigi Date: Wed Oct 22 05:21:36 2014 New Revision: 273453 URL: https://svnweb.freebsd.org/changeset/base/273453 Log: remove/fix old code for building ipfw and dummynet in userspace Modified: head/sys/netpfil/ipfw/ip_dn_io.c head/sys/netpfil/ipfw/ip_fw_private.h head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_dn_io.c ============================================================================== --- head/sys/netpfil/ipfw/ip_dn_io.c Wed Oct 22 04:16:09 2014 (r273452) +++ head/sys/netpfil/ipfw/ip_dn_io.c Wed Oct 22 05:21:36 2014 (r273453) @@ -283,7 +283,7 @@ mq_append(struct mq *q, struct mbuf *m) *m_new = *m; // copy m_new->m_flags &= ~M_STACK; m_new->__m_extbuf = p; // point to new buffer - pkt_copy(m->__m_extbuf, p, m->__m_extlen); + _pkt_copy(m->__m_extbuf, p, m->__m_extlen); m_new->m_data = p + ofs; m = m_new; } Modified: head/sys/netpfil/ipfw/ip_fw_private.h ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_private.h Wed Oct 22 04:16:09 2014 (r273452) +++ head/sys/netpfil/ipfw/ip_fw_private.h Wed Oct 22 05:21:36 2014 (r273453) @@ -354,29 +354,6 @@ struct ipfw_ifc { }; /* Macro for working with various counters */ -#ifdef USERSPACE -#define IPFW_INC_RULE_COUNTER(_cntr, _bytes) do { \ - (_cntr)->pcnt++; \ - (_cntr)->bcnt += _bytes; \ - (_cntr)->timestamp = time_uptime; \ - } while (0) - -#define IPFW_INC_DYN_COUNTER(_cntr, _bytes) do { \ - (_cntr)->pcnt++; \ - (_cntr)->bcnt += _bytes; \ - } while (0) - -#define IPFW_ZERO_RULE_COUNTER(_cntr) do { \ - (_cntr)->pcnt = 0; \ - (_cntr)->bcnt = 0; \ - (_cntr)->timestamp = 0; \ - } while (0) - -#define IPFW_ZERO_DYN_COUNTER(_cntr) do { \ - (_cntr)->pcnt = 0; \ - (_cntr)->bcnt = 0; \ - } while (0) -#else #define IPFW_INC_RULE_COUNTER(_cntr, _bytes) do { \ counter_u64_add((_cntr)->cntr, 1); \ counter_u64_add((_cntr)->cntr + 1, _bytes); \ @@ -399,7 +376,6 @@ struct ipfw_ifc { (_cntr)->pcnt = 0; \ (_cntr)->bcnt = 0; \ } while (0) -#endif #define TARG_VAL(ch, k, f) ((struct table_value *)((ch)->valuestate))[k].f #define IP_FW_ARG_TABLEARG(ch, a, f) \ Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Oct 22 04:16:09 2014 (r273452) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Oct 22 05:21:36 2014 (r273453) @@ -152,8 +152,6 @@ static struct ipfw_sopt_handler scodes[] * static variables followed by global ones */ -#ifndef USERSPACE - static VNET_DEFINE(uma_zone_t, ipfw_cntr_zone); #define V_ipfw_cntr_zone VNET(ipfw_cntr_zone) @@ -191,35 +189,6 @@ free_rule(struct ip_fw *rule) uma_zfree(V_ipfw_cntr_zone, rule->cntr); free(rule, M_IPFW); } -#else -void -ipfw_init_counters() -{ -} - -void -ipfw_destroy_counters() -{ -} - -struct ip_fw * -ipfw_alloc_rule(struct ip_fw_chain *chain, size_t rulesize) -{ - struct ip_fw *rule; - - rule = malloc(rulesize, M_IPFW, M_WAITOK | M_ZERO); - - return (rule); -} - -static void -free_rule(struct ip_fw *rule) -{ - - free(rule, M_IPFW); -} - -#endif /*