misc: classifier-based packet trace filter 57/22257/2
authorDave Barach <[email protected]>
Fri, 13 Sep 2019 21:47:50 +0000 (17:47 -0400)
committerDamjan Marion <[email protected]>
Wed, 25 Sep 2019 22:19:59 +0000 (22:19 +0000)
commit1b696ac9b334aa9305925e4759c6c6f6b47c3328
tree6cbc009453d33c1a7d54b5aca1a4d347bbcf0a8a
parent2abe699d10450553148307bb614979902f2bf4b3
misc: classifier-based packet trace filter

See .../src/vnet/classify/trace_classify.h for the business end
of the scheme.

It would be best to hash pkts, prefetch buckets, and do the primary
table lookups two at a time. The inline as given works, but perf
tuning will be required. "At least it works..."

Add "classify filter" debug cli, for example:
classify filter mask l3 ip4 src dst \
  match l3 ip4 dst 192.168.2.10 src 192.168.1.10

Add "pcap rx | tx trace ... filter" to use the current classify filter chain

Patch includes sphinx documentation and doxygen tags.

Next step: device-driver integration

Type: feature

Signed-off-by: Dave Barach <[email protected]>
Change-Id: I05b1358a769f61e6d32470e0c87058f640486b26
(cherry picked from commit 9137e5400699bed9f7c0095187839a8b38273100)
docs/gettingstarted/developers/vnet.md
src/vlib/main.h
src/vnet/CMakeLists.txt
src/vnet/classify/trace_classify.h [new file with mode: 0644]
src/vnet/classify/vnet_classify.c
src/vnet/ethernet/node.c
src/vnet/interface.h
src/vnet/interface_cli.c
src/vnet/interface_output.c
src/vnet/vnet.h