From owner-svn-src-all@freebsd.org Sat Oct 8 15:00:16 2016 Return-Path: Delivered-To: svn-src-all@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 CD97DC05EAC; Sat, 8 Oct 2016 15:00:16 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (220-135-115-6.HINET-IP.hinet.net [220.135.115.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "ns.kevlo.org", Issuer "ns.kevlo.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8053CF56; Sat, 8 Oct 2016 15:00:15 +0000 (UTC) (envelope-from kevlo@ns.kevlo.org) Received: from ns.kevlo.org (localhost [127.0.0.1]) by ns.kevlo.org (8.15.2/8.15.2) with ESMTPS id u98Ex9PX005257 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 8 Oct 2016 22:59:10 +0800 (CST) (envelope-from kevlo@ns.kevlo.org) Received: (from kevlo@localhost) by ns.kevlo.org (8.15.2/8.15.2/Submit) id u98Ex90o005256; Sat, 8 Oct 2016 22:59:09 +0800 (CST) (envelope-from kevlo) Date: Sat, 8 Oct 2016 22:59:09 +0800 From: Kevin Lo To: Gleb Smirnoff Cc: rwatson@FreeBSD.org, 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: <20161008145909.GA5225@ns.kevlo.org> References: <201609150741.u8F7fmcM059138@repo.freebsd.org> <20161004190920.GL23123@FreeBSD.org> <20161005032057.GA74690@ns.kevlo.org> <20161005231442.GS23123@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161005231442.GS23123@FreeBSD.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 08 Oct 2016 15:00:16 -0000 On Wed, Oct 05, 2016 at 04:14:42PM -0700, Gleb Smirnoff wrote: > > On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote: > K> > On Thu, Sep 15, 2016 at 07:41:48AM +0000, Kevin Lo wrote: > K> > K> Log: > K> > K> Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead. > K> > ... > K> > K> Modified: head/sys/contrib/ipfilter/netinet/fil.c > K> > K> ============================================================================== > K> > K> --- head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 02:48:56 2016 (r305823) > K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 2016 (r305824) > K> > K> @@ -3226,7 +3226,7 @@ filterdone: > K> > K> fdp = fin->fin_dif; > K> > K> if ((fdp != NULL) && (fdp->fd_ptr != NULL) && > K> > K> (fdp->fd_ptr != (void *)-1)) { > K> > K> - mc = M_COPY(fin->fin_m); > K> > K> + mc = M_COPYM(fin->fin_m); > K> > K> if (mc != NULL) > K> > K> ipf_fastroute(mc, &mc, fin, fdp); > K> > K> } > K> > K> > K> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h > K> > K> ============================================================================== > K> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 02:48:56 2016 (r305823) > K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h Thu Sep 15 07:41:48 2016 (r305824) > K> > K> @@ -211,7 +211,7 @@ struct ether_addr { > K> > K> # define MSGDSIZE(m) mbufchainlen(m) > K> > K> # define M_LEN(m) (m)->m_len > K> > K> # define M_ADJ(m,x) m_adj(m, x) > K> > K> -# define M_COPY(x) m_copy((x), 0, M_COPYALL) > K> > K> +# define M_COPYM(x) m_copym((x), 0, M_COPYALL, M_NOWAIT) > K> > K> # define M_DUP(m) m_dup(m, M_NOWAIT) > K> > K> # define IPF_PANIC(x,y) if (x) { printf y; panic("ipf_panic"); } > K> > K> typedef struct mbuf mb_t; > K> > K> @@ -366,7 +366,7 @@ typedef struct mb_s { > K> > K> # define MSGDSIZE(m) msgdsize(m) > K> > K> # define M_LEN(m) (m)->mb_len > K> > K> # define M_ADJ(m,x) (m)->mb_len += x > K> > K> -# define M_COPY(m) dupmbt(m) > K> > K> +# define M_COPYM(m) dupmbt(m) > K> > K> # define M_DUP(m) dupmbt(m) > K> > K> # define GETKTIME(x) gettimeofday((struct timeval *)(x), NULL) > K> > K> # define MTOD(m, t) ((t)(m)->mb_data) > K> > > K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and ip_fil_freebsd.c. > K> > In case of removal of m_copy() the macro should remain named M_COPY(), but it should be > K> > defined to call to function of m_copym(). So fil.c can be left unmodified, and ip_compat.h > K> > will have only 1 line change. The userland part of ip_compat.h which defines M_COPY() to > K> > dupmbt() doesn't need to be renamed as well. > K> > K> Actually your comments were addressed in my original patch, but rwatson@ > K> pointed out that switching M_COPY() to M_COPYM() for consistency: > K> https://reviews.freebsd.org/D7878#163304 > > This looks more like a general comment, not comment to ipfilter part. Robert, > can you confirm please? > > The ipfilter part should have modifications only in ip_compat.h and ip_fil_freebsd.c. Fixed in r306849, thanks. > -- > Totus tuus, Glebius. Kevin