Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-08 Thread Cy Schubert
In message <20161008145909.ga5...@ns.kevlo.org>, Kevin Lo writes:
> 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 +, Kevin Lo wrote:
> > K> > K> Log:
> > K> > K>   Remove the 4.3BSD compatible macro m_copy(), use m_copym() instea
> d.
> > 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 201
> 6 (r305823)
> > K> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c Thu Sep 15 07:41:48 201
> 6 (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, , 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:4
> 8:56 2016 (r305823)
> > K> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.h   Thu Sep 15 07:4
> 1: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), NUL
> L)
> > K> > K>  # define   MTOD(m, t)  ((t)(m)->mb_data)
> > K> > 
> > K> > IMHO, for contributed ipfilter we should only modify ip_compat.h and i
> p_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 unmodif
> ied, and ip_compat.h
> > K> > will have only 1 line change. The userland part of ip_compat.h which d
> efines 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. Rober
> t,
> > can you confirm please?
> > 
> > The ipfilter part should have modifications only in ip_compat.h and ip_fil_
> freebsd.c.
> 
> Fixed in r306849, thanks.

Thank you Kevin.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-08 Thread Kevin Lo
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 +, 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, , 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>  #  defineMSGDSIZE(m) mbufchainlen(m)
> K> > K>  #  defineM_LEN(m)(m)->m_len
> K> > K>  #  defineM_ADJ(m,x)  m_adj(m, x)
> K> > K> -#  defineM_COPY(x)   m_copy((x), 0, M_COPYALL)
> K> > K> +#  defineM_COPYM(x)  m_copym((x), 0, M_COPYALL, M_NOWAIT)
> K> > K>  #  defineM_DUP(m)m_dup(m, M_NOWAIT)
> K> > K>  #  defineIPF_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
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-05 Thread Gleb Smirnoff
On Wed, Oct 05, 2016 at 11:20:58AM +0800, Kevin Lo wrote:
K> > On Thu, Sep 15, 2016 at 07:41:48AM +, 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, , 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.

-- 
Totus tuus, Glebius.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-04 Thread Cy Schubert
In message <20161005032057.ga74...@ns.kevlo.org>, Kevin Lo writes:
> On Tue, Oct 04, 2016 at 12:09:20PM -0700, Gleb Smirnoff wrote:
> > 
> >   Kevin,
> 
> Hi Gleb,
> 
> > On Thu, Sep 15, 2016 at 07:41:48AM +, 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 201
> 6 (r305823)
> > K> +++ head/sys/contrib/ipfilter/netinet/fil.c  Thu Sep 15 07:41:48 201
> 6 (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, , fin, fdp);
> > K>  }
> > K> 
> > K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
> > K> 
> ==
> > K> --- head/sys/contrib/ipfilter/netinet/ip_compat.hThu Sep 15 02:4
> 8:56 2016 (r305823)
> > K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.hThu Sep 15 07:4
> 1: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>  # defineMSGDSIZE(m) msgdsize(m)
> > K>  # defineM_LEN(m)(m)->mb_len
> > K>  # defineM_ADJ(m,x)  (m)->mb_len += x
> > K> -# defineM_COPY(m)   dupmbt(m)
> > K> +# defineM_COPYM(m)  dupmbt(m)
> > K>  # defineM_DUP(m)dupmbt(m)
> > K>  # defineGETKTIME(x) gettimeofday((struct timeval *)(x), NUL
> L)
> > K>  # defineMTOD(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 define
> s M_COPY() to
> > dupmbt() doesn't need to be renamed as well.
> 
> Actually your comments were addressed in my original patch, but rwatson@
> pointed out that switching M_COPY() to M_COPYM() for consistency:
> https://reviews.freebsd.org/D7878#163304

There is no really easy answer to this. Yes, it's nice, even important, to 
have consistency across the entire tree. On the flip side, keeping the 
number of non-functional changes to contributed software to a minimum aids 
merge of future releases. There are advantages and disadvantages to each. 
One could even go so far as to modify contributed software to comply with 
FreeBSD style(9) standards (extreme example). However, merge of new 
releases would constitute a POLA violation to future developers merging new 
releases into the tree. I think leaving as vanilla as possible aids in 
future maintenance and upgrades. My vote would be that the macro remain 
named M_COPY().

The downside of this is that someone not well versed with a certain contrib 
code might be astonished at the use of a different macro. There are pluses 
and minuses to either approach but I think that the merge argument may be a 
stronger argument for M_COPY() remaining in contrib code.

It's not inconceivable that mis-merges can be and are the cause of some 
interesting bugs.

That's my $0.02.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-04 Thread Kevin Lo
On Tue, Oct 04, 2016 at 12:09:20PM -0700, Gleb Smirnoff wrote:
> 
>   Kevin,

Hi Gleb,

> On Thu, Sep 15, 2016 at 07:41:48AM +, 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.cThu Sep 15 02:48:56 
> 2016(r305823)
> K> +++ head/sys/contrib/ipfilter/netinet/fil.cThu 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, , 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 @@ typedefstruct  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.

