From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yi-Hung Wei Subject: [PATCH net-next v4 1/2] openvswitch: Add conntrack limit netlink definition Date: Mon, 21 May 2018 17:16:04 -0700 Message-ID: <1526948165-32443-2-git-send-email-yihung.wei@gmail.com> References: <1526948165-32443-1-git-send-email-yihung.wei@gmail.com> Cc: Yi-Hung Wei To: netdev@vger.kernel.org, pshelar@ovn.org Return-path: Received: from mail-pl0-f65.google.com ([209.85.160.65]:42153 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751722AbeEVARS (ORCPT ); Mon, 21 May 2018 20:17:18 -0400 Received: by mail-pl0-f65.google.com with SMTP id u6-v6so9752126pls.9 for ; Mon, 21 May 2018 17:17:17 -0700 (PDT) In-Reply-To: <1526948165-32443-1-git-send-email-yihung.wei@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: Define netlink messages and attributes to support user kernel communication that uses the conntrack limit feature. Signed-off-by: Yi-Hung Wei --- include/uapi/linux/openvswitch.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 713e56ce681f..d8da2b7591f5 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h @@ -937,4 +937,30 @@ 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) + +struct ovs_zone_limit { + int zone_id; + __u32 limit; + __u32 count; +}; + #endif /* _LINUX_OPENVSWITCH_H */ -- 2.7.4