Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[device/virtual]: Add device type of SONiC VM #8971

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

Pterosaur
Copy link
Contributor

@Pterosaur Pterosaur commented Oct 14, 2021

Signed-off-by: Ze Gan ganze718@gmail.com

Why I did it

The default ethernet port naming style is Ethernet0, Ethernet4...Ethernet(i*4) which isn't compatible with EOS's style Ethernet1,Ethernet2...Etherent(i+1)
SONiC-mgmt usually use EOS as neighbor devices. To relieve the compatible issue on SONiC as neighbor devices, This PR introduces a new SKU SONiC VM.

How I did it

Create a new SKU with ethernet port naming style Ethernet(i+1)

How to verify it

Run sonic-cfggen -p /usr/share/sonic/device/x86_64-kvm_x86_64-r0/SONiC-VM/port_config.ini -k SONiC-VM --print-data in SONiC VM
You should get the following output

{
    "DEVICE_METADATA": {
        "localhost": {
            "hwsku": "SONiC-VM"
        }
    },
    "PORT": {
        "Ethernet1": {
            "lanes": "25,26,27,28",
            "alias": "fortyGigE0/0",
            "index": "0",
            "speed": "40000"
        },
        "Ethernet2": {
            "lanes": "29,30,31,32",
            "alias": "fortyGigE0/4",
            "index": "1",
            "speed": "40000"
        },
        "Ethernet3": {
            "lanes": "33,34,35,36",
            "alias": "fortyGigE0/8",
            "index": "2",
            "speed": "40000"
        },
        "Ethernet4": {
            "lanes": "37,38,39,40",
            "alias": "fortyGigE0/12",
            "index": "3",
            "speed": "40000"
        },
        "Ethernet5": {
            "lanes": "45,46,47,48",
            "alias": "fortyGigE0/16",
            "index": "4",
            "speed": "40000"
        },
        "Ethernet6": {
            "lanes": "41,42,43,44",
            "alias": "fortyGigE0/20",
            "index": "5",
            "speed": "40000"
        },
        "Ethernet7": {
            "lanes": "1,2,3,4",
            "alias": "fortyGigE0/24",
            "index": "6",
            "speed": "40000"
        },
        "Ethernet8": {
            "lanes": "5,6,7,8",
            "alias": "fortyGigE0/28",
            "index": "7",
            "speed": "40000"
        },

        "Ethernet9": {
            "lanes": "13,14,15,16",
            "alias": "fortyGigE0/32",
            "index": "8",
            "speed": "40000"
        },
        "Ethernet10": {
            "lanes": "9,10,11,12",
            "alias": "fortyGigE0/36",
            "index": "9",
            "speed": "40000"
        },
        "Ethernet11": {
            "lanes": "17,18,19,20",
            "alias": "fortyGigE0/40",
            "index": "10",
            "speed": "40000"
        },
        "Ethernet12": {
            "lanes": "21,22,23,24",
            "alias": "fortyGigE0/44",
            "index": "11",
            "speed": "40000"
        },
        "Ethernet13": {
            "lanes": "53,54,55,56",
            "alias": "fortyGigE0/48",
            "index": "12",
            "speed": "40000"
        },
        "Ethernet14": {
            "lanes": "49,50,51,52",
            "alias": "fortyGigE0/52",
            "index": "13",
            "speed": "40000"
        },
        "Ethernet15": {
            "lanes": "57,58,59,60",
            "alias": "fortyGigE0/56",
            "index": "14",
            "speed": "40000"
        },
        "Ethernet16": {
            "lanes": "61,62,63,64",
            "alias": "fortyGigE0/60",
            "index": "15",
            "speed": "40000"
        },
        "Ethernet17": {
            "lanes": "69,70,71,72",
            "alias": "fortyGigE0/64",
            "index": "16",
            "speed": "40000"
        },
        "Ethernet18": {
            "lanes": "65,66,67,68",
            "alias": "fortyGigE0/68",
            "index": "17",
            "speed": "40000"
        },
        "Ethernet19": {
            "lanes": "73,74,75,76",
            "alias": "fortyGigE0/72",
            "index": "18",
            "speed": "40000"
        },
        "Ethernet20": {
            "lanes": "77,78,79,80",
            "alias": "fortyGigE0/76",
            "index": "19",
            "speed": "40000"
        },
        "Ethernet21": {
            "lanes": "109,110,111,112",
            "alias": "fortyGigE0/80",
            "index": "20",
            "speed": "40000"
        },
        "Ethernet22": {
            "lanes": "105,106,107,108",
            "alias": "fortyGigE0/84",
            "index": "21",
            "speed": "40000"
        },
        "Ethernet23": {
            "lanes": "113,114,115,116",
            "alias": "fortyGigE0/88",
            "index": "22",
            "speed": "40000"
        },
        "Ethernet24": {
            "lanes": "117,118,119,120",
            "alias": "fortyGigE0/92",
            "index": "23",
            "speed": "40000"
        },
        "Ethernet25": {
            "lanes": "125,126,127,128",
            "alias": "fortyGigE0/96",
            "index": "24",
            "speed": "40000"
        },
        "Ethernet26": {
            "lanes": "121,122,123,124",
            "alias": "fortyGigE0/100",
            "index": "25",
            "speed": "40000"
        },
        "Ethernet27": {
            "lanes": "81,82,83,84",
            "alias": "fortyGigE0/104",
            "index": "26",
            "speed": "40000"
        },
        "Ethernet28": {
            "lanes": "85,86,87,88",
            "alias": "fortyGigE0/108",
            "index": "27",
            "speed": "40000"
        },
        "Ethernet29": {
            "lanes": "93,94,95,96",
            "alias": "fortyGigE0/112",
            "index": "28",
            "speed": "40000"
        },
        "Ethernet30": {
            "lanes": "89,90,91,92",
            "alias": "fortyGigE0/116",
            "index": "29",
            "speed": "40000"
        },
        "Ethernet31": {
            "lanes": "101,102,103,104",
            "alias": "fortyGigE0/120",
            "index": "30",
            "speed": "40000"
        },
        "Ethernet32": {
            "lanes": "97,98,99,100",
            "alias": "fortyGigE0/124",
            "index": "31",
            "speed": "40000"
        }
    }
}

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Ze Gan <ganze718@gmail.com>
@Pterosaur Pterosaur changed the title [device/virtual]: Add new SKU for SONiC VM [device/virtual]: Add device type of SONiC VM Oct 14, 2021
@Pterosaur Pterosaur marked this pull request as ready for review October 14, 2021 06:25
@Pterosaur Pterosaur requested a review from lguohan October 14, 2021 08:03
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.

2 participants