History

openvswitch: include datapath actions with sampled-packet upcall to userspace

If new optional attribute OVS_USERSPACE_ATTR_ACTIONS is added to an OVS_ACTION_ATTR_USERSPACE action, then include the datapath actions in the upcall. This Directly associates the sampled packet with the path it takes through the virtual switch. Path information currently includes mangling, encapsulation and decapsulation actions for tunneling protocols GRE, VXLAN, Geneve, MPLS and QinQ, but this extension requires no further changes to accommodate datapath actions that may be added in the future. Adding path information enhances visibility into complex virtual networks.

Neil McKee committed 11 years ago

Commit ccea7441 parent bdef7de4 files · +37 −10Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/openvswitch.h+4−0
@@ -153,6 +153,8 @@ enum ovs_packet_cmd { · 152 unmodified lines
153153 * flow key against the kernel's.
154154 * @OVS_PACKET_ATTR_ACTIONS: Contains actions for the packet. Used
155155 * for %OVS_PACKET_CMD_EXECUTE. It has nested %OVS_ACTION_ATTR_* attributes.
156+ * Also used in upcall when %OVS_ACTION_ATTR_USERSPACE has optional
157+ * %OVS_USERSPACE_ATTR_ACTIONS attribute.
156158 * @OVS_PACKET_ATTR_USERDATA: Present for an %OVS_PACKET_CMD_ACTION
157159 * notification if the %OVS_ACTION_ATTR_USERSPACE action specified an
158160 * %OVS_USERSPACE_ATTR_USERDATA attribute, with the same length and content
@@ -528,6 +530,7 @@ enum ovs_sample_attr { · 369 unmodified lines
528530 * copied to the %OVS_PACKET_CMD_ACTION message as %OVS_PACKET_ATTR_USERDATA.
529531 * @OVS_USERSPACE_ATTR_EGRESS_TUN_PORT: If present, u32 output port to get
530532 * tunnel info.
533+ * @OVS_USERSPACE_ATTR_ACTIONS: If present, send actions with upcall.
531534 */
532535 enum ovs_userspace_attr {
533536 OVS_USERSPACE_ATTR_UNSPEC,
@@ -535,6 +538,7 @@ enum ovs_userspace_attr { · 1 unmodified line
535538 OVS_USERSPACE_ATTR_USERDATA, /* Optional user-specified cookie. */
536539 OVS_USERSPACE_ATTR_EGRESS_TUN_PORT, /* Optional, u32 output port
537540 * to get tunnel info. */
541+ OVS_USERSPACE_ATTR_ACTIONS, /* Optional flag to get actions. */
538542 __OVS_USERSPACE_ATTR_MAX
539543 };
540544