Cascaded SJA1105P. Trying to find the physical switch port that a MAC address device is connected to

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Cascaded SJA1105P. Trying to find the physical switch port that a MAC address device is connected to

1,423 Views
mullenr1a
Contributor I

We have 3 SJA1105Ps cascaded. The MAC addresses of attached devices can be found through an L2 table ARL search. (Using NXP ARL sample code) We cannot seem to consistently find the physical SJA1105P ports that coincide with the MAC addresses. The MAC addresses read by the ARL search are always fine.

Presently we are using the "ARL_Entry.ports" bit field that is returned from the NXP sample ARL function calls. This has the MAC and port correct but only on power up. After power up the physical ports on the cascaded switches are not correct if a device is disconnected and then re-connected.

I'm thinking that the "ARL_Entry.ports" bit field is not the correct value to use to determine which physical ports the MAC devices are attached to. Any thoughts would be appreciated.

Other than the ports becoming incorrect if disconnected and reconnected, (usually they change to port 0), the cascaded switches communicate very well!

Thanks

-Rich

 

0 Kudos
Reply
6 Replies

1,342 Views
mullenr1a
Contributor I

Hi Lukas,

  Thanks for looking at this.

We do change the devices attached to the ports frequently. And we can swap which physical ports they’re attached to at any time. We have 3, SJA1105P switches cascaded and would like to query which physical port a MAC address has been found on.

  We’re using the NXP sample SDK software package,

(Specifically NXP_SJA1105P_addressResolutionTable.c function: SJA1105P_readArlTableEntryByIndex() to get MAC address and port info)

In that function we are looking at the p_addressResolutionTableEntry->ports |= logicalDestPorts; code to determine which ports the MAC address is associated with. It’s understood that this variable does not return exactly what we want. Although, it’s correct the first time we discover devices at powerup.

We did not make any static index entries in the ARL table. All of our attached devices are discovered dynamic entries.

The switch electronics, powerup configurations, and sample appear to be working well. The only issue we’re having is determining which port a device is attached to.

Thanks again for any suggestions!

Rich Mullen

0 Kudos
Reply

1,306 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rich,

I just got this feedback:

"Reading their description it sounds as though they expect the switch to query the port and connected device, to determine the MAC address that is connected to the individual port. Unless the address is statically configured for the port, dynamic learning is usually enabled. The port learns the source address of the connected device when the device sends a message to the switch.

Do the devices, when attached, start to communicate? Alternatively does the host send out a message looking for the attached device (broadcast)?"

I was also asked if you can share exact version of SDK you have.

Thanks,

Lukas

0 Kudos
Reply

1,298 Views
mullenr1a
Contributor I

Hi Lukas,

  We're using the sdk version "SJA1105PQRS Linux Switch Driver Release v0.2.1"

There are 3 switches total with switch 0 connected to a CPU and Switch 1 and 2 cascaded.

The devices that are attached do initiate communications, and the host also sends out a broadcast to detect attached devices. All switches do learn the MAC addresses, though the 'ports' field in the L2 table may have the port that the communication was learned on (which is what we want), or a different port, usually port 0.

Our issue is that when we query the L2 table the 'ports' bit field doesn't always reflect the port the device is attached to. I realize this may not be its correct function... Still, we would like to be able to get information from the switch of which port it dynamically learned a MAC address on.

  Thank you for your time with this.

-Rich Mullen

0 Kudos
Reply

1,271 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rich,

here is next feedback:

"... this could potentially be an issue with the SPI drivers. So, I think we should ask them what SPI drivers they are using. Also, a scope plot of MOSI/MISO and CS can be helpful"

Regards,

Lukas

0 Kudos
Reply

1,396 Views
mullenr1a
Contributor I

Hi Lukas,

  Thanks for looking at this.

We do change the devices attached to the ports frequently. And we can swap which physical ports they’re attached to at any time. We have 3, SJA1105P switches cascaded and would like to query which physical port a MAC address has been found on.

  We’re using the NXP sample SDK software package,

(Specifically NXP_SJA1105P_addressResolutionTable.c function: SJA1105P_readArlTableEntryByIndex() to get MAC address and port info)

In that function we are looking at the p_addressResolutionTableEntry->ports |= logicalDestPorts; code to determine which ports the MAC address is associated with. It’s understood that this variable does not return exactly what we want. Although, it’s correct the first time we discover devices at powerup.

We did not make any static index entries in the ARL table. All of our attached devices are discovered dynamic entries.

The switch electronics, powerup configurations, and sample appear to be working well. The only issue we’re having is determining which port a device is attached to.

Thanks again for any suggestions!

Rich Mullen

0 Kudos
Reply

1,405 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi Rich,

I asked our ethernet experts for help because I'm not familiar with this and here is their first feedback:

"Not sure what software package or config they are using for their setup, was this provided from us?

Are they moving connected devices to different ports and trying to determine which port these are connected to?"

Regards,

Lukas

0 Kudos
Reply