[dpdk-dev] [PATCH v10 06/12] pdump: support pcapng and filtering
Stephen Hemminger
stephen at networkplumber.org
Thu Sep 23 20:23:17 CEST 2021
On Thu, 23 Sep 2021 16:11:42 +0000
"Pattan, Reshma" <reshma.pattan at intel.com> wrote:
> >
> > + * 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.
> > + if (cbs->filter && rcs[i] == 0) {
> Why do we need to do this again if some packets already filtered.
The earlier call (rte_bpf_exec_burst) returns the number of packets that were
processed. Actually, the return value there is always equal n.
So this code is the filtering, there was an issue with checking return value of exec_burst.
More information about the dev
mailing list