Commit 9ee49cd
authored
Fix SONiC format 400G to 4x100G breakout detection (#1792)
Extends the 400G breakout detection to SONiC format interfaces
(Ethernet0, Ethernet2, Ethernet4, Ethernet6), completing the
implementation started in ea885fb.
The previous commit added 400G breakout support for EthX/Y/Z format
interfaces but missed adding the same logic to the SONiC format
detection section. This caused devices configured with SONiC-style
interface names to not generate proper BREAKOUT_CFG entries.
Key changes:
- Detect SONiC 400G breakout pattern (ports increment by 2)
- Validate 8-lane master port in port_config before processing
- Check for 100G speed on each breakout port
- Generate correct BREAKOUT_CFG with "4x100G" mode
- Calculate physical port using (base_port // 8) + 1 logic
- Add debug logging for 400G breakout detection
Technical implementation:
- Base port calculation: (port_num // 8) * 8
- Port iteration: Ethernet0, 2, 4, 6 (i * 2 increment)
- Speed validation: 100000 Mbps per port
- Unique group_key: "sonic_400g_{base}" vs "sonic_std_{base}"
- Maintains backward compatibility with standard breakout (≤50G)
Fixes detection for devices like Accton-AS9726-32D with 400G ports
broken out to 4x100G in NetBox.
AI-assisted: Claude Code
Signed-off-by: Christian Berendt <[email protected]>1 parent 0d60825 commit 9ee49cd
1 file changed
+81
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
789 | 789 | | |
790 | 790 | | |
791 | 791 | | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
792 | 871 | | |
793 | 872 | | |
794 | | - | |
| 873 | + | |
795 | 874 | | |
796 | 875 | | |
797 | 876 | | |
| |||
859 | 938 | | |
860 | 939 | | |
861 | 940 | | |
862 | | - | |
| 941 | + | |
863 | 942 | | |
864 | 943 | | |
865 | 944 | | |
| |||
0 commit comments