On Fri, Oct 30, 2015 at 12:56:34PM +0100, Reyk Floeter wrote:
> --- sys/sys/mbuf.h    22 Oct 2015 05:26:06 -0000      1.198
> +++ sys/sys/mbuf.h    30 Oct 2015 11:30:33 -0000
> @@ -410,6 +410,7 @@ struct    mbuf *m_get(int, int);
>  struct       mbuf *m_getclr(int, int);
>  struct       mbuf *m_gethdr(int, int);
>  struct       mbuf *m_inithdr(struct mbuf *);
> +void m_resethdr(struct mbuf *);
>  int        m_defrag(struct mbuf *, int);

The m_resethdr should have the same indent as m_defrag.

> --- sys/net/if_pair.c 25 Oct 2015 12:59:57 -0000      1.4
> +++ sys/net/if_pair.c 30 Oct 2015 11:30:33 -0000
> @@ -30,6 +30,11 @@
>  #include <netinet/in.h>
>  #include <netinet/if_ether.h>
>  
> +#include "pf.h"
> +#if NPF > 0
> +#include <net/pfvar.h>
> +#endif

I think you don't need that anymore.

> @@ -182,9 +187,13 @@ pairstart(struct ifnet *ifp)
>  #endif /* NBPFILTER > 0 */
>  
>               ifp->if_opackets++;
> -             if (pairedifp != NULL)
> +             if (pairedifp != NULL) {
> +#if NPF > 0
> +                     if (m->m_flags & M_PKTHDR)
> +                             m_resethdr(m);
> +#endif

Calling m_tag_delete_chain() is not pf specific, so I would do it
without the #if NPF.

Otherwise OK bluhm@

Socket splicing somove() does the same thing.  I will change it to
use m_resethdr() after that got commited.

Reply via email to