mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
Extend OVS IPFIX exporter to export tunnel headers
Extend IPFIX exporter to export tunnel headers when both input and output of the port. Add three other_config options in IPFIX table: enable-input-sampling, enable-output-sampling and enable-tunnel-sampling, to control whether sampling tunnel info, on which direction (input or output). Insert sampling action before output action and the output tunnel port is sent to datapath in the sampling action. Make datapath collect output tunnel info and send it back to userpace in upcall message with a new additional optional attribute. Add a tunnel ports map to make the tunnel port lookup faster in sampling upcalls in IPFIX exporter. Make the IPFIX exporter generate IPFIX template sets with enterprise elements for the tunnel info, save the tunnel info in IPFIX cache entries, and send IPFIX DATA with tunnel info. Add flowDirection element in IPFIX templates. Signed-off-by: Wenyu Zhang <wenyuz@vmware.com> Acked-by: Romain Lenglet <rlenglet@vmware.com> Acked-by: Ben Pfaff <blp@nicira.com> Acked-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
committed by
Pravin B Shelar
parent
84067a4c1a
commit
8b7ea2d480
@@ -1653,6 +1653,7 @@ parse_odp_packet(struct ofpbuf *buf, struct dpif_upcall *upcall,
|
||||
|
||||
/* OVS_PACKET_CMD_ACTION only. */
|
||||
[OVS_PACKET_ATTR_USERDATA] = { .type = NL_A_UNSPEC, .optional = true },
|
||||
[OVS_PACKET_ATTR_EGRESS_TUN_KEY] = { .type = NL_A_NESTED, .optional = true },
|
||||
};
|
||||
|
||||
struct ovs_header *ovs_header;
|
||||
@@ -1687,6 +1688,7 @@ parse_odp_packet(struct ofpbuf *buf, struct dpif_upcall *upcall,
|
||||
nl_attr_get(a[OVS_PACKET_ATTR_KEY]));
|
||||
upcall->key_len = nl_attr_get_size(a[OVS_PACKET_ATTR_KEY]);
|
||||
upcall->userdata = a[OVS_PACKET_ATTR_USERDATA];
|
||||
upcall->out_tun_key = a[OVS_PACKET_ATTR_EGRESS_TUN_KEY];
|
||||
|
||||
/* Allow overwriting the netlink attribute header without reallocating. */
|
||||
ofpbuf_use_stub(&upcall->packet,
|
||||
|
Reference in New Issue
Block a user