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.

TDA4VM: Using tc filter... flower cannot take effect when filtering vlan id

Part Number: TDA4VM
Other Parts Discussed in Thread: TDA4VH

Hi, TI experts

I want to verify the traffic shaping function of the TAS function on vlan ids. TAS can send different packets from the send queue controlled by the configured gated list according to the vlanid characteristics in the flow.


I looked at some of the iproute2 source code,It seems to be able to identify the vlan id in the packet using the following instruction.

 tc filter add dev eth0 egress protocol 802.1Q flower vlan_id 5 action skbedit priority 3

Then refer to this link https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-jacinto7/08_04_00_11/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-EST.html#am625-sk-acting-as-a-switch-and-implementing-est-scheduleI used the TDA4VH board as the switch, and then used two TDA4VM, one as the sender and one as the receiver.

However, no corresponding result has been obtained after following the steps. I would like to ask if there are more detailed steps or what needs to be paid attention to during configuration?

  • Hello,

    Can you please share all the commands being run on each of the devices?

    Regards,
    Siddharth.

  • hello,

    • vm-send

    #!/bin/sh
    ip link add link eth1 name eth1.100 type vlan id 100
    ip link set eth1.100 type vlan egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
    sleep 10

    ./plget -i eth1.100 -m pkt-gen -p 3 -t ptpl2 -n 128 -a 68:e7:4a:08:41:9b -l 80
    sleep 5
    ./plget -i eth1.100 -m pkt-gen -p 2 -t ptpl2 -n 128 -a 68:e7:4a:08:41:9b-l 80
    sleep 5
    ./plget -i eth1.100 -m pkt-gen -p 1 -t ptpl2 -n 128 -a 68:e7:4a:08:41:9b-l 80


    •  vh-as-switch

    ifconfig eth0 down
    ifconfig eth1 down
    ethtool -L eth0 tx 4
    ethtool -L eth1 tx 4
    ethtool --set-priv-flags eth0 p0-rx-ptype-rrobin off
    ethtool --set-priv-flags eth1 p0-rx-ptype-rrobin off

    devlink dev param set platform/46000000.ethernet name switch_mode value true cmode runtime
    ip link add name br0 type bridge
    ip link set dev br0 type bridge ageing_time 1000
    ip link set dev eth0 up
    ip link set dev eth1 up
    sleep 10
    ip link set dev eth0 master br0
    ip link set dev eth1 master br0
    ip link set dev br0 up

    sleep 2
    ip link set dev br0 type bridge vlan_filtering 1
    bridge vlan add dev br0 vid 1 pvid untagged self
    bridge vlan add dev eth0 vid 100 master
    bridge vlan add dev eth1 vid 100 master

    #sync system time to CPSW CPTS
    phc2sys -s CLOCK_REALTIME -c eth0 -m -O 0 > /dev/null &

    #calc base_time as now + 2min, give it time to sync
    base=$(((`date +%s` + 10)*1000000000))

    tc qdisc replace dev eth0 parent root handle 100 taprio \
    num_tc 3 \
    map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \
    queues 1@0 1@1 1@2 \
    base-time $base \
    sched-entry S 4 10000 \
    sched-entry S 2 30000 \
    sched-entry S 1 60000 \
    flags 2
    tc qdisc replace dev eth1 parent root handle 100 taprio \
    num_tc 3 \
    map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \
    queues 1@0 1@1 1@2 \
    base-time $base \
    sched-entry S 4 10000 \
    sched-entry S 2 30000 \
    sched-entry S 1 60000 \
    flags 2


    • vm-recv

    #!/bin/sh

    ip link add link eth0 name eth0.100 type vlan id 100


    while sleep 1; do ./plget -m rx-lat -f ipgap -n 128 -i eth0.100 -t ptpl2 -f hwts; done


    Finally, I'd like to ask that eth0 and eth1 belong to different switches when configuring switch modes at TDA4VH. Is this the wrong connection mode? Do I need to configure on the same switch?

  • Hello,

    Yes, eth0 and eth1 belong to different switches. This is the reason behind the problem.
    In your current setup, eth0 corresponds to 46000000.ethernet while eth1 corresponds to
    c200000.ethernet.

    To utitlize switch functionality of TDA4VH, please apply the overlay file:
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-j784s4-quad-port-eth1-exp.dts?h=ti-linux-5.10.y

    The above overlay is for enabling QSGMII mode on TDA4VH with Linux.
    This requires the QSGMII daughtercard:
    https://www.ti.com/lit/ug/spruis4d/spruis4d.pdf#page=11
    The QSGMII daughtercard has to be connected to the ENET Expansion 1 slot
    on TDA4VH.

    Once the above setup is ready, the interfaces:
    eth1, eth2, eth3 and eth4
    will belong to the same switch corresponding to the QSGMII daughtercard.
    With the above setup, there will be a total of 6 ethernet interfaces on the device:
    eth0: 46000000.ethernet
    eth1: c000000.ethernet
    eth2: c000000.ethernet
    eth3: c000000.ethernet
    eth4: c000000.ethernet
    eth5: c200000.ethernet

    Also, the following command on tda4vh is incorrect:
    devlink dev param set platform/46000000.ethernet name switch_mode value true cmode runtime
    Please change it to:
    devlink dev param set platform/c000000.ethernet name switch_mode value true cmode runtime
    The QSGMII interface switch corresponds to: c000000.ethernet which is why the command has
    to be changed.

    Please let me know in case of further questions.

    Regards,
    Siddharth.

  • hello,

    I want to test with eth2 and eth3, but there was something wrong at first!

    When I want to set the number of send queues for eth2, I get an error directly,I'm wondering if I need to set up the TAS feature of CPSW9G!

    root@j784s4-evm:~/rqyang#
    root@j784s4-evm:~/rqyang# ifconfig eth2 down
    [MCU2_0] 1227.686062 s: Function:CpswProxyServer_unregisterMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:70:ff:76:1d:92:c1, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.686544 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:1, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.686810 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:1:80:c2:0:0:0, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.687184 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:1:80:c2:0:0:3, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.687452 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:1:80:c2:0:0:e, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.687555 s: CpswProxyServer_isRsvdMcast: Reserved mcast cannot be added to filter
    [MCU2_0] 1227.687675 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:33:33:0:0:0:1, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.687934 s: Functi[ 1216.471453] j721e-cpsw-virt-mac main-r5fss-cpsw9g-virt-mac0: virt_cpsw_nuss mac stopped
    on:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c3780[ 1216.483852] br0: port 1(eth2) entered disabled state
    4,CoreKey:38acb7e6, MacAddress:33:33:ff:1d:92:c1, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.688313 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:fb, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.688577 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:1:0:5e:0:0:fc, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.688830 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:33:33:0:0:0:fb, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.689322 s: Function:CpswProxyServer_filterDelMacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6, MacAddress:33:33:0:1:0:3, vlanId:0, FlowIdx:114, FlowIdOffset:0
    [MCU2_0] 1227.835629 s: Function:CpswProxyServer_unregisterIpv4MacHandlerCb,HostId:0,Handle:a3c37804,CoreKey:38acb7e6,IPv4Addr:c0:a8:3:30
    [MCU2_0] 1227.835738 s:
    [MCU2_0] SNo. IP Address MAC Address
    [MCU2_0] 1227.835770 s: ------ ------------- -----------------
    root@j784s4-evm:~/rqyang#
    root@j784s4-evm:~/rqyang#
    root@j784s4-evm:~/rqyang# ethtool -L eth2 [MCU2_0] 1259.724218 s: CpswCpts_ioctl: Eth RX event not found (msgType=2, seqId=256, dom=0, portNum=2)
    tx^C
    root@j784s4-evm:~/rqyang# ethtool -L eth2 tx 3
    netlink error: Operation not supported
    root@j784s4-evm:~/rqyang# 

  • Hello,

    It appears that you are using EthFw and not Native Ethernet.
    Please apply the overlay at U-Boot to enable Native Ethernet functionality.

    Regards,
    Siddharth.

  • Hi,

    The TSN functionalities are currently available only in Native linux driver currently. By default, the SDK has the Ethfw ethernet controller which does not have TSN functionality. To switch from ethfw to native linux driver, please consult this.

    Regards,
    Tanmay

  • hello,

    sorry for the late!

    I have tried to use Native Drive for verification. The following is the result of my verification。

    I send it with an VM board, the VH board is used as a switch, and the other VM is used as receiving!

    send script,after executing the script, I manually send a message

    #!/bin/sh
    
    ip link add link eth1 name eth1.100 type vlan id 100
    ip link set eth1.100 type vlan egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
    
    
    # send message later
     log

    U-Boot 2020.01 (Dec 30 2020 - 19:30:14 +0800)
    
    SoC:   J721E SR2.0
    Model: Texas Instruments K3 J721E SoC
    Reading on-board EEPROM at 0x50 failed 1
    Board: J721EX-PM1-SOM rev E2
    DRAM:  4 GiB
    not found for dev hbmc-mux
    Flash: 0 Bytes
    MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Reading on-board EEPROM at 0x50 failed 1
    Net:   Could not get PHY for ethernet@46000000: addr 0
    phy_connect() failed
    No ethernet found.
    
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    1490356 bytes read in 6 ms (236.9 MiB/s)
    Load Remote Processor 2 with data@addr=0x82000000 1490356 bytes: Success!
    338860 bytes read in 2 ms (161.6 MiB/s)
    Load Remote Processor 3 with data@addr=0x82000000 338860 bytes: Success!
    1530644 bytes read in 6 ms (243.3 MiB/s)
    Load Remote Processor 6 with data@addr=0x82000000 1530644 bytes: Success!
    1530644 bytes read in 6 ms (243.3 MiB/s)
    Load Remote Processor 7 with data@addr=0x82000000 1530644 bytes: Success!
    13111360 bytes read in 41 ms (305 MiB/s)
    Load Remote Processor 8 with data@addr=0x82000000 13111360 bytes: Success!
    19276288 bytes read in 68 ms (270.3 MiB/s)
    102426 bytes read in 2 ms (48.8 MiB/s)
    11545 bytes read in 1 ms (11 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 000000008fee3000, end 000000008fffffff ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [    0.000000] Linux version 5.10.100-g7a7a3af903 (oe-user@oe-host) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU To2
    [    0.000000] Machine model: Texas Instruments K3 J721E SoC
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled
    
    Welcome to Linux!
    
    [  OK  ] Created slice system-getty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice User and Session Slice.
    [  OK  ] Started Dispatch Password ▒…ts to Console Directory Watch.
    [  OK  ] Started Forward Password R▒…uests to Wall Directory Watch.
    [  OK  ] Reached target Paths.
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Reached target Slices.
    [  OK  ] Reached target Swap.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Reached target RPC Port Mapper.
    [  OK  ] Listening on Process Core Dump Socket.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [  OK  ] Listening on udev Control Socket.
    [  OK  ] Listening on udev Kernel Socket.
             Mounting Huge Pages File System...
             Mounting POSIX Message Queue File System...
             Mounting Kernel Debug File System...
             Mounting Temporary Directory (/tmp)...
             Starting Create list of st▒…odes for the current kernel...
    [  OK  ] Started Start psplash-syst▒…progress communication helper.
             Starting RPC Bind...
             Starting Journal Service...
             Starting Load Kernel Modules...
             Starting Remount Root and Kernel File Systems...
             Starting udev Coldplug all Devices...
    [  OK  ] Started RPC Bind.
    [  OK  ] Started Journal Service.
    [  OK  ] Mounted Huge Pages File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [  OK  ] Mounted Kernel Debug File System.
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Started Create list of sta▒… nodes for the current kernel.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Remount Root and Kernel File Systems.
             Mounting Kernel Configuration File System...
             Starting Flush Journal to Persistent Storage...
             Starting Apply Kernel Variables...
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Mounted Kernel Configuration File System.
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /media/ram...
             Mounting /var/volatile...
             Starting udev Kernel Device Manager...
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Mounted /var/volatile.
             Starting udev Wait for Complete Device Initialization...
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Network Time Synchronization...
             Starting Update UTMP about System Boot/Shutdown...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Set.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Reached target Hardware activated USB gadget.
    [  OK  ] Started udev Wait for Complete Device Initialization.
    [  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Started Daily rotation of log files.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [  OK  ] Started Job spooling tools.
    [  OK  ] Started Periodic Command Scheduler.
    [  OK  ] Started D-Bus System Message Bus.
             Starting set host name as per compatible name...
             Starting IPv6 Packet Filtering Framework...
             Starting IPv4 Packet Filtering Framework...
    [  OK  ] Started irqbalance daemon.
             Starting Reboot and dump vmcore via kexec...
             Starting rc.pvr.service...
             Starting Login Service...
    [  OK  ] Started TEE Supplicant.
    [  OK  ] Started set host name as per compatible name.
    [  OK  ] Started IPv6 Packet Filtering Framework.
    [  OK  ] Started IPv4 Packet Filtering Framework.
    [  OK  ] Started Reboot and dump vmcore via kexec.
    [  OK  ] Started rc.pvr.service.
    [  OK  ] Reached target Network (Pre).
             Starting csp_os.service...
             Starting LSB: System logger...
             Starting Network Service...
    [  OK  ] Started csp_os.service.
    [  OK  ] Started Login Service.
    [  OK  ] Started Network Service.
    [  OK  ] Started LSB: System logger.
             Starting csp_app.service...
             Starting Wait for Network to be Configured...
             Starting Network Name Resolution...
    [  OK  ] Started csp_app.service.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Reached target Network.
    [  OK  ] Reached target Host and Network Name Lookups.
             Starting Avahi mDNS/DNS-SD Stack...
    [  OK  ] Started NFS status monitor for NFSv2/3 locking..
             Starting Simple Network Ma▒…ent Protocol (SNMP) Daemon....
             Starting Permit User Sessions...
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS2.
    [  OK  ] Reached target Login Prompts.
    [  OK  ] Started Simple Network Man▒…ement Protocol (SNMP) Daemon..
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org j7-evm ttyS2
    
    Arago 2021.09 j7-evm ttyS2
    
    j7-evm login:
    U-Boot SPL 2020.01 (Dec 30 2020 - 19:30:25 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
    Reading on-board EEPROM at 0x50 failed 1
    Trying to boot from MMC1
    Loading Environment from MMC... *** Warning - bad CRC, using default environment
    
    init_env from device 17 not supported!
    Starting ATF on ARM64 core...
    
    NOTICE:  BL31: v2.3():07.01.00.004-1-g52c334fc3-dirty
    NOTICE:  BL31: Built : 18:17:14, Nov 19 2020
    
    U-Boot SPL 2020.01 (Dec 30 2020 - 19:30:14 +0800)
    SYSFW ABI: 3.1 (firmware rev 0x0014 '20.8.5--v2020.08b (Terrific Lla')
    Reading on-board EEPROM at 0x50 failed 1
    Trying to boot from MMC1
    
    
    U-Boot 2020.01 (Dec 30 2020 - 19:30:14 +0800)
    
    SoC:   J721E SR2.0
    Model: Texas Instruments K3 J721E SoC
    Reading on-board EEPROM at 0x50 failed 1
    Board: J721EX-PM1-SOM rev E2
    DRAM:  4 GiB
    not found for dev hbmc-mux
    Flash: 0 Bytes
    MMC:   sdhci@4f80000: 0, sdhci@4fb0000: 1
    Loading Environment from MMC... OK
    In:    serial@2800000
    Out:   serial@2800000
    Err:   serial@2800000
    Reading on-board EEPROM at 0x50 failed 1
    Net:   Could not get PHY for ethernet@46000000: addr 0
    phy_connect() failed
    No ethernet found.
    
    Hit any key to stop autoboot:  0
    switch to partitions #0, OK
    mmc0(part 0) is current device
    1490356 bytes read in 6 ms (236.9 MiB/s)
    Load Remote Processor 2 with data@addr=0x82000000 1490356 bytes: Success!
    338860 bytes read in 3 ms (107.7 MiB/s)
    Load Remote Processor 3 with data@addr=0x82000000 338860 bytes: Success!
    1530644 bytes read in 6 ms (243.3 MiB/s)
    Load Remote Processor 6 with data@addr=0x82000000 1530644 bytes: Success!
    1530644 bytes read in 6 ms (243.3 MiB/s)
    Load Remote Processor 7 with data@addr=0x82000000 1530644 bytes: Success!
    13111360 bytes read in 41 ms (305 MiB/s)
    Load Remote Processor 8 with data@addr=0x82000000 13111360 bytes: Success!
    19276288 bytes read in 68 ms (270.3 MiB/s)
    102426 bytes read in 2 ms (48.8 MiB/s)
    11545 bytes read in 1 ms (11 MiB/s)
    ## Flattened Device Tree blob at 88000000
       Booting using the fdt blob at 0x88000000
       Loading Device Tree to 000000008fee3000, end 000000008fffffff ... OK
    
    Starting kernel ...
    
    [    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd080]
    [    0.000000] Linux version 5.10.100-g7a7a3af903 (oe-user@oe-host) (aarch64-none-linux-gnu-gcc (GNU Toolchain for the A-profile Architecture 9.2-2019.12 (arm-9.10)) 9.2.1 20191025, GNU ld (GNU To2
    [    0.000000] Machine model: Texas Instruments K3 J721E SoC
    [    0.000000] earlycon: ns16550a0 at MMIO32 0x0000000002800000 (options '')
    [    0.000000] printk: bootconsole [ns16550a0] enabled
    
    Welcome to Linux!
    
    [  OK  ] Created slice system-getty.slice.
    [  OK  ] Created slice system-serial\x2dgetty.slice.
    [  OK  ] Created slice User and Session Slice.
    [  OK  ] Started Dispatch Password ▒…ts to Console Directory Watch.
    [  OK  ] Started Forward Password R▒…uests to Wall Directory Watch.
    [  OK  ] Reached target Paths.
    [  OK  ] Reached target Remote File Systems.
    [  OK  ] Reached target Slices.
    [  OK  ] Reached target Swap.
    [  OK  ] Listening on RPCbind Server Activation Socket.
    [  OK  ] Reached target RPC Port Mapper.
    [  OK  ] Listening on Process Core Dump Socket.
    [  OK  ] Listening on initctl Compatibility Named Pipe.
    [  OK  ] Listening on Journal Socket (/dev/log).
    [  OK  ] Listening on Journal Socket.
    [  OK  ] Listening on Network Service Netlink Socket.
    [  OK  ] Listening on udev Control Socket.
    [  OK  ] Listening on udev Kernel Socket.
             Mounting Huge Pages File System...
             Mounting POSIX Message Queue File System...
             Mounting Kernel Debug File System...
             Mounting Temporary Directory (/tmp)...
             Starting Create list of st▒…odes for the current kernel...
    [  OK  ] Started Start psplash-syst▒…progress communication helper.
             Starting RPC Bind...
             Starting Journal Service...
             Starting Load Kernel Modules...
             Starting Remount Root and Kernel File Systems...
             Starting udev Coldplug all Devices...
    [  OK  ] Started RPC Bind.
    [  OK  ] Started Journal Service.
    [  OK  ] Mounted Huge Pages File System.
    [  OK  ] Mounted POSIX Message Queue File System.
    [  OK  ] Mounted Kernel Debug File System.
    [  OK  ] Mounted Temporary Directory (/tmp).
    [  OK  ] Started Create list of sta▒… nodes for the current kernel.
    [  OK  ] Started Load Kernel Modules.
    [  OK  ] Started Remount Root and Kernel File Systems.
             Mounting Kernel Configuration File System...
             Starting Flush Journal to Persistent Storage...
             Starting Apply Kernel Variables...
             Starting Create Static Device Nodes in /dev...
    [  OK  ] Mounted Kernel Configuration File System.
    [  OK  ] Started Flush Journal to Persistent Storage.
    [  OK  ] Started Apply Kernel Variables.
    [  OK  ] Started Create Static Device Nodes in /dev.
    [  OK  ] Reached target Local File Systems (Pre).
             Mounting /media/ram...
             Mounting /var/volatile...
             Starting udev Kernel Device Manager...
    [  OK  ] Started udev Coldplug all Devices.
    [  OK  ] Mounted /media/ram.
    [  OK  ] Started udev Kernel Device Manager.
    [  OK  ] Mounted /var/volatile.
             Starting udev Wait for Complete Device Initialization...
             Starting Load/Save Random Seed...
    [  OK  ] Reached target Local File Systems.
             Starting Create Volatile Files and Directories...
    [  OK  ] Started Create Volatile Files and Directories.
             Starting Network Time Synchronization...
             Starting Update UTMP about System Boot/Shutdown...
    [  OK  ] Started Update UTMP about System Boot/Shutdown.
    [  OK  ] Started Network Time Synchronization.
    [  OK  ] Reached target System Time Set.
    [  OK  ] Reached target System Time Synchronized.
    [  OK  ] Started Load/Save Random Seed.
    [  OK  ] Reached target Hardware activated USB gadget.
    [  OK  ] Started udev Wait for Complete Device Initialization.
    [  OK  ] Started Hardware RNG Entropy Gatherer Daemon.
    [  OK  ] Reached target System Initialization.
    [  OK  ] Started Daily rotation of log files.
    [  OK  ] Started Daily Cleanup of Temporary Directories.
    [  OK  ] Reached target Timers.
    [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
    [  OK  ] Listening on D-Bus System Message Bus Socket.
    [  OK  ] Listening on dropbear.socket.
    [  OK  ] Reached target Sockets.
    [  OK  ] Reached target Basic System.
    [  OK  ] Started Job spooling tools.
    [  OK  ] Started Periodic Command Scheduler.
    [  OK  ] Started D-Bus System Message Bus.
             Starting set host name as per compatible name...
             Starting IPv6 Packet Filtering Framework...
             Starting IPv4 Packet Filtering Framework...
    [  OK  ] Started irqbalance daemon.
             Starting Reboot and dump vmcore via kexec...
             Starting rc.pvr.service...
             Starting Login Service...
    [  OK  ] Started TEE Supplicant.
    [  OK  ] Started set host name as per compatible name.
    [  OK  ] Started IPv6 Packet Filtering Framework.
    [  OK  ] Started IPv4 Packet Filtering Framework.
    [  OK  ] Started Reboot and dump vmcore via kexec.
    [  OK  ] Started rc.pvr.service.
    [  OK  ] Reached target Network (Pre).
             Starting csp_os.service...
             Starting LSB: System logger...
             Starting Network Service...
    [  OK  ] Started Login Service.
    [  OK  ] Started csp_os.service.
    [  OK  ] Started LSB: System logger.
    [  OK  ] Started Network Service.
             Starting csp_app.service...
             Starting Wait for Network to be Configured...
             Starting Network Name Resolution...
    [  OK  ] Started csp_app.service.
    [  OK  ] Started Network Name Resolution.
    [  OK  ] Reached target Network.
    [  OK  ] Reached target Host and Network Name Lookups.
             Starting Avahi mDNS/DNS-SD Stack...
    [  OK  ] Started NFS status monitor for NFSv2/3 locking..
             Starting Simple Network Ma▒…ent Protocol (SNMP) Daemon....
             Starting Permit User Sessions...
    [  OK  ] Started Permit User Sessions.
    [  OK  ] Started Avahi mDNS/DNS-SD Stack.
    [  OK  ] Started Getty on tty1.
    [  OK  ] Started Serial Getty on ttyS2.
    [  OK  ] Reached target Login Prompts.
    [  OK  ] Started Simple Network Man▒…ement Protocol (SNMP) Daemon..
    
     _____                    _____           _         _
    |  _  |___ ___ ___ ___   |  _  |___ ___  |_|___ ___| |_
    |     |  _| .'| . | . |  |   __|  _| . | | | -_|  _|  _|
    |__|__|_| |__,|_  |___|  |__|  |_| |___|_| |___|___|_|
                  |___|                    |___|
    
    Arago Project http://arago-project.org j7-evm ttyS2
    
    Arago 2021.09 j7-evm ttyS2
    
    j7-evm login: root
    Last login: Wed Mar 23 20:50:38 UTC 2022 on ttyS2
    root@j7-evm:~#
    root@j7-evm:~#
    root@j7-evm:~# cd rqyang/
    root@j7-evm:~/rqyang# ./vlan.sh
    root@j7-evm:~/rqyang# ifconfig
    eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet6 fe80::72ff:76ff:fe1d:92c1  prefixlen 64  scopeid 0x20<link>
            ether 70:ff:76:1d:92:c1  txqueuelen 1000  (Ethernet)
            RX packets 554  bytes 132590 (129.4 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 55  bytes 9478 (9.2 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    eth1.100: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet6 fe80::72ff:76ff:fe1d:92c1  prefixlen 64  scopeid 0x20<link>
            ether 70:ff:76:1d:92:c1  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 26  bytes 4460 (4.3 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536  metric 1
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 82  bytes 6220 (6.0 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 82  bytes 6220 (6.0 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    
    :51:a9:fc:f4:b5 -l 80 ./plget -i eth1.100 -m pkt-gen -p 3 -t ptpl2 -n 1024 -a 50:
    SIOCGHWTSTAMP: tx_type was 0; rx_filter was 0
    SIOCSHWTSTAMP: disabling h/w time stamping not possible
    setting ts_flags: 0x50
    new ts_flags: 0x50
    
    frame size: 80
    number of packets: 1024
    
    :51:a9:fc:f4:b5 -l 80 ./plget -i eth1.100 -m pkt-gen -p 3 -t ptpl2 -n 1024 -a 50:
    SIOCGHWTSTAMP: tx_type was 0; rx_filter was 0
    SIOCSHWTSTAMP: disabling h/w time stamping not possible
    setting ts_flags: 0x50
    new ts_flags: 0x50
    
    frame size: 80
    number of packets: 1024
    
    

    VH

    script

    #!/bin/sh
    ifconfig eth4 down
    ifconfig eth1 down
    ifconfig eth2 down
    ifconfig eth3 down
    ethtool -L eth2 tx 4
    ethtool -L eth3 tx 4
    ethtool --set-priv-flags eth2 p0-rx-ptype-rrobin off
    ethtool --set-priv-flags eth3 p0-rx-ptype-rrobin off
    
    devlink dev param set platform/c000000.ethernet name switch_mode value true cmode runtime
    ip link add name br0 type bridge
    ip link set dev br0 type bridge ageing_time 1000
    ip link set dev eth2 up
    ip link set dev eth3 up
    sleep 10
    ip link set dev eth2 master br0
    ip link set dev eth3 master br0
    ip link set dev br0 up
    
    sleep 2
    ip link set dev br0 type bridge vlan_filtering 1
    bridge vlan add dev br0 vid 1 pvid untagged self
    bridge vlan add dev eth2 vid 100 master
    bridge vlan add dev eth3 vid 100 master
    
    #sync system time to CPSW CPTS
    phc2sys -s CLOCK_REALTIME -c eth0 -m -O 0 > /dev/null &
    
    #calc base_time as now + 2min, give it time to sync
    base=$(((`date +%s` + 10)*1000000000))
    
    tc qdisc replace dev eth2 parent root handle 100 taprio \
        num_tc 3 \
        map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \
        queues 1@0 1@1 1@2 \
        base-time $base \
        sched-entry S 4 10000 \
        sched-entry S 2 30000 \
        sched-entry S 1 60000 \
        flags 2
    tc qdisc replace dev eth3 parent root handle 100 taprio \
        num_tc 3 \
        map 0 0 1 2 0 0 0 0 0 0 0 0 0 0 0 0 \
        queues 1@0 1@1 1@2 \
        base-time $base \
        sched-entry S 4 10000 \
        sched-entry S 2 30000 \
        sched-entry S 1 60000 \
        flags 2
    
    

     log

    vh_log.txt

    vm recv

    script

    #!/bin/sh
    
    ip link add link eth0 name eth0.100 type vlan id 100
    
    while sleep 1; do ./plget -m rx-lat -f ipgap -n 128 -i eth0.100 -t ptpl2 -f hwts; done
    

    log

    vm_recv_log.txt

    No corresponding message is received on the receiving end!

     

  • Hi,

    In the TDA4VH script, can you add the command "bridge vlan add dev br0 vid 100 pvid tagged self" at line 26 (after "bridge vlan add dev eth3 vid 100 master")

    This will add the br0 interface to vlan group 100. Other wise the bridge will drop the vlan 100 packets which must be happening now.

    Regards,
    Tanmay