[dpdk-dev] [PATCH v10 06/12] pdump: support pcapng and filtering

Pattan, Reshma reshma.pattan at intel.com
Fri Sep 24 17:33:24 CEST 2021



> -----Original Message-----
> > >
> > > +		 * Similar behavior to rte_bpf_eth callback.
> > > +		 * if BPF program returns zero value for a given packet,
> > > +		 * then it will be ignored.
> > > +		 */
> > Looks like wrong callback name referred in the comment, should be
> corrected?
> 
> It really is pcap_offline_filter() and Linux kernel socket filter.

Oh ok, rcs[i] is basically "return value of the filter program. This will be zero if the packet doesn't match the filter and non-zero if the packet matches the filter." 
got it now on why is the below if check.

> 
> > > +		if (cbs->filter && rcs[i] == 0) {


More information about the dev mailing list