Part Number: TDA4VM
Dear Experts,
In SDK8.1 we have added the function of " Multiple independent MAC interfaces (A72/Linux) ", do we have a demo to show how to enable this?
Thanks.
Best regards,
Sikai Lu
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.
Hi Sikai,
According to ethfw user guide, For TDA4VM, the Multiple independent MAC interfaces are enabled by default for two of the ports as shown in the image :
The Phy addressed 3 and 12 will act in the MAC-only mode.
To see additional details on how to configure the ports to MAC-only mode, see this : https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/08_01_00_11/exports/docs/ethfw/docs/user_guide/ethfw_c_ug_top.html#ethfw_maconly
Regards,
Tanmay
Hi Tanmay,
I have tried some combination. I am sorry that I still feel confused of such set.
For example, I have made a change like this:

Since I only conneted mac4 on our EVM board, I just enabled ENET_MAC_PORT_4. And change MPU1_0 to mac-only. Then it cannot ping successfully.

However, when I enable all ports and still change MPU1_0 to mac-only, it can ping successfully.

So I feel so confused of this function. The introduction on our user gudie cannnot give me a clear explaination. And for multi-independent mac interface feature, does it mean when I type "ifconfig" in linux that I can see eth0 eht1 and eht2?
I also find another customer share a similar question like me: https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1102733/tda4vm-sdk8-2-ethernet-how-to-setup-virtual-switch-port
Could you help me? Thanks.
BR
Sikai
Hi Sikai,
The MAC-Only feature is used to make a point to point connection between a MAC_PORT and a Virtual MAC port on host side. The traffic incoming to port4 in your case cannot be redirected to any other port other than the ethmac_device on mpu1_0. So every MAC-Only port will require its own interface client on the host side.
In contrast to this, for a switch port, the incoming traffic on that port can be forwarded to any one or more ports connected to the switch. Only one interface client suffices for multiple ports on one host.
If you see in the above image, MAC Port 1 and MAC Port 4 are routed directly through host port to there respective host. They are the MAC-Only mode ports. Rest go through a switch in which every port can have connection to every other port connected to that switch. They are switch-mode ports.
Since I only conneted mac4 on our EVM board, I just enabled ENET_MAC_PORT_4. And change MPU1_0 to mac-only. Then it cannot ping successfully.
This seems correct. You should have been able to ping with this. Could be a setup issue. This will need more debug.
I have tried to disable mac-only and it can ping successfully now
How many interfaces do you see in `ifconfig -a` in this case? You should only see eth0 and eth1. As you have removed the mac-only for port 4, the ENET_MAC_PORT4 will be a switch port now.
Regards,
Tanmay
Dear Tanmay,
Thanks for your help. Since I am OoO now, I have to do tests on EVM later.
I can see eth0 and eth1 when I type in "ifconfig". But during my previous tests, when I do the ifconfig I can always see the eth0 and eth1. It seems like whatever I did to the mac-only or switch port, the number of eth will not change.
How many interfaces do you see in `ifconfig -a` in this case?
Do you mean that my set is right? And it should ping successfully? If so, why I cannot ping it on EVM board?
This seems correct.
BR
Sikai
Hi Sikai,
But during my previous tests, when I do the ifconfig I can always see the eth0 and eth1
By default, you should see eth0, eth1 and eth2 in SDK 8.2.
Do you mean that my set is right? And it should ping successfully? If so, why I cannot ping it on EVM board?
Yes, your configuration seems correct. But if you were seeing only eth0 and eth1 in ifconfig, then something is wrong. The issue will require some debug. It would be great if you could send me the changes you did for this once you are back.
Regards,
Tanmay
Dear Tanmay,
Thanks so much, I will update my changes and related outcome to you once I have the environment.
BR
Sikai
Dear Tanmay,
Sorry for my late reply. Now I am using the default SDK 8.1 and our EVM.

Here is the default code and I follow the instruction to replace the ethfw with make ethfw_all BUILD_SOC_LIST=J721E:https://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/08_02_00_05/exports/docs/ethfw/docs/user_guide/demo_ethfw_combined_top.html

Here is the log of ifconfig:

Only eth0 and eht1 can be found, so I guess there should be something wrong of my operation.
BR
Sikai
Dear Tanmay,
I have checked my process and found I forget to do soft link with server image in SD card.
I have tried different combination of MAC-only :
1. Enable MPU1_0 and MCU2_1, I can see eth1 eht2 in kernel.
2. Enable MCU2_1, I can see only eth1 in kernel.
3. Enable MPU1_0 , I can see both eth1 and eht2.

So I think the multi-mac feature is strongly with MPU1_0? What should I do if I want to add more interfaces? I think I should make changes in linux?
BR
Sikai
Hi Sikai,
So I think the multi-mac feature is strongly with MPU1_0?
The Multi-mac feature actually means that the ethfw is capable of supporting multiple MAC interfaces. The Client core can be anything, MPU or MCU.
You should be able to see the port configuration in ethfw logs. For eg, :
CpswProxyServer: Virtual port configuration: mpu_1_0 <-> Switch port 0: mpu_1_0_ethswitch-device-0 mcu_2_1 <-> Switch port 1: mcu_2_1_ethswitch-device-1 mpu_1_0 <-> MAC port 1: mpu_1_0_ethmac-device-1 mcu_2_1 <-> MAC port 4: mcu_2_1_ethmac-device-4
What should I do if I want to add more interfaces? I think I should make changes in linux?
This has two parts. First, adding a MAC port in ehfw server. This is what you have been changing and experimenting onto.
The second part is having a virtual device port on the client side. On Linux, this is done by adding a device tree node for ethmac-device. I am not sure how it is done on RTOS. I will check and let you know. Currently, only these two are supported for multi-independent mac interfaces.
Hence, when you only enabled MCU2_1, you created a MAC-Only port on ethfw server side which can be controlled only by MCU2_1. The ethfw server running on MCU2_1 created a virtual device port and connected to the MAC-Only port on ethfw server side. This will give you "mcu_2_1 <-> MAC port 4: mcu_2_1_ethmac-device-4" in the log. But as MPU1_0 is disabled, there will be no other MAC-Only ports. The linux kernel only shows the ports which MPU1_0 has access to. So, you will not get an eth2 interface. The linux kernel cannot see the MAC-Only port assigned to MCU2_1.
Hope this clarifies things.
Regards,
Tanmay
Dear Tanmay,
Thanks and hope to hear from you very soon.
I will check and let you know
BR
Sikai