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.

AM335x Ethernet ports

Hi,

 

The AM335x device has 3-port switch (3PSW) Ethernet subsystem,

i.e. two Ethernet ports,

 

is it possible to use AM335x's ethernet as a gateway?

i.e can we connect two different networks as shown below.

 

 

 

Please let us know if this kind of usage is possible.

 

Regards.

 

  • I believe this is what is described as Dual Mac Mode in Section 14.3.1.5.2 in the AM335x Technical Reference Manual.

  • Thank you Brandon.

     

    I understood that there are two independent MAC's( two diff IP address)

    but the manual mentions that there is "no bridging between MAC’s"

     

    Below is the description written in the Manual 14.3.1.5.2 Dual Mac Mode.

    "When operating in dual mac mode the intention is to transfer packets between ports 0 and 1 and ports 0

    and 2, but not between ports 1 and 2. Each CPGMAC_SL appears as a single MAC with no bridging

    between MAC’s"

     

    Regards.

  • Correct, there is no bridging performed in hardware.

    Software running on the Cortex-A8 could perform this bridging.  This is what you would likely do in a gateway application anyway, or did I miss the point?

  • Thank you,

     

    I was thinking if there was any option to do that in the Hardware instead of software.

     

    I need one more clarification about this topic,

    actually the TRM's "14.3.1.2 Address Lookup Engine (ALE)" section describes about

    "bypass mode" in which the received packets are forwarded only to the host port (port 0).

     

    In case of "Dual Mac Mode" do we have to set ALE_Control to "bypass mode" 

    in order to implement the gateway application?

     

    Regards.

  • Yes, you need to bypass the ALE if you plan to use the device in dual MAC mode.

     

    When the ALE is enabled, all incoming packets with a destination address not found in the lookup table will be broadcast to all switch ports.  When the destination device replies the ALE will assign the source and destination MAC address to the respective ports.  The switch will only route future packets between these two MAC addresses to their respective ports.

     

    Regards,

    Paul

  • Hello,  

              we have the same  application.      

             we  think maybe  use  "bypass mode " or   " dual-mac mode"   ,  then  let  software to  exchange the  package.  

            But  these way  need a lot of  cpu percent.   

            We  also want to  configure register   to  achieve  "hardware bridge".    In deed,    Cancel the function about  ALE  could  do  this  as  a hub. 

          

          could you  have some  suggest or   achieved way ?     thanks 

        REFER  ANOTHER TOPIC  , IT IS THE SAME PROBLEM :

      "How can I configure the 3psw eth switch into promisc mode ?"

      

                                                  owen chai

      

  • Bit 8 of the ALE Control Register can be used to enable unknown unicast flood packets to the internal host port.  Setting this bit should allow the host to see all unicast packets.

    Bit 4 in the respective ALE Port Control Register can be used to disable the ALE from learning an address.  When this bit is not set, the ALE would broadcast the first packet received for a specific address to all ports then learn which port replied and send all future packets for this address to the respective port.  However, received packets will always be broadcast when this bit is set because the ALE is not able to learn the address.

    Please let me know if this answers your questions.

    Regards,
    Paul

  • Thanks very much  for your  detial  explain  about   ALE_CONTROL  BIT. 

      Now we are using  DM8I4X  EVM ,   may  it  has  a  different offset bit about  this  function. 

      I  know   DM814X  ALE_CONTROL  bit 1  named  EN_AUTH_MODE,   when it set 1,   ALE will   not  learning  an address.     But  the  3PSW will  drop   all the package  whose address   not in  ENTRY TABLE.    is that right?

     

        i will  do some practice according your suggestion.  Both ale control  and  ale port control.   Then i will  tell you the result about experiment.

     

           thanks again for your reply.

          best regards,

     

        Owen

     

      

     

      

     

     

  • Hello, Paul

        I had   configure the  bits  you  said.     Maybe  the "no learing  table "  had  worked.  But the host can not  receive  "all unicast packets "   .    I think  to  packet had already send to the host  .  But  the  eh0  was not  in " promisc  mode" , so  it  drop  the packets  whose destination address is host's.  

        I  think  only  set  the "bypass mode "  could  make  it  into  "promisc mode" ?       i  open the   source  c  file .   And find that it is do nothing about  "IFF_PROMISC"

        So,   if we want  receive all  the package , we  must do someting  to  config  some  register?

    2411
            /*

    2412
             * The switch cannot operate in promiscuous mode without substantial
    2413
             * headache.  For promiscuous mode to work, we would need to put the
    2414
             * ALE in bypass mode and route all traffic to the host port.
    2415
             * Subsequently, the host will need to operate as a "bridge", learn,
    2416
             * and flood as needed.  For now, we simply complain here and
    2417
             * do nothing about it :-)
    2418
             */

     

         The below is  the  process  about  our  experiment: 

        we  set  the  ale port  register    BIT8 =1     BIT4  =1  ,  the  read the  enty table  and  ale register.

    180 packets captdevice eth0 left promiscuous mode
    ured
    180 packets received by fi-----------------BUFF--------------
    index 0, raw: 00000004 1000405f c2262380, type: addr(1), addr: 40:5f:c2:26:23:80, uctype: persistant(0), port: 1
    index 1, raw: 0000001c 1000ffff ffffffff, type: addr(1), addr: ff:ff:ff:ff:ff:ff, mcstate: f(0), port mask: 7, no super
    index 2, raw: 0000001c 10000100 5e000001, type: addr(1), addr: 01:00:5e:00:00:01, mcstate: f(0), port mask: 7, no super

    lter
    0 packets -----------------BUFF--------------
    enable=1
    clear=0
    ageout=0
    vlan_nolearn=0
    no_port_vlan=0
    oui_deny=0
    bypass=0
    rate_limit_tx=0
    vlan_aware=0
    auth_enable=0
    rate_limit=0
    port_state.0=3
    port_state.1=3
    drop_untagged.0=0
    drop_untagged.1=0
    drop_unknown.0=0
    drop_unknown.1=0
    nolearn.0=1
    nolearn.1=1
    unknown_vlan_member.0=0
    unknown_vlan_member.1=0
    unknown_mcast_flood.0=0
    unknown_mcast_flood.1=0
    unknown_reg_flood.0=0
    unknown_reg_flood.1=0
    untagged_egress.0=0
    untagged_egress.1=0
    bcast_limit.0=0
    bcast_limit.1=0
    mcast_limit.0=0
    mcast_limit.1=0
    flow_unicast.0=0
    flow_unicast.1=0

               the "flow_unicast" is   the  bit 8  of  ale port.     It is alway  zero   ,no matter we set 1  or  0.    So  i  think  this  bit  does not  work. 

            but ,  from above , we can see " no  learning " works ,  and  the  packet  maybe  broadcast to  any ports.

          MY QUESTION  IS :

                        HOW  COULD I   recevie   all  the  package  in  this way  or   to  get  host 0 in  promisc mode  without  bypass. 

                thanks  &  regards

                Owen

       

     

        

     

     

     

        

     

  • Hi,   Paul

                EVM_8148 hardware:

                i  have  write wrong  about  in the  last message( upstairs).    The  bit 8   is   AlE  CONTROL  reg ,  not   ale port register.  

               We  can  not  set  this bit  to 1 ,     it's  always  0   no mater  set 1 or 0.

                 to  goto  promisc  mode  without  bypass ,     some other  DAVINCI (DM8168)  has  " RXCAFEN  bit ",  but   i  didn't  find it  in  814X's  reference manual. 

               please help us  how to configure this 

               thanks &  regards

     

               Owen

     

     

             

               

      

  • I answered your question based on the assumption you were using AM335x since the question was posted on the AM335x E2E forum which had previously been discussing AM335x Ethernet switch.

    The Ethernet switch in DM814x is an older version that does not support unicast flood packets to the internal host port.

    You should ask your DM814x based questions on the respective E2E forum to get answers related to DM814x capabilities.

    Regards,
    Paul 

  • Thanks Paul,

                 i  will  discuss  this  gain  in   DM814X froum.    thanks for your help . 

     

       

  • Thanks Paul,

                 i  will  discuss  this  again  in   DM814X froum.    thanks for your help .