On Mon, 9 Dec 2019 13:41:30 +0000
"Ananyev, Konstantin" <konstantin.anan...@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.

Reply via email to