From owner-svn-src-head@freebsd.org Tue Oct 4 19:09:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B561FAF5056; Tue, 4 Oct 2016 19:09:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (glebi.us [96.95.210.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebi.us", Issuer "cell.glebi.us" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 869DBE44; Tue, 4 Oct 2016 19:09:21 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebi.us (localhost [127.0.0.1]) by cell.glebi.us (8.15.2/8.15.2) with ESMTPS id u94J9KkQ015104 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 4 Oct 2016 12:09:20 -0700 (PDT) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebi.us (8.15.2/8.15.2/Submit) id u94J9KGe015103; Tue, 4 Oct 2016 12:09:20 -0700 (PDT) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebi.us: glebius set sender to glebius@FreeBSD.org using -f Date: Tue, 4 Oct 2016 12:09:20 -0700 From: Gleb Smirnoff To: Kevin Lo Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys Message-ID: <20161004190920.GL23123@FreeBSD.org> References: <201609150741.u8F7fmcM059138@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201609150741.u8F7fmcM059138@repo.freebsd.org> User-Agent: Mutt/1.6.1 (2016-04-27) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Oct 2016 19:09:21 -0000 Kevin, On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: K> Log: K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. ... K> Modified: head/sys/contrib/ipfilter/netinet/fil.c K> ============================================================================== K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 2016 (r305823) K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 2016 (r305824) K> @@ -3226,7 +3226,7 @@ filterdone: K> fdp = fin->fin_dif; K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && K> (fdp->fd_ptr != (void *)-1)) { K> - mc = M_COPY(fin->fin_m); K> + mc = M_COPYM(fin->fin_m); K> if (mc != NULL) K> ipf_fastroute(mc, &mc, fin, fdp); K> } K> K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h K> ============================================================================== K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:48:56 2016 (r305823) K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:41:48 2016 (r305824) K> @@ -211,7 +211,7 @@ struct ether_addr { K> # define MSGDSIZE(m) mbufchainlen(m) K> # define M_LEN(m) (m)->m_len K> # define M_ADJ(m,x) m_adj(m, x) K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) K> # define M_DUP(m) m_dup(m, M_NOWAIT) K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } K> typedef struct mbuf mb_t; K> @@ -366,7 +366,7 @@ typedef struct mb_s { K> # define MSGDSIZE(m) msgdsize(m) K> # define M_LEN(m) (m)->mb_len K> # define M_ADJ(m,x) (m)->mb_len += x K> -# define M_COPY(m) dupmbt(m) K> +# define M_COPYM(m) dupmbt(m) K> # define M_DUP(m) dupmbt(m) K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) K> # define MTOD(m, t) ((t)(m)->mb_data) IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil_freebsd.c. In case of removal of m_copy() the macro should remain named M_COPY(), but it should be defined to call to function of m_copym(). So fil.c can be left unmodified, and ip_compat.h will have only 1 line change. The userland part of ip_compat.h which defines M_COPY() to dupmbt() doesn't need to be renamed as well. -- Totus tuus, Glebius.