]> git.proxmox.com Git - mirror_ovs.git/commitdiff
datapath: Add conntrack limit netlink definition
authorYi-Hung Wei <yihung.wei@gmail.com>
Fri, 17 Aug 2018 09:05:05 +0000 (02:05 -0700)
committerJustin Pettit <jpettit@ovn.org>
Fri, 17 Aug 2018 16:30:41 +0000 (09:30 -0700)
Upstream commit:
    commit 5972be6b2495c6bffbf444497517fd1c070eef78
    Author: Yi-Hung Wei <yihung.wei@gmail.com>
    Date:   Thu May 24 17:56:42 2018 -0700

    openvswitch: Add conntrack limit netlink definition

    Define netlink messages and attributes to support user kernel
    communication that uses the conntrack limit feature.

Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Acked-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Yi-Hung Wei <yihung.wei@gmail.com>
Signed-off-by: Justin Pettit <jpettit@ovn.org>
datapath/linux/compat/include/linux/openvswitch.h

index 8e5f3b6fbfb19ed278b4948cede08052d2f9be9d..aaeb0341ab512856f56e3b0595d396f3b7511afa 100644 (file)
@@ -1004,4 +1004,32 @@ enum ovs_meter_band_type {
 
 #define OVS_METER_BAND_TYPE_MAX (__OVS_METER_BAND_TYPE_MAX - 1)
 
+/* Conntrack limit */
+#define OVS_CT_LIMIT_FAMILY  "ovs_ct_limit"
+#define OVS_CT_LIMIT_MCGROUP "ovs_ct_limit"
+#define OVS_CT_LIMIT_VERSION 0x1
+
+enum ovs_ct_limit_cmd {
+       OVS_CT_LIMIT_CMD_UNSPEC,
+       OVS_CT_LIMIT_CMD_SET,           /* Add or modify ct limit. */
+       OVS_CT_LIMIT_CMD_DEL,           /* Delete ct limit. */
+       OVS_CT_LIMIT_CMD_GET            /* Get ct limit. */
+};
+
+enum ovs_ct_limit_attr {
+       OVS_CT_LIMIT_ATTR_UNSPEC,
+       OVS_CT_LIMIT_ATTR_ZONE_LIMIT,   /* Nested struct ovs_zone_limit. */
+       __OVS_CT_LIMIT_ATTR_MAX
+};
+
+#define OVS_CT_LIMIT_ATTR_MAX (__OVS_CT_LIMIT_ATTR_MAX - 1)
+
+#define OVS_ZONE_LIMIT_DEFAULT_ZONE -1
+
+struct ovs_zone_limit {
+       int zone_id;
+       __u32 limit;
+       __u32 count;
+};
+
 #endif /* _LINUX_OPENVSWITCH_H */