Actually your comments were addressed in my original patch, but rwatson@
pointed out that switching M_COPY() to M_COPYM() for consistency:
https://reviews.freebsd.org/D7878#163304

> -- 
> Totus tuus, Glebius.

Kevin
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-10-04 Thread Gleb Smirnoff
  Kevin,

On Thu, Sep 15, 2016 at 07:41:48AM +, 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, , fin, fdp);
K>  }
K> 
K> Modified: head/sys/contrib/ipfilter/netinet/ip_compat.h
K> 
==
K> --- head/sys/contrib/ipfilter/netinet/ip_compat.hThu Sep 15 02:48:56 
2016(r305823)
K> +++ head/sys/contrib/ipfilter/netinet/ip_compat.hThu 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>  # defineMSGDSIZE(m) msgdsize(m)
K>  # defineM_LEN(m)(m)->mb_len
K>  # defineM_ADJ(m,x)  (m)->mb_len += x
K> -# defineM_COPY(m)   dupmbt(m)
K> +# defineM_COPYM(m)  dupmbt(m)
K>  # defineM_DUP(m)dupmbt(m)
K>  # defineGETKTIME(x) gettimeofday((struct timeval *)(x), NULL)
K>  # defineMTOD(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.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-09-15 Thread Ngie Cooper

> On Sep 15, 2016, at 06:46, Kevin Lo  wrote:

...

> Bumped(r305833), thanks.

Thanks :)!
-Ngie
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-09-15 Thread Kevin Lo
On Thu, Sep 15, 2016 at 12:58:33AM -0700, Ngie Cooper (yaneurabeya) wrote:
> 
> > On Sep 15, 2016, at 00:41, Kevin Lo  wrote:
> > 
> > Author: kevlo
> > Date: Thu Sep 15 07:41:48 2016
> > New Revision: 305824
> > URL: https://svnweb.freebsd.org/changeset/base/305824
> > 
> > Log:
> >  Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead.
> > 
> >  Reviewed by:   gnn
> >  Differential Revision: https://reviews.freebsd.org/D7878
> > 
> > Modified:
> >  head/sys/contrib/ipfilter/netinet/fil.c
> >  head/sys/contrib/ipfilter/netinet/ip_compat.h
> >  head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
> >  head/sys/kern/uipc_socket.c
> >  head/sys/net/if_arcsubr.c
> >  head/sys/net/if_fddisubr.c
> >  head/sys/net/if_iso88025subr.c
> >  head/sys/net/raw_usrreq.c
> >  head/sys/netinet/ip_input.c
> >  head/sys/netinet/ip_mroute.c
> >  head/sys/netinet/raw_ip.c
> >  head/sys/netinet/tcp_output.c
> >  head/sys/netinet/udp_usrreq.c
> >  head/sys/netinet6/icmp6.c
> >  head/sys/netinet6/ip6_forward.c
> >  head/sys/netinet6/ip6_mroute.c
> >  head/sys/netinet6/ip6_output.c
> >  head/sys/netinet6/raw_ip6.c
> >  head/sys/netinet6/udp6_usrreq.c
> >  head/sys/netipsec/keysock.c
> >  head/sys/sys/mbuf.h
> 
> Bump __FreeBSD_version for the change (just in case something’s using the 
> #define elsewhere)?

Bumped(r305833), thanks.

> Thanks!
> -Ngie

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Re: svn commit: r305824 - in head/sys: contrib/ipfilter/netinet kern net netinet netinet6 netipsec sys

2016-09-15 Thread Ngie Cooper (yaneurabeya)

> On Sep 15, 2016, at 00:41, Kevin Lo  wrote:
> 
> Author: kevlo
> Date: Thu Sep 15 07:41:48 2016
> New Revision: 305824
> URL: https://svnweb.freebsd.org/changeset/base/305824
> 
> Log:
>  Remove the 4.3BSD compatible macro m_copy(), use m_copym() instead.
> 
>  Reviewed by: gnn
>  Differential Revision:   https://reviews.freebsd.org/D7878
> 
> Modified:
>  head/sys/contrib/ipfilter/netinet/fil.c
>  head/sys/contrib/ipfilter/netinet/ip_compat.h
>  head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c
>  head/sys/kern/uipc_socket.c
>  head/sys/net/if_arcsubr.c
>  head/sys/net/if_fddisubr.c
>  head/sys/net/if_iso88025subr.c
>  head/sys/net/raw_usrreq.c
>  head/sys/netinet/ip_input.c
>  head/sys/netinet/ip_mroute.c
>  head/sys/netinet/raw_ip.c
>  head/sys/netinet/tcp_output.c
>  head/sys/netinet/udp_usrreq.c
>  head/sys/netinet6/icmp6.c
>  head/sys/netinet6/ip6_forward.c
>  head/sys/netinet6/ip6_mroute.c
>  head/sys/netinet6/ip6_output.c
>  head/sys/netinet6/raw_ip6.c
>  head/sys/netinet6/udp6_usrreq.c
>  head/sys/netipsec/keysock.c
>  head/sys/sys/mbuf.h

Bump __FreeBSD_version for the change (just in case something’s using the 
#define elsewhere)?
Thanks!
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail