Skip to content

Commit dda7517

Browse files
kuba-moodavem330
authored andcommitted
netdevsim: support the static IANA VXLAN port flag
Allow setting UDP_TUNNEL_NIC_INFO_STATIC_IANA_VXLAN. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b20e6c1 commit dda7517

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/net/netdevsim/netdevsim.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ struct nsim_dev {
217217
bool open_only;
218218
bool ipv4_only;
219219
bool shared;
220+
bool static_iana_vxlan;
220221
u32 sleep;
221222
} udp_ports;
222223
};

‎drivers/net/netdevsim/udp_tunnels.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ int nsim_udp_tunnels_info_create(struct nsim_dev *nsim_dev,
186186
info->flags |= UDP_TUNNEL_NIC_INFO_IPV4_ONLY;
187187
if (nsim_dev->udp_ports.shared)
188188
info->shared = &nsim_dev->udp_ports.utn_shared;
189+
if (nsim_dev->udp_ports.static_iana_vxlan)
190+
info->flags |= UDP_TUNNEL_NIC_INFO_STATIC_IANA_VXLAN;
189191

190192
dev->udp_tunnel_nic_info = info;
191193
return 0;
@@ -207,6 +209,8 @@ void nsim_udp_tunnels_debugfs_create(struct nsim_dev *nsim_dev)
207209
&nsim_dev->udp_ports.ipv4_only);
208210
debugfs_create_bool("udp_ports_shared", 0600, nsim_dev->ddir,
209211
&nsim_dev->udp_ports.shared);
212+
debugfs_create_bool("udp_ports_static_iana_vxlan", 0600, nsim_dev->ddir,
213+
&nsim_dev->udp_ports.static_iana_vxlan);
210214
debugfs_create_u32("udp_ports_sleep", 0600, nsim_dev->ddir,
211215
&nsim_dev->udp_ports.sleep);
212216
}

0 commit comments

Comments
 (0)