This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/TDA2SX: VLAN ID 2 network configuration error

Part Number: TDA2SX

Tool/software: Code Composer Studio

HI,

We encountered an error in VLAN ID 2 network configuration. We were unable to set VLAN ID 2.

Vlan2 and vlan4 need to be added to the project. At present, vlan4 can be set, but vlan2 cannot. At the terminal, type the command as follows:

root@dra7xx-evm:~# vconfig add eth0 2
vconfig: ioctl error for add: Invalid argument

Please analyze。

  • zongshu,

    VLAN 1 and VLAN2 are reserved. The TI kernel sets it in dual_emac mode and VLAN ID 1 and 2 are reserved for internal usage.

    In the dts file you can see 

    &cpsw_emac0 {
            phy-handle = <&ethphy0>;
            phy-mode = "rgmii";
            dual_emac_res_vlan = <1>;
    };
    
    &cpsw_emac1 {
            phy-handle = <&ethphy1>;
            phy-mode = "rgmii";
            dual_emac_res_vlan = <2>;
    };

    Best regards,
    Dave

  • HI

    If I want VLAN 1 and VLAN 2 to be as externally available as VLAN 4. How can I modify it? I tried to just delete dual in the DTS file_ emac_ res_ vlan = <1>;dual_ emac_ res_ VLAN = < 2 >; these two lines. However, the external system still cannot be used, and vconfig add eth0 2 still fails.

  • zongshu,

    Rather than delete the _res_vlan lines in the DT file, you can change the enumeration to something other than <1> and <2>. You should then be able to add VLAN 2 for your usage.

    Best regards,

    Dave

    It should be enough to change them in DT.

     

    *BIG NOTE*. As per IEEE Std 802.1Q-2018 Table 9-2—Reserved VID values VID 1 and VID 2 are reserved. For proper bridge functionality support it's planned to replace default VIDs for dual-mac mode to be VID 3 & VID 4.

  • OK,

    I put the dual in the DT file_ emac_ res_ Change the VLAN node properties to other values. VLAN ID 2 is available.

    Thank you very much.