diff options
author | Benoît Ganne <bganne@cisco.com> | 2021-03-03 17:37:25 +0100 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2021-04-22 11:12:59 +0000 |
commit | 5cfe45211ac7977ab9bf07b817fe9a5d00226eb3 (patch) | |
tree | 1154a67367b5cbd8343ecdc48518746bdcc8642a /src/vnet/classify | |
parent | d06e2eb1a1d570367b4076772ac66bc95e3a7bd8 (diff) |
misc: add filter for specific error for pcap trace
Type: feature
Change-Id: I325257454df1cc22833fa6a1dedd4739d4d5a558
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/vnet/classify')
-rw-r--r-- | src/vnet/classify/pcap_classify.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/classify/pcap_classify.h b/src/vnet/classify/pcap_classify.h index 1f1c38fd6e6..e079816f62c 100644 --- a/src/vnet/classify/pcap_classify.h +++ b/src/vnet/classify/pcap_classify.h @@ -33,6 +33,7 @@ vnet_is_packet_pcaped (vnet_pcap_t *pp, vlib_buffer_t *b, u32 sw_if_index) { const u32 pcap_sw_if_index = pp->pcap_sw_if_index; const u32 filter_classify_table_index = pp->filter_classify_table_index; + const vlib_error_t pcap_error_index = pp->pcap_error_index; if (pcap_sw_if_index != 0) { @@ -42,6 +43,9 @@ vnet_is_packet_pcaped (vnet_pcap_t *pp, vlib_buffer_t *b, u32 sw_if_index) return 0; /* wrong interface, skip */ } + if (pcap_error_index != (vlib_error_t) ~0 && pcap_error_index != b->error) + return 0; /* wrong error */ + if (filter_classify_table_index != ~0 && vnet_is_packet_traced_inline (b, filter_classify_table_index, 0 /* full classify */) != 1) |