You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/content/design/lldp.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ The following are introduced by this design:
22
22
The implementation uses XAPI for configuration, networkd for per-host application of configuration, and [`lldpd`](https://github.com/lldpd/lldpd) as the LLDP agent in dom0 user space.
23
23
XAPI stores LLDP configuration in the database and exposes LLDP neighbor data through XenAPI.
24
24
networkd configures the LLDP agent to apply LLDP configuration for individual physical NICs and queries the LLDP agent for received LLDP TLVs.
25
-
`lldpd` runs as a daemon process in dom0 user space. It receives and sends LLDPDUs via PF_PACKET + SOCK_RAW sockets. It is actively maintained by upstream as the time being.
25
+
`lldpd` runs as a daemon process in dom0 user space. It receives and sends LLDPDUs via PF_PACKET + SOCK_RAW sockets. It is actively maintained by upstream for the time being.
26
26
27
27
## XAPI database changes
28
28
@@ -37,7 +37,7 @@ When `false`, LLDP is disabled on the NIC associated with each managed physical
37
37
38
38
This setting does not apply to other types of PIFs, such as non-managed PIFs, bond PIFs, VLAN PIFs, tunnel PIFs, or SR-IOV PIFs.
39
39
40
-
`PIF.lldp_mode` determines the final effective state on individul PIF.
40
+
`PIF.lldp_mode` determines the final effective state on individual PIF.
41
41
42
42
LLDP receiving and advertising are always enabled or disabled together.
43
43
@@ -51,15 +51,15 @@ Type: `enum pif_lldp_mode`
51
51
52
52
Values:
53
53
54
-
-`default`: follow `pool.lldp_enabled`;
54
+
-`inherited`: follow `pool.lldp_enabled`;
55
55
-`enabled`: LLDP is enabled on the NIC associated with the managed physical PIF;
56
56
-`disabled`: LLDP is disabled on the NIC associated with the managed physical PIF.
57
57
58
58
This setting does not apply to other types of PIFs, such as non-managed PIFs, bond PIFs, VLAN PIFs, tunnel PIFs, or SR-IOV PIFs.
59
59
60
-
Default after update/RPU from a version/release without LLDP support to a version/release with LLDP support: `default`.
60
+
Default after update/RPU from a version/release without LLDP support to a version/release with LLDP support: `inherited`.
61
61
62
-
Default after fresh install: `default`.
62
+
Default after fresh install: `inherited`.
63
63
64
64
### `pool.lldp_multicast_address`
65
65
@@ -72,7 +72,7 @@ Values:
72
72
-`nearestcustomerbridge`: `01:80:C2:00:00:00`
73
73
74
74
This value controls the multicast MAC address used for LLDP transmission.
75
-
After a change, it is applied when `pool.set_lldp_enabled` or `PIF.set_lldp_mode` is called with `force=true`.
75
+
After a change, it is applied when `pool.set_lldp_enabled` or `PIF.set_lldp_mode` is called (can apply with `force=true` if enabled or mode is not changed).
76
76
This value is not considered to change often. Changing it does not trigger any application action for simplicity.
77
77
78
78
Default after update/RPU from a version/release without LLDP support to a version/release with LLDP support: `nearestbridge`.
@@ -110,7 +110,7 @@ Behavior:
110
110
Parameters:
111
111
112
112
-`self`: the PIF reference;
113
-
-`value`: `default`, `enabled`, or `disabled`;
113
+
-`value`: `inherited`, `enabled`, or `disabled`;
114
114
-`force`: `bool`, default `false`.
115
115
116
116
Behavior:
@@ -122,7 +122,7 @@ Behavior:
122
122
## The networkd database
123
123
124
124
The `interface_config_t` record in the networkd database is extended with LLDP configuration. networkd can configure LLDP independently using its own database when XAPI is unavailable, for example during host boot.
125
-
The default enabled setting is `false` to minimize impact without high-level configuration from XAPI or the user. This database can be updated as XAPI pushes configurtions to networkd through networkd calls.
125
+
The default enabled setting is `false` to minimize impact without high-level configuration from XAPI or the user. This database can be updated as XAPI pushes configurations to networkd through networkd calls.
126
126
127
127
```ocaml
128
128
type lldp_multicast_address =
@@ -136,8 +136,8 @@ type lldp = {
136
136
; chassis_id: string [@default ""]
137
137
; system_name: string [@default ""]
138
138
; system_description: string [@default ""]
139
-
; enabled: bool [@default false];
140
-
; address: lldp_multicast_address list [@default [Nearestbridge]];
139
+
; enabled: bool [@default false]
140
+
; address: lldp_multicast_address list [@default [Nearestbridge]]
141
141
}
142
142
[@@deriving rpcty]
143
143
@@ -172,9 +172,9 @@ The effective LLDP state on a NIC is determined by `pool.lldp_enabled`, `PIF.lld
172
172
173
173
|`pool.lldp_enabled`|`PIF.lldp_mode`| parameter passed to networkd | NIC driver in blocking list | effective LLDP state |
174
174
| --- | --- | --- | --- | --- |
175
-
|`true`|`default`|`true`|`no`|`enabled`|
176
-
|`true`|`default`|`true`|`yes`|`disabled`|
177
-
|`false`|`default`|`false`|`*`|`disabled`|
175
+
|`true`|`inherited`|`true`|`no`|`enabled`|
176
+
|`true`|`inherited`|`true`|`yes`|`disabled`|
177
+
|`false`|`inherited`|`false`|`*`|`disabled`|
178
178
|`*`|`enabled`|`true`|`*`|`enabled`|
179
179
|`*`|`disabled`|`false`|`*`|`disabled`|
180
180
@@ -212,7 +212,7 @@ type iface_stats = {
212
212
lldp_neighbor: lldp_rx option;
213
213
}
214
214
```
215
-
networkd queries `lldpd` for the LLDP TLVs recevied on individual NICs and writes them into `/dev/shm/network_stats`.
215
+
networkd queries `lldpd` for the LLDP TLVs received on individual NICs and writes them into `/dev/shm/network_stats`.
216
216
Monitor_dbcalls.monitor_dbcall_thread in XAPI reads the in-memory file `/dev/shm/network_stats` periodically, and exposes the data through `PIF_metrics.lldp_neighbor` by storing them in XenAPI map form.
0 commit comments