[dpdk-dev] RFC - adding filter to packet capture API
Stephen Hemminger
stephen at networkplumber.org
Mon Dec 9 17:49:18 CET 2019
On Mon, 9 Dec 2019 13:41:30 +0000
"Ananyev, Konstantin" <konstantin.ananyev at intel.com> wrote:
> >
> > 4. Keep existing function signature, but be type unsafe.
> > This keeps API, but still is ABI breakage for programs that passed
> > garbage. Plus C is unsafe enough already.
> >
>
> My preference is probably #4, with some extra changes:
> make actual type for 'filter' be determined by flags,
> something like:
>
> enum {
> RTE_PDUMP_FLAG_RX = 1, /* receive direction */
> RTE_PDUMP_FLAG_TX = 2, /* transmit direction */
> + RTE_PDUMP_FLAG_CBPF = 4, /* filter points to struct bpf_program */
> /* both receive and transmit directions */
> RTE_PDUMP_FLAG_RXTX = (RTE_PDUMP_FLAG_RX|RTE_PDUMP_FLAG_TX)
> };
Interesting but that is more awkward usage.
More information about the dev
mailing list