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 to enable ALE Bypass flag?

Hi all ,

We are trying to modify the CPSW setting to forward all received traffic from external ports to the host port. Currently Board ethernet interface receives the traffic if the destination MAC is board's MAC address, remaining packets are dropped at the inteface level itself (Not even traced by tcpdump).

  • We need to set the Bypass flag to 1 in ALE_CONTROL to achieve the above requirement  . But we were not able to modify the bypass flag value in ALE_CONTROL, even editing using "vi" was not helpful - change was not reflected in the Ale_control . How to change the ALE_CONTROL values in ARM ?
  • Commands tried :
    • echo "bypass=1" > cat /sys/devices/soc6614.0/2090000.netcp/ale_control
    • echo "bypass=1" >cat /sys/class/net/eth0/device/ale_control

Not able to modify the Ale_control values . Is it read/Write protected ?

Linux Kernel :  Arago linux-3.4.40.

 

 

regards , 

vinodh 

  • Hi,

    your command seems incorrect - it should not have "cat" after redirection (">" sign).
    You can also check this wiki:
    processors.wiki.ti.com/.../Linux_Core_NetCP_User's_Guide

    Regards,
    Yordan
  • Hi ,
    Sorry about that mistake - even after trying without "cat" am getting error in the terminal. Linux kernel is crashing and its getting logging out.

    Terminal Log :

    root@tci6614-evm:~# echo "bypass=1" > /sys/class/net/eth0/device/ale_control
    Unable to handle kernel NULL pointer dereference at virtual address 00000000
    pgd = ddd38000
    [00000000] *pgd=9dc1c8312014 Feb 28 06:0, *pte=000000004:00 tci6614-evm, *ppte=00000000 Unable to handl
    e kernel NULL poInternal error: Oops: 817 [#1] PREEMPT THUMB2
    Modules linked in:
    CPU: 0 Not tainted (3.4.40-02.02.01.03A #1)
    PC is at _kstrtoul+0x26/0x2c
    LR is at _kstrtoull+0x1d/0x4c
    pc : [<c012fb8a>] lr : [<c012f8e5>] psr: 600f0833
    sp : df869ed0 ip : c014f07d fp : 00000000
    r10: dd40c006 r9 : 00000000 r8 : de273534
    r7 : 00000009 r6 : 00000000 r5 : 00000000 r4 : 00000001
    r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000
    Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA Thumb Segment user
    Control: 50c5387d Table: 9dd38019 DAC: 00000015
    Process sh (pid: 887, stack limit = 0xdf8682e8)
    Stack: (0xdf869ed0 to 0xdf86a000)
    9ec0: 00000001 00000000 00000000 00000000
    9ee0: c02a0a54 c01712eb c03f9744 623f96d4 73617079 00060073 df869fb0 c04260bc
    9f00: 00000000 c000838f de38101b 00000009 c0171291 ddc1da80 ddc1da98 df869f88
    9f20: de271440 c029e858 df87e810 c014f087 00000009 c00bbbb7 ddeabe00 00000009
    9f40: 000bc408 df869f88 00000009 df868000 00000000 c0081c07 00000000 00000001
    9f60: ddeabe00 00000000 00000000 ddeabe00 000bc408 00000009 df868000 c0081dbf
    9f80: 00000003 00000000 00000000 00000000 b6f3ea78 00000009 000bc408 00000004
    9fa0: c000c684 c000c4c1 b6f3ea78 00000009 00000001 000bc408 00000009 00000000
    9fc0: b6f3ea78 00000009 000bc408 00000004 00000000 00000001 be987af4 00000000
    9fe0: 00000000 be987a7c b6eaeb77 b6ee525c 400f0010 00000001 f77fff7f fff7ffff
    [<c012fb8a>] (_kstrtoul+0x26/0x2c) from [<c01712eb>] (cpsw_ale_control_store+0x5b/0xb0)
    [<c01712eb>] (cpsw_ale_control_store+0x5b/0xb0) from [<c014f087>] (dev_attr_store+0xb/0x14)
    [<c014f087>] (dev_attr_store+0xb/0x14) from [<c00bbbb7>] (sysfs_write_file+0xe3/0x108)
    [<c00bbbb7>] (sysfs_write_file+0xe3/0x108) from [<c0081c07>] (vfs_write+0x5f/0xd4)
    [<c0081c07>] (vfs_write+0x5f/0xd4) from [<c0081dbf>] (sys_write+0x27/0x4c)
    [<c0081dbf>] (sys_write+0x27/0x4c) from [<c000c4c1>] (ret_fast_syscall+0x1/0x46)
    Code: bf0a 4608 f06f 0021 (6034) b002
    inter dereference at virtual address 00000000
    2014 Feb 28 06:04:00 tci6614-evm pgd = ddd38000
    ---[ end trace 13224be22c44548d ]---
    2014 Feb 28 06:04:00 tci6614-evm [00000000] *pgd=9dc1c831, *pte=00000000, *ppte=00000000
    2014 Feb 28 06:04:00 tci6614-evm Internal error: Oops: 817 [#1] PREEMPT THUMB2
    2014 Feb 28 06:04:00 tci6614-evm Process sh (pid: 887, stack limit = 0xdf8682e8)
    2014 Feb 28 06:04:00 tci6614-evm Stack: (0xdf869ed0 to 0xdf86a000)
    2014 Feb 28 06:04:00 tci6614-evm 9ec0: 00000001 00000000 00000000 00000000
    2014 Feb 28 06:04:00 tci6614-evm 9ee0: c02a0a54 c01712eb c03f9744 623f96d4 73617079 00060073 df869fb0 c04260bc
    2014 Feb 28 06:04:00 tci6614-evm 9f00: 00000000 c000838f de38101b 00000009 c0171291 ddc1da80 ddc1da98 df869f88
    2014 Feb 28 06:04:00 tci6614-evm 9f20: de271440 c029e858 df87e810 c014f087 00000009 c00bbbb7 ddeabe00 00000009
    2014 Feb 28 06:04:00 tci6614-evm 9f40: 000bc408 df869f88 00000009 df868000 00000000 c0081c07 00000000 00000001
    2014 Feb 28 06:04:00 tci6614-evm 9f60: ddeabe00 00000000 00000000 ddeabe00 000bc408 00000009 df868000 c0081dbf
    2014 Feb 28 06:04:00 tci6614-evm 9f80: 00000003 00000000 00000000 00000000 b6f3ea78 00000009 000bc408 00000004
    2014 Feb 28 06:04:00 tci6614-evm 9fa0: c000c684 c000c4c1 b6f3ea78 00000009 00000001 000bc408 00000009 00000000
    2014 Feb 28 06:04:00 tci6614-evm 9fc0: b6f3ea78 00000009 000bc408 00000004 00000000 00000001 be987af4 00000000
    2014 Feb 28 06:04:00 tci6614-evm 9fe0: 00000000 be987a7c b6eaeb77 b6ee525c 400f0010 00000001 f77fff7f fff7ffff
    2014 Feb 28 06:0tty_port_close_start: tty->count = 1 port count = 2.
    4:00 tci6614-evm Code: bf0a 4608 f06f 0021 (6034) b002


    regards ,
    Vinodh
  • Any updates ?

    regards ,
    Vinodh
  • Hi Vinodh,

    from what I see in the log the error is in the function that converts string to unsigned long (it should convert the '1' written in sysfs),
    but I was not able to find any reason why that might happen.
    Hopefully someone else can help on this.

    Regards,
    Yordan
  • Hi Yordon ,
    Thanks - Even if i try using 'vi ' editor to change the ALE_Control parameter, am not able to save it. Changes made is not getting detected - only option am allowed is to quit without saving.

    regards ,
    Vinodh
  • Hi Vinodh,

    it is not necessary to use vi. 'echo'-ing the value to the file should be enough. From the error log it is visible that the written value
    is received by the kernel, but when it is processed there is some error.

    Regards,
    Yordan