[systemd-devel] [PATCH v3] Add FDB support

"Jóhann B. Guðmundsson" johannbg at gmail.com
Wed Dec 17 09:46:41 PST 2014


On 12/17/2014 03:35 PM, Alin Rauta wrote:
> Hi Tom,
>
> I've formatted the patch based on our previous discussions. This one has support only for adding FDB entries.
> An example configuration is like below:
>
> [Match]
> Name=em1
>
> [Network]
> DHCP=v4
>
> [BridgeFDB]
> MACAddress=44:44:12:34:56:71
> VLANId=9
>
> [BridgeFDB]
> MACAddress=44:44:12:34:56:70
> VLANId=2
> br0
> Please let me know what you think.
>
> Thanks,
> Alin


If I start trying to match this with the entire type network files and 
their path ( feel free to correct me where I'm wrong here )
It would have to look like this...

### em1.link ###

[Link]
Name=em1
MACAddress=44:44:12:34:56:70
MTUBytes=9216

### vlan2.netdev ###

[NetDev]
Name=vlan2
Kind=vlan

[VLAN]
Id=2

### em1.network ###

[Match]
Name=em1
Bridge=bridge0
VLAN=vlan2

[Network]
DHCP=v4

[BridgeFDB]
MACAddress=44:44:12:34:56:70
VLANId=2

### bridge0.netdev ###

[NetDev]
Name=bridge0
Kind=bridge

### bridge0.netdev ###


### em2.network ###

[Match]
Name=em2
Bridge=bridge0
VLAN=vlan9

[Network]
DHCP=v4

[BridgeFDB]
MACAddress=44:44:12:34:56:71
VLANId=9

### vlan9.netdev ###

[NetDev]
Name=vlan9
Kind=vlan

[VLAN]
Id=9
||
### em2.link ###

[Link]
Name=em2
MACAddress=44:44:12:34:56:71
MTUBytes=9216

My fyrst question is can you really have two [BridgeFDB] entries which 
contains two different mac address being matched to the same interface ( 
em1 like you do in your example )?

If the answer to that is yes then my question is should those entries 
not belong in the bridge.netdev file

If the answer to that is no then my questions are..

Do you really need to define an [BridgeFDB] entry since the [Match] 
entry in the network file contains the matched link ( em1.link ) which 
in turn contains the MACAddress and the VLAN entry in the [Match] entry 
in the network file contains the vlan which in turn is spesified in the 
netdev file which contains the vlan id?

Assuming you have to flush *all* BridgeFDB entries for all the 
interfaces tied to a bridge, should it not be enough to flush the 
bridge0 device itself?

Feel free to correct me where I'm wrong here.

JBG

Aside note from an administrator point of view I feel we should drop the 
.netdev file and replace it with each type netdev instead so in the 
sample above we would have
bridge0.bridge
vlan2.vlan,
vlan9.vlan

along with

em1.link
em2.link

em2.network
em2.network


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20141217/4e1f58da/attachment.html>


More information about the systemd-devel mailing list