[systemd-devel] [PATCH] Add FDB support

Rauta, Alin alin.rauta at intel.com
Thu Dec 11 08:58:05 PST 2014


Hi Lennart,

Thanks for your quick response.

Regarding the naming "FDBEntry". My inspiration was the bridge tool command.
To add an entry using bridge command:
"bridge fdb add 44:44:12:34:56:73 dev em1 vlan 10 "

 If "FDBControlled" is no (default value) then the forwarding database table for current port is not touched even if we have entries in the [FDBEntry] section of the file.
The reason behind introducing "FDBControlled" is that we want to have the table cleared even if we don't want to add entries.

So, if FDBControlled is set to yes, networkd clears the existing entries (if any) and adds those specified in the FDBEntry section(if any).

Do you have any other suggestion for [FDBEntry] ?

Best Regards,
Alin
-----Original Message-----
From: Lennart Poettering [mailto:lennart at poettering.net] 
Sent: Thursday, December 11, 2014 4:16 PM
To: Rauta, Alin
Cc: systemd-devel at lists.freedesktop.org; Kinsella, Ray
Subject: Re: [systemd-devel] [PATCH] Add FDB support

On Thu, 11.12.14 08:07, Alin Rauta (alin.rauta at intel.com) wrote:

> Hi,
> 
> I've added support for handling the forwarding database table for a port.
> FDB entries can be configured statically through the ".network" files.
> 
> To resume,
> - I've added a new boolean for the main network structure, named "FDBControlled" which is read from the .network file and defaults to false.
> - I've added a new section "FDBEntry" accepting 2 key-value pairs:
>      -MACAddress (mandatory)
>      -VLAN (optional)
> 
> When FDBControlled is set to "yes" in the network section, networkd:
> - gets the FDB entries for current port;
> - clears them
> - configures those specified in the [FDBEntry] section.
> 
> Configuration example:
> 
> [Network]
> DHCP=v4
> FDBControlled=yes
> 
> [FDBEntry]
> MACAddress=44:44:12:34:56:71
> VLAN=9
> 
> [FDBEntry]
> MACAddress=44:44:12:34:56:72
> VLAN=10


Hmm, quick thoughts regarding the naming: can we find a better name than [FDBEntry] for this? At least I cannot really make much sense of this.

Could you improve the man page a bit, explaining what "fdb" actually is? 

Currently VLANs are configured in a [VLAN] section, with an Id= setting to configure the id. Maybe following this naming the setting you introduce above should be called VLANId?

What happens if FDBControlled is no, but still FDBEntrys specified?

Lennart

--
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list