bridge: force (hack)-set of the MTU when explicitly set in the profile

Kernel does a auto-mtu adjusting process whenever a port is added/removed from
the bridge, this can cause issues when NM wants to explicitly set an MTU which is
equal to the bridge default one (1500) because if later a port is added with a
different MTU the kernel will assign the bridge that port's MTU resulting in the bridge
runtime configuration differing from the bridge's NM connection profile.

What we can do is to always apply the MTU manually for the bridge (if explicitly
set by the profile), after doing so the kernel won't modify the MTU anymore,
which is what we want, problem is that kernel won't actually apply the MTU
to the netdev if it's not actually changing.

To ensure the MTU is correctly set we create the link with MTU=MTU-1
so that later during the activation the MTU is commited to the
correct value and actually stays so.

https://bugzilla.redhat.com/show_bug.cgi?id=1778590

Signed-off-by: Antonio Cardace <acardace@redhat.com>
21 jobs for ac/bridge_mtu_autoadjust in 38 minutes and 50 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Test
passed #5201590
checkpatch

00:02:23

manual #5201598
allowed to fail manual
t_centos:7.5.1804
manual #5201599
allowed to fail manual
t_centos:7.6.1810
manual #5201600
allowed to fail manual
t_centos:7.7.1908
manual #5201601
allowed to fail manual
t_centos:7.8.2003
manual #5201602
allowed to fail manual
t_centos:8.1.1911
manual #5201608
allowed to fail manual
t_debian:10
manual #5201607
allowed to fail manual
t_debian:9
manual #5201610
allowed to fail manual
t_debian:sid
manual #5201609
allowed to fail manual
t_debian:testing
manual #5201591
allowed to fail manual
t_fedora:28
manual #5201592
allowed to fail manual
t_fedora:29
manual #5201593
allowed to fail manual
t_fedora:30
manual #5201594
allowed to fail manual
t_fedora:31
passed #5201595
t_fedora:32

00:38:50

manual #5201596
allowed to fail manual
t_fedora:33
manual #5201597
allowed to fail manual
t_fedora:rawhide
manual #5201603
allowed to fail manual
t_ubuntu:16.04
manual #5201604
allowed to fail manual
t_ubuntu:18.04
manual #5201606
allowed to fail manual
t_ubuntu:devel
manual #5201605
allowed to fail manual
t_ubuntu:rolling