mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 15:55:19 +00:00
ipfix: Add support for exporting ipfix statistics.
It is meaningful for user to check the stats of IPFIX. Using IPFIX stats, user can know how much flows the system can support. It is also can be used for performance check of IPFIX. IPFIX stats is added for per IPFIX exporter. If bridge IPFIX is enabled on the bridge, the whole bridge will have one exporter. For flow IPFIX, the system keeps per id (column in Flow_Sample_Collector_Set) per exporter. 1) Add 'ovs-ofctl dump-ipfix-bridge SWITCH' to export IPFIX stats of the bridge which enable bridge IPFIX. The output format: NXST_IPFIX_BRIDGE reply (xid=0x2): bridge ipfix: flows=0, current flows=0, sampled pkts=0, \ ipv4 ok=0, ipv6 ok=0, tx pkts=0 pkts errs=0, ipv4 errs=0, ipv6 errs=0, tx errs=0 2) Add 'ovs-ofctl dump-ipfix-flow SWITCH' to export IPFIX stats of the bridge which enable flow IPFIX. The output format: NXST_IPFIX_FLOW reply (xid=0x2): 2 ids id 1: flows=4, current flows=4, sampled pkts=14, ipv4 ok=13, \ ipv6 ok=0, tx pkts=0 pkts errs=0, ipv4 errs=0, ipv6 errs=0, tx errs=0 id 2: flows=0, current flows=0, sampled pkts=0, ipv4 ok=0, \ ipv6 ok=0, tx pkts=0 pkts errs=0, ipv4 errs=0, ipv6 errs=0, tx errs=0 flows: the number of total flow records, including those exported. current flows: the number of current flow records cached. sampled pkts: Successfully sampled packet count. ipv4 ok: successfully sampled IPv4 flow packet count. ipv6 ok: Successfully sampled IPv6 flow packet count. tx pkts: the count of IPFIX exported packets sent to the collector(s). pkts errs: count of packets failed when sampling, maybe not supported or other error. ipv4 errs: Count of IPV4 flow packet in the error packets. ipv6 errs: Count of IPV6 flow packet in the error packets. tx errs: the count of IPFIX exported packets failed when sending to the collector(s). Signed-off-by: Benli Ye <daniely@vmware.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -1139,6 +1139,25 @@ int ofputil_decode_port_stats(struct ofputil_port_stats *, struct ofpbuf *msg);
|
||||
enum ofperr ofputil_decode_port_stats_request(const struct ofp_header *request,
|
||||
ofp_port_t *ofp10_port);
|
||||
|
||||
struct ofputil_ipfix_stats {
|
||||
uint32_t collector_set_id; /* Used only for flow-based IPFIX statistics. */
|
||||
uint64_t total_flows; /* Totabl flows of this IPFIX exporter. */
|
||||
uint64_t current_flows; /* Current flows of this IPFIX exporter. */
|
||||
uint64_t pkts; /* Successfully sampled packets. */
|
||||
uint64_t ipv4_pkts; /* Successfully sampled IPV4 packets. */
|
||||
uint64_t ipv6_pkts; /* Successfully sampled IPV6 packets. */
|
||||
uint64_t error_pkts; /* Error packets when sampling. */
|
||||
uint64_t ipv4_error_pkts; /* Error IPV4 packets when sampling. */
|
||||
uint64_t ipv6_error_pkts; /* Error IPV6 packets when sampling. */
|
||||
uint64_t tx_pkts; /* TX IPFIX packets. */
|
||||
uint64_t tx_errors; /* IPFIX packets TX errors. */
|
||||
};
|
||||
|
||||
void ofputil_append_ipfix_stat(struct ovs_list *replies,
|
||||
const struct ofputil_ipfix_stats *ois);
|
||||
size_t ofputil_count_ipfix_stats(const struct ofp_header *);
|
||||
int ofputil_pull_ipfix_stats(struct ofputil_ipfix_stats *, struct ofpbuf *msg);
|
||||
|
||||
struct ofputil_queue_stats_request {
|
||||
ofp_port_t port_no; /* OFPP_ANY means "all ports". */
|
||||
uint32_t queue_id;
|
||||
|
Reference in New Issue
Block a user