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.

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

Other Parts Discussed in Thread: TMS320DM647, OMAP-L138, OMAP-L137

Hi,

   I am working on ti_dm81xx board (am387x) which has a "Port Switch (3PSW) Ethernet Subsystem", how can I configure the switch

into promisc mode ?  I go through the documents, except setting the ALE into bypass mode, there is nothing more there. But this

doesn't work, the switch still doesn't receive all the packets.  Is there anything that I miss ? Thanks.

 

 

  • WRS,

    I went ahead and moved this thread from the BIOS forum to the DM816x forum in hopes that you'll get a faster response.  FYI, the NDK does not provide any specific support for the 3PSW.

    Dave

  • Hi David,

        Thanks for you information. I didn't use the NDK but I already got it working. It works fine except in promisc mode,

    and I don't have the latest am387x documents, I took TMS320DM647/DM648 DSP 3PSW user guide as a reference.

    If you know where to download them, please tell me. Thanks in advance.

     

  • Hi,   WRS

                

            We  are  also  study in  the  dm814x's   3psw eth witch  host 0  to  receive  all the package.

            You  said  you had already  got it  working.   Could you  share  how to  configure it ?

              thank you !

  • Hello,


    You enable the BYPASS bit in the ALE_CONTROL to put it into promiscous mode.

    As for configuring it, using the Mistral board as an example, you configure the host port0, the slave 1 port, and the  the DMA RAM descriptors.

    This EMAC is similar to the OMAP-L138 except for the additional ports.

    Victor

  • Hi, Victor

    thanks very much for your reply.


    At first, please permit me to specify my problem in detail. As you know, 8148 has two ethernet. I want to make these two ethernet into
    "bridge mode".

    And the 8148 as a host monitor could receive all the package about ethernet port1 and port 2 's comunication. Not only the " multicast broadcast"
    ,but also the "unicast".


    Now the 8148's 3psw works as a switch , so the host can not receive "unicast " between two ethernet.

    We wish the 3psw works as a hub or a port mirroing mode.


    We are planning to solve this in two way . One way is 8148's BYPASS mode. The other is Dual-mac mode and use a software router.

    We had tried 8148 's by pass mode with Mistral board. host 0 and eth 1 , host 0 and eh2 could comminicate. But eh1 and eth2 can't.

    We know we must setup some register to connect these two channel. But we have no idea.


    There are a lot of registers about 3psw, it is very appreciate you tell us the detail about how to configure the "key" register about host 0,
    slave 1, slave 2 and DMA RAM.

    BTW, we use TI814X-LINUX-PSP-04.01.00.07

    thanks and regards,

    owen
  • hello,
     
                 maybe 81XX doesn't supply the promiscuous mode now.
     
                 is that right?   the  following is the shortcut of cpsw
     
     
    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          */
     
                                              owen
     
  • Hello,

    I am using the earlier Mistral board with the DDR2 that only has one RJ45 connector.  That connector is connected to Eth0(Slave 0).   When I put the ALE in bypass mode,  I received all packets.  Disabling the bypass mode will then require programming the ALE table to only allow multicast, broadcast and unicast packets to go through.

    Since I never implemented a switch but from working with this EMAC, I can figure out the comment on the previous email.  The promiscuous mode works but software is needed to manage the switch.  The reason for that is the two slave ports cannot send packets to each other. They can only forward their received packets to the host.  Your software must then process each packet and determine to route it to the other port or not. This is what  the comment meant as the host will need to operate as a "bridge".

    Hope this helps you.  If you do proceed, let me know when you are done.  I want to know how hard it was since I might have to do the same task myself.

    Cheers,

    Victor

  • Hello,

    I discussed this "bridge" issue with a coworker.   Since our application has nothing to do with networking, we cannot justify allocating that much of our CPU resource for this purpose.  

    However, if we are going to implement this feature, my coworker suggest a L2 switch PHY.  For example, the Mistral OMAP-L137 EVM uses a Micrel KSZ8893MQL.

    Cheers,

    Victor

  • Hello, Victor:

     

                thanks for your help.    We will  use  a  stand alone hardware switch  chip first  to  achieve the function  according to  your suggestion.

     

                But  i think  the  3psw  is  also  a  " switch core "  and  could   complete  "monitor port" mode.     i'm  learning the  3psw 's  process  detial about  package distribute.

             The badest result is to use software to  exchange  as a "soft bridge" ,   but  i think  maybe setup some registers( maybe Ti's reserve bits)  to make it  work in  "hardware bridge".  

  • Hello, All

         

                   i discuss  this  problem   in  another Cortex-A8 Microprocessors Forum.     And maybe AM335x  has the solution.

        My  Question  is  that    if  DM814X  also  has a  config "bit"  to  flow  all   unicast  to  host   just  like   RXCAFEN  bit  without  in bypass Mode ?.

     

            The   below is  the   communication about   the  question:

     

    Expert5170 Points

    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.

     

    • // Processing..."); emails = emails.replace(/'/g, "\\'"); name = encodeURIComponent(name).replace(/'/g, "\\'").replace(/"/g, "\"\""); bu = encodeURIComponent(bu).replace(/'/g, "\\'"); threadName = encodeURIComponent(threadName).replace(/'/g, "\\'"); href = encodeURIComponent(href).replace(/'/g, "\\'"); tBody = encodeURIComponent(tBody).replace(/'/g, "\\'"); tAuthor = encodeURIComponent(tAuthor).replace(/'/g, "\\'"); var vArgs = "{"; vArgs += "'sName':'" + name + "',"; vArgs += "'sBusinessUnit':'" + bu + "',"; vArgs += "'sEmails':'" + emails + "',"; vArgs += "'sPriority':'" + priority + "',"; vArgs += "'sThreadID':'" + threadID + "',"; vArgs += "'sThreadName':'" + threadName + "',"; vArgs += "'sHref':'" + href + "',"; vArgs += "'sForumName':'" + forumName + "',"; vArgs += "'sStatus':'" + status + "',"; vArgs += "'sGroupID':'" + groupID + "',"; vArgs += "'sBody':'" + tBody + "',"; vArgs += "'sAuthor':'" + tAuthor + "',"; vArgs += "'sDisplayName':'" + displayName + "',"; vArgs += "'sUserID':'" + userID + "',"; vArgs += "'sSectionID':'" + sectionID + "'}"; $.ajax({ type: "POST", url: "/TICustomWidgets/Utility/ContentFragments/Common/TrackingUtility.aspx/ThreadTrackSubmit", data: vArgs, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { var ti_tt = msg.d; msgbox.html(msg.d); $(".cStatus option:contains(" + 'Closed' + ")").attr("selected", "selected"); }, error: function (request, error) { msgbox.html("

      Error - " + request.responseText.substring(0, 50) + "...

      "); } }); } // ]]>
      Prodigy90 Points

      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

        

      // Processing..."); emails = emails.replace(/'/g, "\\'"); name = encodeURIComponent(name).replace(/'/g, "\\'").replace(/"/g, "\"\""); bu = encodeURIComponent(bu).replace(/'/g, "\\'"); threadName = encodeURIComponent(threadName).replace(/'/g, "\\'"); href = encodeURIComponent(href).replace(/'/g, "\\'"); tBody = encodeURIComponent(tBody).replace(/'/g, "\\'"); tAuthor = encodeURIComponent(tAuthor).replace(/'/g, "\\'"); var vArgs = "{"; vArgs += "'sName':'" + name + "',"; vArgs += "'sBusinessUnit':'" + bu + "',"; vArgs += "'sEmails':'" + emails + "',"; vArgs += "'sPriority':'" + priority + "',"; vArgs += "'sThreadID':'" + threadID + "',"; vArgs += "'sThreadName':'" + threadName + "',"; vArgs += "'sHref':'" + href + "',"; vArgs += "'sForumName':'" + forumName + "',"; vArgs += "'sStatus':'" + status + "',"; vArgs += "'sGroupID':'" + groupID + "',"; vArgs += "'sBody':'" + tBody + "',"; vArgs += "'sAuthor':'" + tAuthor + "',"; vArgs += "'sDisplayName':'" + displayName + "',"; vArgs += "'sUserID':'" + userID + "',"; vArgs += "'sSectionID':'" + sectionID + "'}"; $.ajax({ type: "POST", url: "/TICustomWidgets/Utility/ContentFragments/Common/TrackingUtility.aspx/ThreadTrackSubmit", data: vArgs, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { var ti_tt = msg.d; msgbox.html(msg.d); $(".cStatus option:contains(" + 'Closed' + ")").attr("selected", "selected"); }, error: function (request, error) { msgbox.html("

      Error - " + request.responseText.substring(0, 50) + "...

      "); } }); } // ]]>

    • Prodigy90 Points

      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

       

     

     

     

          

  • Hello, All

        

                   i discuss  this  problem   in  another Cortex-A8 Microprocessors Forum.     And maybe AM335x  has the solution.

        My  Question  is  that    if  DM814X  also  has a  config "bit"  to  flow  all   unicast  to  host   just  like   RXCAFEN  bit 

    without  in bypass Mode ?.

     

            The   below is  the   communication about   the  question:

    -------------------- Posted by  Pual----------------------------------------

    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.

     

     ---------------------Posted by hongchencai-----------------------------

     

     

    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 substantial2413          * headache.  For promiscuous mode to work,

    we would need to put the2414          * 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 and2417          * 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

     

    ---------------------Posted by hongchen cai   -----------------------------

    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

  • Hi Hongchen,

    Have you finally made Promiscuous mode works on DM814x EMAC?

    If yes, how? Do you follow the way in the post you shared and don't set ALE in bypass mode? Thanks.

  • Hello,  Chris

                 We  make the two LANs into  "promiscuous mode“  by setting them connect as a bridge in application  layer.  

                So it maybe  use a lot  CPU time to do  this  software switch.