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.

c6671 dual port ethernet multicast problem

Hi, all.

I am working on c6671 now.

But I have a question. 

Recently I solve the problem concerned with dual port ethernet.

I just check ping, and udp packet test.

It works fine, but, multicast doesn't work now, just for eth0 works.

But eth1 doesn't.

Please help me who have had like my problem.

Thanks, Ryan.

  • I found another clue.

    which is even though I sent the multicast message to eth1, trigering just eth0 isr now.

    So, I can I solve this problem?

    And, one thing more.

    Here is I added for multicast join.

    Please check this code for me.

    ----------------------------------------------------------------------------------------------------------------------------

    static int Emacioctl (NETIF_DEVICE* ptr_net_device, uint cmd, void* pBuf, uint size)
    {

    EMAC_DATA* ptr_pvt_data;

    switch(cmd)
    {
    case NIMU_ADD_MULTICAST_ADDRESS:
    /*
    caller: ptr_device->ioctl (ptr_device, NIMU_ADD_MULTICAST_ADDRESS, (void *)&bMacAddr[0], 6) (ndk_2_21_01_38/packages/ti/ndk/stack/igmp/igmp.c)
    */
    {
    paEthInfo_t ethInfo = { { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, /* Src mac = dont care */
    { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15 }, /* Default Dest mac */
    0, /* vlan = dont care */
    0, /* ignore ether type */
    0 /* MPLS tag = don't care */
    };
    paRouteInfo_t routeInfo = { pa_DEST_HOST, /* Route a match to the host */
    0, /* Flow ID 0 */
    0, /* Destination queue */
    2, /* Multi route disabled */
    0xaaaaaaaa, /* SwInfo 0 */
    0, /* SwInfo 1 is dont care */
    0, /* customType = pa_CUSTOM_TYPE_NONE */ \
    0, /* customIndex: not used */ \
    0, /* pkyType: for SRIO only */ \
    NULL /* No commands */
    };

    /* Get the pointer to the private data */
    ptr_pvt_data = (EMAC_DATA *)ptr_net_device->pvt_data;


    memcpy (&ethInfo.dst[0], pBuf, size);

    if( ptr_pvt_data->pdi.PhysIdx == 0) {
    routeInfo.flowId = Cppi_getFlowId(gRxFlowHnd[0]);
    platform_write (" routeInfo.flowId 0 : %d \n", routeInfo.flowId);
    //inc++;
    // ethInfo.dst[6] = ethInfo.dst[6] + inc;
    }

    if( ptr_pvt_data->pdi.PhysIdx == 1) {
    routeInfo.flowId = Cppi_getFlowId(gRxFlowHnd[1]);
    platform_write (" routeInfo.flowId 1 : %d \n", routeInfo.flowId);
    //inc++;
    //ethInfo.dst[5] = ethInfo.dst[5] + 2;
    }

    platform_write (" ==============mmc %x:%x:%x:%x:%x \n", ethInfo.dst[0], ethInfo.dst[1], ethInfo.dst[2], ethInfo.dst[3], ethInfo.dst[4], ethInfo.dst[5]);
    /* Set up the MAC Address LUT for Broadcast */
    if (Add_MACAddress (&ethInfo, &routeInfo) != 0)
    {
    platform_write ("Add_MACAddress failed \n");
    //return -1;
    }
    platform_write ("Add_MACAddress success\n");

    }
    break;

    //Todo
    case NIMU_DEL_MULTICAST_ADDRESS:

    break;
    default:
    break;
    }

    return 0;
    }

  • Hi,

    I eventually success porting dual port ethernet a week ago.

    Becuase you guys helped me a lot like above.

    If anyone need my help to use dual port gbe, I can help you.

    But, I met another problem when I test the network founction.

    That is when I sent multicaste messages every 1ms, It becomes back out. i mean die.

    But every 100ms is OK with my borad.

    Our spec of this :

    1. get multicast messages every 1ms from linux server (40Byte)

    2. assemble the data around 126Byte and send back to linux server.

    I don't know what do I have to do now. Just I am doing changing all of variable which I think concerned with this problem.

    But as I mentioned it doesn't work.

    Please help me.

    Thanks, Ryan.

  • I make progress here a little bit.

    Actually  it's not a progress, :) just I check one thing more.

    That is just eth0 works fine but eth1 doesn't work with 1ms multicast receive but it works with 100ms muticast recevie.

    Just I think It doesn't work with accumulator when it set up in Setup_Rx in numu_eth.c.

    Anybody have any ideas? Please tell me someone who have any idea about this.

    Thanks, Ryan