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: TDA4 组播问题

Part Number: TDA4VM


Dear Semon

     如电话沟通,问题描述:

在cmd list中添加组播,测试发现增加的mac反而不通,如增加MAC:01:00:5e:7f:ff:01,测试中发现, 地址239.255.255.1不通。

"{\"cmd\":\"8\",\"addr\": \"01:00:5e:7f:ff:01\",\"vlanId\": 3,\"vlanMemberMask\": 511,\"isEnable\":1}",

如果测试:239.255.255.2 或者239.255.254.1等不在列表的地址,是通的。

                移除掉此239.255.255.1 cmd list,也是通的。

#define VX_CPSW_CMD_STRLIST_LEN    6     // NOTE: UPDATE VX_CPSW_CMD_STRLIST_LEN as you want !!!

char * vx_cpsw_cmd_strlist [] = {
    "{\"cmd\":\"8\",\"addr\": \"01:00:5e:7f:ff:01\",\"vlanId\": 3,\"vlanMemberMask\": 511,\"isEnable\":1}",
    "{\"cmd\":\"8\",\"addr\": \"01:00:5e:7f:03:01\",\"vlanId\": 3,\"vlanMemberMask\": 511,\"isEnable\":1}",
    "{\"cmd\":\"6\", \"vlanId\":3, \"vlanMemberMask\":511, \"isEnable\":1}",
    "{\"cmd\":\"8\",\"addr\": \"01:00:5e:7f:00:01\",\"vlanId\": 0,\"vlanMemberMask\": 511,\"isEnable\":1}", // 239.255.0.1
    "{\"cmd\":\"8\",\"addr\": \"01:00:5e:7f:01:01\",\"vlanId\": 0,\"vlanMemberMask\": 511,\"isEnable\":1}", // 239.255.1.1
    "{\"cmd\":\"8\",\"addr\": \"01:00:5e:00:00:16\",\"vlanId\": 0,\"vlanMemberMask\": 511,\"isEnable\":1}", // 224.0.0.22
    NULL    // NOTE: UPDATE VX_CPSW_CMD_STRLIST_LEN as you want !!!
};
static void EthApp_initDataCfg(void *a0,
                            void *a1)
{
    appLogPrintf("Init configuration for CPSW ...\n");
    //TaskP_sleepInMsecs(3000);
    EnetCfgServer_initDataCfg(vx_cpsw_cmd_strlist, VX_CPSW_CMD_STRLIST_LEN);
}

