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.

PROCESSOR-SDK-AM437X: Issue with bonding driver over eth0 eth1 of AM437x

Part Number: PROCESSOR-SDK-AM437X


Hi,

We use following bond setup commands to bonding driver over eth0 and eth1 in AM437x-gp-evm:

insmod /home/root/bonding.ko ad_select=0 mode=4 miimon=100
sleep 1
ifconfig bond0 up
/home/root/ifenslave bond0 eth0 eth1

ifconfig bond0 promisc

ifconfig bond0 192.168.1.226

With two net cables connect , if we pull out the active cable when ping,  there will be two  packets lost.

We try it in X86 system(linux 2.6.18)  with the same action, the ping is ok and no packet lost.

It seem the cpsw  is too slow to detect carrier off ,Is there any paremeter need to be modified?

Our SDK  version is ti-processor-sdk-linux-am437x-evm-0.5.01.00.11

linux version is 4.14.67

Best regards,

Dudechao

  • Hi,

    Could you please describe the setup? For example what are the connection between the AM437 and its link partner?

    Since you are concerned about packet loss why isn't bonding mode 3 selected?

    Best Regards,

    Schuyler

  • Hello Schuyler,

    We connect AM437x's  two  net ports to Ethernet-switch which support the bonding mode.

    We can commnuicate with PCs which support the bonding mode  and connect with two ports to the same ethnernet switch.

    We can find more packets wll be lost than PCs when pull out the active port and switch to the other port. The other port become active  above more than 2 seconds in AM437x and about 200ms in PCS.

    We hope  the time it take  no more than 300ms when this case occurs (cable brocken or port fault).

    The mode 3 is double bandwidth needed and not suitable for our application.

    Best Regards,

    Dudechao

  • Hi,

    I will need to research this with the development team. Could you please describe your test setup and the production topology that you are planning to implement? Could you please also describe how you are measuring the link restoration time? 

    Thank you and Best Regards,

    Schuyler

  • Hello Schuyler,

    There  are  two  X86-PCs( linux2.6.18),  one AM437x embedded board( linux 4.14.67), All the three devices support bonding mode 4 with 2 net ports and connect to Ethernet-switch which support bonding mode 4.

    All devices  bond  the same: insmod /hone/root/bonding.ko ad_select = 0 mode=4 miimon=100

    The three devices run our application which communicate each other through net with audio and video data.  All the data are packeted as RTP.    We can find the restoration time from RTP packet's squence number and time stamp when pull out the active net cable.

    We find the much more time is needed to restore in Am437x embeded board(about 2 seconds) than X86-PCs(about 200ms). 

    We hope it can be less than 300 ms.

    If ping in this case, we can find more packets is lost in Am437x, but almost no packet lost in X86-PC.

    Best Regards,

    Dudechao

  • the way to speed up link detection event is to use Ethernet PHY IRQ.

    What PHY do you use? Does PHY support IRQ and is PHY irq wired properly?

  • Hi,

    The PHY we used is RTL8311F. There is a pin named INTB/PMEB in the PHY which is left  unconnected  in our Am437x board. Can any unused GPIO  be   connected to this pin as the IRQ?  How should the DTS or driver be modified to support it? Please show me a reference DTS about the IRQ. Thank you! 

    Best Regards,

    Dudechao

  • Phy IRQ example:

    	dp83867_0: ethernet-phy@2 {
    		reg = <2>;
    		ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
    		ti,tx-internal-delay = <DP83867_RGMIIDCTL_250_PS>;
    		ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_8_B_NIB>;
    		ti,min-output-impedance;
    		interrupt-parent = <&gpio6>;
    		interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
    ^^^^ ti,dp83867-rxctrl-strap-quirk; };

    But note RTL8311F is not TI PHY and you might need to consult vendor regarding Linux driver and IRQ support.

  • Hi,

    Thank you for your support!

    Best Regard,

    Dudechao