Skip to content

Use vlan-mac for Vlan interfaces if specified in VLAN table#1472

Merged
prsunny merged 1 commit intosonic-net:masterfrom
prsunny:vmac
Oct 22, 2020
Merged

Use vlan-mac for Vlan interfaces if specified in VLAN table#1472
prsunny merged 1 commit intosonic-net:masterfrom
prsunny:vmac

Conversation

@prsunny
Copy link
Copy Markdown
Collaborator

@prsunny prsunny commented Oct 21, 2020

What I did

Use vlan-mac if specified in Config DB Vlan table

    "VLAN": {
        "Vlan1000": {
            "mac": "00:00:11:22:33:44",
            "vlanid": "1000"
        }
    },

Why I did it

How I verified it
Test:

$ ip addr show Vlan1000
172: Vlan1000@Bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9100 qdisc noqueue state UP group default qlen 1000
    link/ether 00:00:aa:22:33:44 brd ff:ff:ff:ff:ff:ff
$ redis-cli -n 4 hmset "VLAN|Vlan1000" mac 00:00:11:22:33:44
$ ip addr show Vlan1000
172: Vlan1000@Bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9100 qdisc noqueue state UP group default qlen 1000
    link/ether 00:00:11:22:33:44 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.1/21 brd 192.168.7.255 scope global Vlan1000

Details if related

@prsunny
Copy link
Copy Markdown
Collaborator Author

prsunny commented Oct 21, 2020

retest vs image

@wendani
Copy link
Copy Markdown
Contributor

wendani commented Oct 21, 2020

Why not choose to put it as a field in VLAN_INTERFACE?

    "VLAN_INTERFACE": {
        "Vlan1000": {
            "mac": "00:00:11:22:33:44",
        },

@prsunny
Copy link
Copy Markdown
Collaborator Author

prsunny commented Oct 21, 2020

Why not choose to put it as a field in VLAN_INTERFACE?

    "VLAN_INTERFACE": {
        "Vlan1000": {
            "mac": "00:00:11:22:33:44",
        },

VLAN_INTERFACE is handled by intfmgr and not vlanmgr. We would want this to be handled by Vlanmgr. Also similar to mtu, mac also is a layer 2 property while creating interface in kernel by Vlanmgr. That was the rationale.

@prsunny
Copy link
Copy Markdown
Collaborator Author

prsunny commented Oct 21, 2020

retest vs please

@prsunny prsunny merged commit bb94f8e into sonic-net:master Oct 22, 2020
@prsunny prsunny deleted the vmac branch October 22, 2020 03:58
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
What I did
Added platform pre check support in reboot script.
Checking platform based changes before stopping dockers and sonic services.
Porting changes in master from 201911 branch sonic-net#1472
How I did it
On branch reboot_pre_check_master
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)

modified:   scripts/reboot
How to verify it
Write a platform pre check script(platform_reboot_pre_check) and place it in /usr/share/sonic/device// directory.
If the script exit with status 0, reboot will be proceeded.
If script exit with non-zero status, the reboot script gets stopped.
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants