]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
networkd: vxlan add option to set FDB entries
authorSusant Sahani <ssahani@gmail.com>
Wed, 21 Oct 2015 07:05:33 +0000 (12:35 +0530)
committerSusant Sahani <ssahani@gmail.com>
Tue, 3 Nov 2015 03:58:03 +0000 (09:28 +0530)
Add support to configures maximum number of FDB entries.

src/network/networkd-netdev-gperf.gperf
src/network/networkd-netdev-vxlan.c
src/network/networkd-netdev-vxlan.h

index 4aac2398503b4962a41c25a19f229fc3aa62a49f..4a4b400e416793c8782151090564efd2a18e974e 100644 (file)
@@ -56,6 +56,7 @@ VXLAN.UDP6ZeroCheckSumRx,    config_parse_bool,                  0,
 VXLAN.UDP6ZeroCheckSumTx,    config_parse_bool,                  0,                             offsetof(VxLan, udp6zerocsumtx)
 VXLAN.FDBAgeingSec,          config_parse_sec,                   0,                             offsetof(VxLan, fdb_ageing)
 VXLAN.GroupPolicyExtension,  config_parse_bool,                  0,                             offsetof(VxLan, group_policy)
+VXLAN.MaximumFDBEntries,     config_parse_unsigned,              0,                             offsetof(VxLan, max_fdb)
 Tun.OneQueue,                config_parse_bool,                  0,                             offsetof(TunTap, one_queue)
 Tun.MultiQueue,              config_parse_bool,                  0,                             offsetof(TunTap, multi_queue)
 Tun.PacketInfo,              config_parse_bool,                  0,                             offsetof(TunTap, packet_info)
index baf6dd6623aa9e6ef933f4b466af82ae6cebf0bf..755ad2f9347485c644175b77c2500f89d95def8e 100644 (file)
@@ -91,6 +91,12 @@ static int netdev_vxlan_fill_message_create(NetDev *netdev, Link *link, sd_netli
                         return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_AGEING attribute: %m");
         }
 
+        if (v->max_fdb) {
+                r = sd_netlink_message_append_u32(m, IFLA_VXLAN_LIMIT, v->max_fdb);
+                if (r < 0)
+                        return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_LIMIT attribute: %m");
+        }
+
         r = sd_netlink_message_append_u8(m, IFLA_VXLAN_UDP_CSUM, v->udpcsum);
         if (r < 0)
                 return log_netdev_error_errno(netdev, r, "Could not append IFLA_VXLAN_UDP_CSUM attribute: %m");
index 4ec33946cce6b6cc56e3079c255a1d7250aafaff..d21f355f5dce4a82618e424507185ad8bc588dcd 100644 (file)
@@ -39,6 +39,7 @@ struct VxLan {
 
         unsigned tos;
         unsigned ttl;
+        unsigned max_fdb;
 
         usec_t fdb_ageing;