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.

CPSW: Dual port mode vs Switch mode

Guru 20755 points

Hello,

Can anyone please describe in simple terms the operation difference between dual mode port to switch mode?

Is it that in dual mode, we have two different ports with no hw connection in between, and 2 different not related LANs ,

while the switch mode, is network switch whaich connected two different ports representing network entities on same LAN ?

Thank you,

Ran

  • Ran,

    CPSW (in switch mode) adds IP switching capabilities to an embedded system. The CPSW Ethernet Switch can be configured in various different combination of Ethernet Packet forwarding and blocking. Switch mode will appear as a single network interface which would be an end point.

    However, for applications that require interaction with two completely different IP networks (dual port mode) the switch functionality falls short and a complete separation of the two EMAC interfaces is a must. Switch config will not be available in dual emac interface mode. Both the interfaces should not be connected to the same subnet unless only configuring bridging, and not doing IP routing, then you can configure the two interfaces on the same subnet. Bringing up the Two Ethernet switch ports as Individual EMAC interfaces to Applications and Disabling Switch functionality. For dual EMAC, two MAC address are required.

    See also:
    e2e.ti.com/.../382309
    e2e.ti.com/.../375430

    BR
    Pavel
  • Hi Pavel,

    Thank you for the information,
    I followed the switch guide, but still don't understand it very much.
    Do we use only one physical port when in switch mode ? if yes - which one of them, if not - what is the role of each port ?
    From past expereince, network switch have several ports, so I don't understand how the switch operate with single port.

    Thank you a lot,
    Ran
  • In switch mode, the CPSW acts like a true Ethernet switch. Any port traffic can be routed to any port based on VLAN, port or address rules.
    The host port has some special rules so that it can act as an endpoint or a bridge extender depending on target use case.

    The older CPSW devices did not have a dual MAC mode per say, but rather had a bypass mode, which forces all ingress traffic from external ports to the host and the host directed to the egress port. In this bypass mode there is no traffic filtering.
    In newer devices there is a MAC mode per port which will filter addresses based on ALE entries. In this MAC mode, traffic can only flow between the MAC only port and the host. The host can either direct of let the ALE decide where to send the packet on egress.
  • Hi Pavel,

    Is there also a tutorial or something similar about CPSW to get a deeper understand about the capabilities in each mode?

    Thank you,

    Ran

  • DM814x TRM, chapter 9 3PSW Ethernet Subsystem (EMAC)

    BR
    Pavel
  • Hi Pavel,

    I have followed the documentation i n TRM. But I'm not sure I understand the configuration in switch mode.

    There are two ports, but they are like a single port ?

    What do we connect to each port ?Is it that  port1 is connected to netwrok, while port 2 is connected to what?

    Thank you very much for the time,

    Ran