<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/systemd.git/src/network/networkd-setlink.c, branch main</title>
<subtitle>github.com: systemd/systemd.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/'/>
<entry>
<title>network: Fix set bond device MAC address failed</title>
<updated>2022-12-05T11:48:45+00:00</updated>
<author>
<name>Jian Zhang</name>
<email>zhangjian.3032@bytedance.com</email>
</author>
<published>2022-12-02T12:08:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=f1a69d5accfd566c5af0210115f4b4a9743425ee'/>
<id>f1a69d5accfd566c5af0210115f4b4a9743425ee</id>
<content type='text'>
Issue:
When device is in bond mode and booting up, there is a probability of
set bond MAC address failed due to `Device or resource busy` error.

In systemd-networkd, set MAC address steps are:
1. Try to set MAC address to device.
2. If failed with `Device or resource busy`, then `Down` the device.
3. Try to set MAC address to device again.

Currently, Even down the bond device, the bond device is still return
`Device or resource busy` error. So the MAC address set failed.

The root cause is that this not enough to down the bond device. We need
to down all the slaves of the bond device.
About this descprition, we could use those commands to check:
```shell
We have two network devices: eth0, bond1, eth0 is slave of bond1.
They are all up.

1. Down bond1, and set MAC address to bond1.
~# ip link set bond1 down
~# ip link set bond1 address 00:11:22:33:44:55
ip: SIOCSIFHWADDR: Device or resource busy

2. Down eth0, and set MAC address to bond1.
~# ip link set eth0 down
~# ip link set bond1 address 00:11:22:33:44:55
Set okay.
```

Fix:
When setting the mac for the second time, if the device kind is bond,
then we need to down the slave devices of bond device.

Tested: Verified in a long time test( reboot cycles ).

Fixes: #25627

Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Issue:
When device is in bond mode and booting up, there is a probability of
set bond MAC address failed due to `Device or resource busy` error.

In systemd-networkd, set MAC address steps are:
1. Try to set MAC address to device.
2. If failed with `Device or resource busy`, then `Down` the device.
3. Try to set MAC address to device again.

Currently, Even down the bond device, the bond device is still return
`Device or resource busy` error. So the MAC address set failed.

The root cause is that this not enough to down the bond device. We need
to down all the slaves of the bond device.
About this descprition, we could use those commands to check:
```shell
We have two network devices: eth0, bond1, eth0 is slave of bond1.
They are all up.

1. Down bond1, and set MAC address to bond1.
~# ip link set bond1 down
~# ip link set bond1 address 00:11:22:33:44:55
ip: SIOCSIFHWADDR: Device or resource busy

2. Down eth0, and set MAC address to bond1.
~# ip link set eth0 down
~# ip link set bond1 address 00:11:22:33:44:55
Set okay.
```

Fix:
When setting the mac for the second time, if the device kind is bond,
then we need to down the slave devices of bond device.

Tested: Verified in a long time test( reboot cycles ).

Fixes: #25627

Signed-off-by: Jian Zhang &lt;zhangjian.3032@bytedance.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>network: skip to reassign master ifindex if already set</title>
<updated>2022-10-31T20:13:49+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-10-27T21:40:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=9f913d37a01f71e559d099bff280827f8817d8c5'/>
<id>9f913d37a01f71e559d099bff280827f8817d8c5</id>
<content type='text'>
Otherwise, the slave interface may go down, especially when the master
is bond.

Fixes #25067.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Otherwise, the slave interface may go down, especially when the master
is bond.

Fixes #25067.
</pre>
</div>
</content>
</entry>
<entry>
<title>network/bridge: fix UseBPDU= and AllowPortToBeRoot=</title>
<updated>2022-08-13T21:56:05+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-08-12T20:08:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=3f504b892b92f54087feeb3fb35e3938567d7fa0'/>
<id>3f504b892b92f54087feeb3fb35e3938567d7fa0</id>
<content type='text'>
Fixes bugs caused by 7f9915f0de67f3a10a4b22810d119da65af8c84a.

Fixes #24268.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes bugs caused by 7f9915f0de67f3a10a4b22810d119da65af8c84a.

Fixes #24268.
</pre>
</div>
</content>
</entry>
<entry>
<title>network: also check SR-IOV PF port and other VF ports before configuring</title>
<updated>2022-08-05T12:49:27+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-07-28T06:11:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=e33232d4058f96f6228f7fcba59bcaf1ee015de1'/>
<id>e33232d4058f96f6228f7fcba59bcaf1ee015de1</id>
<content type='text'>
When a PF port becomes down (this can happens e.g. the PF port is joining
a bond interface), some drivers make its VF ports also become down, and
may cause failures in configuring VF ports.

