Date: Mon, 18 Jul 2016 09:07:44 GMT From: vincenzo@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r306414 - soc2016/vincenzo/head/sys/dev/netmap Message-ID: <201607180907.u6I97iOh020004@socsvn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: vincenzo Date: Mon Jul 18 09:07:43 2016 New Revision: 306414 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=306414 Log: freebsd: ptnet_transmit: add BPF support Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Modified: soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c ============================================================================== --- soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jul 18 09:07:19 2016 (r306413) +++ soc2016/vincenzo/head/sys/dev/netmap/if_ptnet.c Mon Jul 18 09:07:43 2016 (r306414) @@ -55,6 +55,7 @@ #include <net/if_types.h> #include <net/if_media.h> #include <net/if_vlan_var.h> +#include <net/bpf.h> #include <netinet/in_systm.h> #include <netinet/in.h> @@ -1743,6 +1744,10 @@ /* Consume the packet just processed. */ drbr_advance(ifp, pq->bufring); + + /* Copy the packet to listeners. */ + ETHER_BPF_MTAP(ifp, mhead); + m_freem(mhead); if (++batch_count == PTNET_TX_BATCH) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607180907.u6I97iOh020004>