Getting started with Octeon CN913x

Hello!

My company has bought a Clearfog CX CN913x and I am trying to get started with it. I have followed the instructions in your knowledge base to do the following:

  • Build a Linux image using the CN913x Build - Script method
  • Flash the image to an SD card, and extend that SD card partition
  • Boot from the SD card into Linux on the device, using the serial FTDI port

My questions are in regards to the documentation (either yours or Marvell’s) of where to go from here.

  1. Is there any documentation on how to set up and use the network connections? Which Ethernet interfaces are configured on the default image? I have been unable to get an Internet connection to the device through any of the ports.
  2. Is there any documentation on how to interact with the Marvell switch and PHY parts?
  3. Is there a way to configure the script build to boot automatically from the SD card, skipping the u-boot setenv step on each boot? Or is one of the more complex build methods with a custom u-boot needed for this?

/Regards

I assume you mean the CN913X Cex7 module along with the evaluation carrier. The network interfaces should be setup by default and work the same as any other Linux based network interface. The Marvell switch and phy are all enumerated through the DSA kernel architecture. Are you bringing the interfaces up after boot, the default boot image is very basic and you may need some manual configuration. Please post logs if you have additional issues.

Yes, I am using a CN913X Cex7 module + the CN9K carrier. I was able to solve my issue with Linux ip tools, putting my solution here for future questions.

I was able to set up the eth1 (1G Management) interface and ping first another computer with static IP:

$ ip link set eth1 up
$ ip addr add 10.0.1.100/24 dev eth1
$ ping 10.0.1.200

And after some further digging around, managed to get Internet working over dhcp:

$ echo "iface eth1 inet dhcp" >>/etc/network/interfaces
$ ifup eth1
$ ping google.com
PING google.com (216.58.211.14) 56(84) bytes of data.
64 bytes from arn09s20-in-f14.1e100.net (216.58.211.14): icmp_seq=1 ttl=57 time=2.93 ms

Can I get some clarification on what interfaces are available? From my digging, I would guess that:

  • eth1 = 1G Management interface
  • eth2 and lan1-4@eth2 = the Marvell switch, with 4x1G interfaces

What is eth0? The SFP? How does one access the two 5G PHY interfaces?

eth0 - sfp
eth1 - 1GbE through PHY
eth2 - ethernet switch lan 1-4
eth3 - 5G PHY 0
eth4 - 5G PHY 1

Couple follow ups, as I’m in a similar boat with the OP!

  • Running the default firmware, I’m not seeing eth4 or eth5. I also notice I don’t get link light when I connect to either - is something needed to enable them?

  • Sharing just for others, I found https://static.lwn.net/kerneldoc/networking/dsa/configuration.html helpful, it’s not immediately clear that it’s necessary to setup a bridge attached to eth0 and the lan interfaces, but it’s pretty straightforward.

This was changed for security reasons. The issue being that if you had hardware that was being isolated in vlans and then the system was reset that all devices could talk to one another until everything was configured. The decision was to then leave everything isolated until userspace re-created the network configuration.

1 Like

this makes sense for needing to set up the bridge, what about me not seeing eth4/5?