Similary, when a VF port become down, some drivers make its PF port and
other VF ports down.

Let's configure SR-IOV ports (both PF and VFs) after all link-layer
settings of all ports being applied.

Fixes #23315.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a PF port becomes down (this can happens e.g. the PF port is joining
a bond interface), some drivers make its VF ports also become down, and
may cause failures in configuring VF ports.

Similary, when a VF port become down, some drivers make its PF port and
other VF ports down.

Let's configure SR-IOV ports (both PF and VFs) after all link-layer
settings of all ports being applied.

Fixes #23315.
</pre>
</div>
</content>
</entry>
<entry>
<title>network: unset master ifindex only when necessary</title>
<updated>2022-08-05T12:49:27+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-05-12T23:36:50+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=53c2e3b9ba9f125e45d49c64f6b6c349c6fd40ae'/>
<id>53c2e3b9ba9f125e45d49c64f6b6c349c6fd40ae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>network: do not try to bring up wifi interface if rfkill is active</title>
<updated>2022-07-23T11:55:03+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-07-14T21:26:57+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=a9d2d037ee108327f7ac928139a0feb9a990c546'/>
<id>a9d2d037ee108327f7ac928139a0feb9a990c546</id>
<content type='text'>
This fixes the following error:
---
systemd-networkd[465]: wlan0: Could not bring up interface: Operation not possible due to RF-kill
---

Fixes #23649.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes the following error:
---
systemd-networkd[465]: wlan0: Could not bring up interface: Operation not possible due to RF-kill
---

Fixes #23649.
</pre>
</div>
</content>
</entry>
<entry>
<title>network: do not silently stop to process configuration on activation failure</title>
<updated>2022-07-22T23:11:36+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-07-14T21:04:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=b05e52000b4eee764b383cc3031da0a3739e996e'/>
<id>b05e52000b4eee764b383cc3031da0a3739e996e</id>
<content type='text'>
Previously, if activation failed, link did not enter the failed state,
but still Link.activated flag not set. Hence, nothing processed even if
the interface is manually brought up later.

Partially fixes #23649.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, if activation failed, link did not enter the failed state,
but still Link.activated flag not set. Hence, nothing processed even if
the interface is manually brought up later.

Partially fixes #23649.
</pre>
</div>
</content>
</entry>
<entry>
<title>network: re-design request queue</title>
<updated>2022-03-11T05:20:31+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-02-28T01:55:51+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=09d09207dece533ced25c91024ce7a1c0ed660d8'/>
<id>09d09207dece533ced25c91024ce7a1c0ed660d8</id>
<content type='text'>
This makes Request object takes hash, compare, free, and process functions.

With this change, the logic in networkd-queue.c can be mostly
independent of the type of the request or the object (e.g. Address) assigned
to the request, and it becomes simpler.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes Request object takes hash, compare, free, and process functions.

With this change, the logic in networkd-queue.c can be mostly
independent of the type of the request or the object (e.g. Address) assigned
to the request, and it becomes simpler.
</pre>
</div>
</content>
</entry>
<entry>
<title>network: merge RequestType and SetLinkOperation</title>
<updated>2022-03-11T05:20:31+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-02-28T02:03:11+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=eb93dc9bde7447bb519d69c0e3bc077767936c93'/>
<id>eb93dc9bde7447bb519d69c0e3bc077767936c93</id>
<content type='text'>
These two enum indicate how we process the request. Hence, it is not
necessary to introduce two separated indicators.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These two enum indicate how we process the request. Hence, it is not
necessary to introduce two separated indicators.
</pre>
</div>
</content>
</entry>
<entry>
<title>network: refuse to configure link properties when in initialized state</title>
<updated>2022-03-11T05:20:31+00:00</updated>
<author>
<name>Yu Watanabe</name>
<email>watanabe.yu+github@gmail.com</email>
</author>
<published>2022-02-28T02:15:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/systemd.git/commit/?id=a48ffe47cf1db98694d2013bf97f62f55e4c3d27'/>
<id>a48ffe47cf1db98694d2013bf97f62f55e4c3d27</id>
<content type='text'>
The condition should be satisfied only when users request to reconfigure
the link, and in that case, all request will be cancelled. Hence, it is
not necessary to process the request.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The condition should be satisfied only when users request to reconfigure
the link, and in that case, all request will be cancelled. Hence, it is
not necessary to process the request.
</pre>
</div>
</content>
</entry>
</feed>