Thanks!

  • Hi,

    The question is not clear. Could you please describe the issue, SDK version & OS to begin with.

    Thanks,
    Keerthy

  • Hi Keerthy

        SDK 8.4,
        MCU2_0 with ethfw.
         AOS(like linux) in A72.

        In A72, we need multicast with address 239.255.255.1 and vlan, so we use the codes above in MCU2_0 (patches from Ti).

    But in latest test, we found that the multicast works ok without the Muticast cmd above,  it can't work with the codes.

    For example, the multicast with 239.255.255.1 can't work with the code below.

    {\"cmd\":\"8\",\"addr\": \"01:00:5e:7f:ff:01\",\"vlanId\": 3,\"vlanMemberMask\": 511,\"isEnable\":1}"

    the code seems enable multicast 239.255.255.1, but why it disable 239.255.255.1 indeed.

    thanks!

  • Hi Ning,

    If you want to add Multicast addresses, you can using the below command.

    # ip maddr add <MAC ADDR> dev eth1 
    Ex: root@j7-evm:~# ip maddr add 13:02:03:04:05:06 dev eth1

    For VLAN Multicast, we need to update ethfw for VLAN-ID ALE entries. Please refer to below FAQ for adding VLAN (we can't add VLAN at run time similar to multicast address).
    https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1011237/faq-tda4vm-how-to-configure-cpsw-5g-9g-ale

    Best Regards,
    Sudheer

  • Hi Li Ning

         after add VLAN 3 to system with following command:

    ,{"cmd":"add_vlanentry",

    "vlanId":3,

    "vlanMemberMask":31,

    "isEnable":1

    }

    then add multicast group at A72 with following Linux cmd, send multicast frame with DST 01:00:5e:7f:ff:01 with VLAN 3, packet can be captured on A72, see following log

    root@j7200-evm:~# ip maddr add 01:00:5e:7f:ff:01 dev eth1

    ======================================================
    root@j7200-evm:~# cd /home/
    root@j7200-evm:/home# ls
    root@j7200-evm:/home# ./cpsw_all_reg_print
    ---------------------------------------------
    -------CPSWnG ALE TABLE----------------------
    ---------------------------------------------
    ---------------------------------------------
     Entry 0 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 300
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 511
    VLAN FWD Untagged Egress = 240
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 511
    ---------------------------------------------
     Entry 1 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 0
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 19
    VLAN FWD Untagged Egress = 323
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 19
    VLAN_MEMBER_LIST  = 19
    ---------------------------------------------
     Entry 2 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 1
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 13
    VLAN FWD Untagged Egress = 221
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 13
    ---------------------------------------------
     Entry 3 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1f
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = ffff ffffffff
    ---------------------------------------------
     Entry 4 - Unicast
    ---------------------------------------------
    TRUNK            = 0
    PORT_NUMBER      = 0
    BLOCK            = 0
    SECURE           = 1
    TOUCH            = 0
    AGEABLE          = 0
    ENTRY_TYPE       = 1
    UNICAST_ADDR     = 70ff 761d92c3
    ---------------------------------------------
     Entry 6 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 180 c200000e
    ---------------------------------------------
     Entry 7 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 11b 19000000
    ---------------------------------------------
     Entry 8 - Multicast
    ---------------------------------------------
    PORT_MASK        = d
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 180 c2000021
    ---------------------------------------------
     Entry 9 - Unicast
    ---------------------------------------------
    TRUNK            = 0
    PORT_NUMBER      = 0
    BLOCK            = 0
    SECURE           = 1
    TOUCH            = 0
    AGEABLE          = 0
    ENTRY_TYPE       = 1
    UNICAST_ADDR     = 70ff 761d92c2
    ---------------------------------------------
     Entry 10 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 70
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 5
    VLAN FWD Untagged Egress = 80
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 5
    VLAN_MEMBER_LIST  = 5
    ---------------------------------------------
     Entry 11 - Unicast
    ---------------------------------------------
    TRUNK            = 0
    PORT_NUMBER      = 0
    BLOCK            = 0
    SECURE           = 0
    TOUCH            = 0
    AGEABLE          = 0
    ENTRY_TYPE       = 1
    UNICAST_ADDR     = 70ff 761d92c1
    ---------------------------------------------
     Entry 12 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 3333 1
    ---------------------------------------------
     Entry 13 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 100 5e000001
    ---------------------------------------------
     Entry 14 - Multicast
    ---------------------------------------------
    PORT_MASK        = d
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 3333 ff1d92c1
    ---------------------------------------------
     Entry 15 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 180 c2000000
    ---------------------------------------------
     Entry 16 - Multicast
    ---------------------------------------------
    PORT_MASK        = d
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 100 5e7fff01
    ---------------------------------------------
     Entry 17 - Multicast
    ---------------------------------------------
    PORT_MASK        = 1
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 180 c2000003
    ---------------------------------------------
     Entry 18 - Multicast
    ---------------------------------------------
    PORT_MASK        = d
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 3333 fb
    ---------------------------------------------
     Entry 19 - Multicast
    ---------------------------------------------
    PORT_MASK        = d
    SUPER            = 0
    MCAST IGNORE BITS= 0
    MCAST_FWD_STATE  = 0
    ENTRY_TYPE       = 1
    MULTICAST_ADDR   = 3333 10003
    ---------------------------------------------
     Entry 20 - VLAN INNER
    ---------------------------------------------
    ENTRY_TYPE        = 2
    IVLAN_ID           = 3
    NO FRAG           = 0
    REG_MCAST_FLOOD   = 31
    VLAN FWD Untagged Egress = 496
    LMT NEXT HDR      = 0
    UNREG_MCAST_FLOOD = 0
    VLAN_MEMBER_LIST  = 31
    ---------------------------------------------
     Entry 21 - Unicast
    ---------------------------------------------
    TRUNK            = 0
    PORT_NUMBER      = 3
    BLOCK            = 0
    SECURE           = 0
    TOUCH            = 0
    AGEABLE          = 1
    ENTRY_TYPE       = 1
    UNICAST_ADDR     = c03e ba1030e2
    Completed analysis of 512 ALE entries
    root@j7200-evm:/home#
    root@j7200-evm:/home# ifconfig
    docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
            inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
            ether 02:42:01:73:14:3b  txqueuelen 0  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500  metric 1
            ether f4:84:4c:f8:68:43  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 0  bytes 0 (0.0 B)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    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 20  bytes 2765 (2.7 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 63  bytes 11468 (11.1 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500  metric 1
            inet6 fe80::72ff:76ff:fe1d:92c2  prefixlen 64  scopeid 0x20<link>
            ether 70:ff:76:1d:92:c2  txqueuelen 1000  (Ethernet)
            RX packets 0  bytes 0 (0.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 31  bytes 5359 (5.2 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

    eth1.3: 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 33  bytes 6047 (5.9 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

    root@j7200-evm:/home# tcpdump -i eth1 -xx
    [  336.079989] device eth1 entered promiscuous mode
    tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
    listening on eth1, link-type EN10MB (Ethernet), capture size 262144 bytes
    14:22:56.589111 IP 200.1.1.10.234 > 224.10.10.10.444: UDP, length 0
            0x0000:  0100 5e7f ff01 28f1 0e30 c7fb 8100 0003
            0x0010:  0800 4500 001c 1234 4000 ff11 b67c c801
            0x0020:  010a e00a 0a0a 00ea 01bc 0008 4a18 0000
            0x0030:  0000 0000 0000 0000 0000 0000 0000 0000
    14:22:57.652981 IP 200.1.1.10.234 > 224.10.10.10.444: UDP, length 0
            0x0000:  0100 5e7f ff01 28f1 0e30 c7fb 8100 0003
            0x0010:  0800 4500 001c 1234 4000 ff11 b67c c801
            0x0020:  010a e00a 0a0a 00ea 01bc 0008 4a18 0000
            0x0030:  0000 0000 0000 0000 0000 0000 0000 0000
    14:22:59.204648 IP 200.1.1.10.234 > 224.10.10.10.444: UDP, length 0
            0x0000:  0100 5e7f ff01 28f1 0e30 c7fb 8100 0003
            0x0010:  0800 4500 001c 1234 4000 ff11 b67c c801
            0x0020:  010a e00a 0a0a 00ea 01bc 0008 4a18 0000
            0x0030:  0000 0000 0000 0000 0000 0000 0000 0000
    14:22:59.765035 IP 200.1.1.10.234 > 224.10.10.10.444: UDP, length 0
            0x0000:  0100 5e7f ff01 28f1 0e30 c7fb 8100 0003
            0x0010:  0800 4500 001c 1234 4000 ff11 b67c c801
            0x0020:  010a e00a 0a0a 00ea 01bc 0008 4a18 0000
            0x0030:  0000 0000 0000 0000 0000 0000 0000 0000