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

[debug dump util] FDB debug dump util changes #1968

Merged
merged 8 commits into from
Dec 22, 2021

Conversation

dgsudharsan
Copy link
Collaborator

Signed-off-by: Sudharsan Dhamal Gopalarathnam sudharsand@nvidia.com

What I did

Added FDB debug dump module

How I did it

Used debug dump infra to add the FDB debug dump utility

How to verify it

Added Unit test cases to verify it.

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

root@sonic:~# dump state fdb all
{
    "Vlan50:04:3f:72:e3:70:08": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d23": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x100000000093e",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d22\",\"mac\":\"04:3F:72:E3:70:08\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d23",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d23": "oid:0x20000003a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan50:04:3f:72:e3:70:08": {
                        "port": "Ethernet0",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan10:04:3f:72:ce:80:8b": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d18": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x100000000053f",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d20\",\"mac\":\"04:3F:72:CE:80:8B\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d18",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d18": "oid:0x10000003a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan10:04:3f:72:ce:80:8b": {
                        "port": "Ethernet252",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan690:04:3f:72:ce:80:8b": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d18": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x100000000053f",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d1c\",\"mac\":\"04:3F:72:CE:80:8B\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d18",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d18": "oid:0x10000003a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan690:04:3f:72:ce:80:8b": {
                        "port": "Ethernet252",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan40:04:3f:72:e3:70:09": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d16": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x2000000000d13",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d15\",\"mac\":\"04:3F:72:E3:70:09\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d16",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d16": "oid:0x3a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan40:04:3f:72:e3:70:09": {
                        "port": "PortChannel0002",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan691:04:3f:72:ce:80:8b": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d18": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x100000000053f",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d1e\",\"mac\":\"04:3F:72:CE:80:8B\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d18",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d18": "oid:0x10000003a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan691:04:3f:72:ce:80:8b": {
                        "port": "Ethernet252",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan69:04:3f:72:e3:70:09": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d16": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x2000000000d13",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d1a\",\"mac\":\"04:3F:72:E3:70:09\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d16",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d16": "oid:0x3a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan69:04:3f:72:e3:70:09": {
                        "port": "PortChannel0002",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan101:04:3f:72:e3:70:09": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d16": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x2000000000d13",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d28\",\"mac\":\"04:3F:72:E3:70:09\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d16",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d16": "oid:0x3a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan101:04:3f:72:e3:70:09": {
                        "port": "PortChannel0002",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    },
    "Vlan40:04:3f:72:ce:80:8b": {
        "APPL_DB": {
            "keys": [],
            "tables_not_found": []
        },
        "ASIC_DB": {
            "keys": [
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_BRIDGE_PORT:oid:0x3a000000000d18": {
                        "SAI_BRIDGE_PORT_ATTR_ADMIN_STATE": "true",
                        "SAI_BRIDGE_PORT_ATTR_FDB_LEARNING_MODE": "SAI_BRIDGE_PORT_FDB_LEARNING_MODE_HW",
                        "SAI_BRIDGE_PORT_ATTR_PORT_ID": "oid:0x100000000053f",
                        "SAI_BRIDGE_PORT_ATTR_TYPE": "SAI_BRIDGE_PORT_TYPE_PORT"
                    }
                },
                {
                    "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000d15\",\"mac\":\"04:3F:72:CE:80:8B\",\"switch_id\":\"oid:0x21000000000000\"}": {
                        "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID": "oid:0x3a000000000d18",
                        "SAI_FDB_ENTRY_ATTR_PACKET_ACTION": "SAI_PACKET_ACTION_FORWARD",
                        "SAI_FDB_ENTRY_ATTR_TYPE": "SAI_FDB_ENTRY_TYPE_DYNAMIC"
                    }
                }
            ],
            "tables_not_found": [],
            "vidtorid": {
                "oid:0x3a000000000d18": "oid:0x10000003a"
            }
        },
        "STATE_DB": {
            "keys": [
                {
                    "FDB_TABLE|Vlan40:04:3f:72:ce:80:8b": {
                        "port": "Ethernet252",
                        "type": "dynamic"
                    }
                }
            ],
            "tables_not_found": []
        }
    }
}
root@sonic:~#

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

/azpw run Azure.sonic-utilities

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik
Copy link
Collaborator

@dgsudharsan could you please review failures?

@dgsudharsan
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@dgsudharsan
Copy link
Collaborator Author

@dgsudharsan could you please review failures?

Looks like an infrastructure failure and it is seen across pipeline
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/__w/1/target/python-wheels/swsssdk-2.0.1-py3-none-any.whl'

@lguohan @qiluo-msft Can you please help?

@qiluo-msft
Copy link
Contributor

It should be fixed by #1971
Could you rebase to latest code?

@liat-grozovik
Copy link
Collaborator

@SuvarnaMeenakshi kindly reminder, can you please review?

Copy link
Contributor

@SuvarnaMeenakshi SuvarnaMeenakshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@qiluo-msft qiluo-msft changed the title [debug dump util]FDB debug dump util changes [debug dump util] FDB debug dump util changes Dec 22, 2021
@qiluo-msft qiluo-msft merged commit ed2fa69 into sonic-net:master Dec 22, 2021
judyjoseph pushed a commit that referenced this pull request Jan 9, 2022
What I did
Added FDB debug dump module

How I did it
Used debug dump infra to add the FDB debug dump utility

How to verify it
Added Unit test cases to verify it
@dgsudharsan dgsudharsan deleted the fdb_dump branch March 9, 2023 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants