ipfix-export: Add APIs to get/send buffers 18/34018/3
authorPaul Atkins <patkins@graphiant.com>
Mon, 27 Sep 2021 20:30:13 +0000 (21:30 +0100)
committerNeale Ranns <neale@graphiant.com>
Mon, 22 Nov 2021 09:30:09 +0000 (09:30 +0000)
commit19a5f23b23e4eec54d99f105725ddc4df7421a5c
tree57c37b8de8d7391d4f47efc857f875bbeb68b709
parent0352ea0c779ddcb636325406695ffc659a6e21db
ipfix-export: Add APIs to get/send buffers

The ipfix exporter should be doing most of the work of building packets
and sending them rather than leaving every client of the exporter to do
all the work themselves. Start to move towards that by adding APIs to
get and send buffers. Store the state of this in new per thread data on
the report so that we can send with minimal use of atomics.  We do need
an atomic for the sequence number in the packet though as that contains
the number of data_records sent for the 'stream', not just for a single
core. As the state is stored on the flow_report_t the caller needs to
know which report they are using, so add a field to the args struct used
to create the report that is used to pass back the report index on success.

Type: improvement
Signed-off-by: Paul Atkins <patkins@graphiant.com>
Change-Id: I222b98a3f0326b3b71b11e0866a8c9736bed6dc1
src/vnet/ipfix-export/flow_api.c
src/vnet/ipfix-export/flow_report.c
src/vnet/ipfix-export/flow_report.h