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.

Vlan driver issue

Dear Champs,

We are facing following problem with TI Sitara starter kit board on Linux SDK:

 

Problem: VLAN enabled broadcast message is not coming on SITARA board kernel version 3.2. It is dropped at lower layer.

 

We have tried to enable the VLAN in Network driver in kernel image provided with SITARA evaluation board. Still VLAN enable broadcast message is not coming at application layer. Please let me know how can we get the broadcast message at application layer (Layer 5).

 

Looking for your kind response ASAP.

 

Thanks and Regards,

Feroz

  • i am facing the same problem,iwant to add an vlan entry(multicast),below is my code:
    static void
    cpswif_port_to_host_vlan_cfg(struct cpswinst *cpswinst, u32_t port_num,
    u8_t *eth_addr)
    {
    u32_t cnt, idx;
    u32_t ale_v_entry[ALE_ENTRY_NUM_WORDS] = {0, 0, 0};
    u32_t ale_vu_entry[ALE_ENTRY_NUM_WORDS] = {0, 0, 0};

    //liujiqing 2015 0525
    u32_t vlanid,pmask,super,mcast_st;
    u8_t vlaneth_addr[6] = {0x01,0x0e,0xcf,0x00,0x00,0x00};

    vlanid = 0;
    pmask = 1;
    super = 1;
    mcast_st = 1;
    //liujiqing 2015 0525
    idx = cpswif_ale_entry_match_free(cpswinst);

    if(MAX_ALE_ENTRIES == idx) {
    return;
    }

    /* Set up the VLAN Entry */
    *(((u8_t *)ale_v_entry) + ALE_VLAN_ENTRY_MEMBER_LIST) =
    HOST_PORT_MASK | SLAVE_PORT_MASK(port_num);

    /**
    * Set the bit fields for entry type and VLAN ID. Set the port
    * number as VLAN ID. So only lsb 2 bits of VLAN_ID field will be used.
    */
    *(((u8_t *)ale_v_entry) + ALE_VLAN_ENTRY_ID_BIT0_BIT7) = port_num;
    *(((u8_t *)ale_v_entry) + ALE_VLAN_ENTRY_TYPE_ID_BIT8_BIT11) = ALE_ENTRY_VLAN;

    *(((u8_t *)ale_v_entry) + ALE_VLAN_ENTRY_FRC_UNTAG_EGR) =
    HOST_PORT_MASK | SLAVE_PORT_MASK(port_num);

    /* Set the VLAN entry in the ALE table */
    CPSWALETableEntrySet(cpswinst->ale_base, idx, ale_v_entry);

    idx = cpswif_ale_entry_match_free(cpswinst);

    if(MAX_ALE_ENTRIES == idx) {
    return;
    }

    /* Set up the VLAN/Unicast Entry */
    for(cnt = 0; cnt < ETHARP_HWADDR_LEN; cnt++) {
    *(((u8_t *)ale_vu_entry) + cnt) = eth_addr[ETHARP_HWADDR_LEN - cnt -1];
    }

    *(((u8_t *)ale_vu_entry) + ALE_VLANUCAST_ENTRY_TYPE_ID_BIT8_BIT11) =
    ALE_ENTRY_VLANUCAST;
    *(((u8_t *)ale_vu_entry) + ALE_VLANUCAST_ENTRY_ID_BIT0_BIT7) = port_num;

    /* Set the VLAN/Unicast entry in the ALE table */
    CPSWALETableEntrySet(cpswinst->ale_base, idx, ale_vu_entry);

    //liujiqing 2015 0525
    cpswif_ale_vlan_add_mcast(cpswinst,vlanid,pmask,vlaneth_addr,super,mcast_st);
    }

    but i still can't receive this pack:
    01 0e cf 00 00 00 fc aa 14 11 34 c8 81 00 00 00
    88 92 fe fe 05 00 01 00 00 01 01 00 00 04 ff ff
    00 00

    is it because this package is less then 64 bytes,how can i fix this problem。
    thanks