]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/uapi/linux/openvswitch.h
Merge tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[karo-tx-linux.git] / include / uapi / linux / openvswitch.h
index 7f41f7d0000f9f0ee36c274d88ad0d330fa8f5d6..156ee4cab82e5e73bc2705a4707c04c1cf788b98 100644 (file)
@@ -343,6 +343,7 @@ enum ovs_key_attr {
 #define OVS_KEY_ATTR_MAX (__OVS_KEY_ATTR_MAX - 1)
 
 enum ovs_tunnel_key_attr {
+       /* OVS_TUNNEL_KEY_ATTR_NONE, standard nl API requires this attribute! */
        OVS_TUNNEL_KEY_ATTR_ID,                 /* be64 Tunnel ID */
        OVS_TUNNEL_KEY_ATTR_IPV4_SRC,           /* be32 src IP address. */
        OVS_TUNNEL_KEY_ATTR_IPV4_DST,           /* be32 dst IP address. */
@@ -578,10 +579,25 @@ enum ovs_sample_attr {
        OVS_SAMPLE_ATTR_PROBABILITY, /* u32 number */
        OVS_SAMPLE_ATTR_ACTIONS,     /* Nested OVS_ACTION_ATTR_* attributes. */
        __OVS_SAMPLE_ATTR_MAX,
+
+#ifdef __KERNEL__
+       OVS_SAMPLE_ATTR_ARG          /* struct sample_arg  */
+#endif
 };
 
 #define OVS_SAMPLE_ATTR_MAX (__OVS_SAMPLE_ATTR_MAX - 1)
 
+#ifdef __KERNEL__
+struct sample_arg {
+       bool exec;                   /* When true, actions in sample will not
+                                     * change flow keys. False otherwise.
+                                     */
+       u32  probability;            /* Same value as
+                                     * 'OVS_SAMPLE_ATTR_PROBABILITY'.
+                                     */
+};
+#endif
+
 /**
  * enum ovs_userspace_attr - Attributes for %OVS_ACTION_ATTR_USERSPACE action.
  * @OVS_USERSPACE_ATTR_PID: u32 Netlink PID to which the %OVS_PACKET_CMD_ACTION
@@ -678,6 +694,17 @@ struct ovs_action_hash {
  * nothing if the connection is already committed will check that the current
  * packet is in conntrack entry's original direction.  If directionality does
  * not match, will delete the existing conntrack entry and commit a new one.
+ * @OVS_CT_ATTR_EVENTMASK: Mask of bits indicating which conntrack event types
+ * (enum ip_conntrack_events IPCT_*) should be reported.  For any bit set to
+ * zero, the corresponding event type is not generated.  Default behavior
+ * depends on system configuration, but typically all event types are
+ * generated, hence listening on NFNLGRP_CONNTRACK_UPDATE events may get a lot
+ * of events.  Explicitly passing this attribute allows limiting the updates
+ * received to the events of interest.  The bit 1 << IPCT_NEW, 1 <<
+ * IPCT_RELATED, and 1 << IPCT_DESTROY must be set to ones for those events to
+ * be received on NFNLGRP_CONNTRACK_NEW and NFNLGRP_CONNTRACK_DESTROY groups,
+ * respectively.  Remaining bits control the changes for which an event is
+ * delivered on the NFNLGRP_CONNTRACK_UPDATE group.
  */
 enum ovs_ct_attr {
        OVS_CT_ATTR_UNSPEC,
@@ -689,6 +716,7 @@ enum ovs_ct_attr {
                                   related connections. */
        OVS_CT_ATTR_NAT,        /* Nested OVS_NAT_ATTR_* */
        OVS_CT_ATTR_FORCE_COMMIT,  /* No argument */
+       OVS_CT_ATTR_EVENTMASK,  /* u32 mask of IPCT_* events. */
        __OVS_CT_ATTR_MAX
 };