使用开发板,把GE改了一下与PC通信,在ale设置成 ALE_BYPASS中断能收到所有包,
设置成ALE_RECEIVE_ALL时中断只能收到broadcast包,其他包收不到,但是RXGOODFRAMES一直在增加
请问怎么设置才能只收Dest_MAC_address和Source_MAC_address地址匹配的数据包
或者收到的其他包发送到哪去了
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.
需要配置ALE TABLE ENTRY,将MAC地址和PORT映射起来,具体请参考EMAC userguide 2.3.6 Address Lookup Engine (ALE) Submodule Architecture 章节
void ALE_Entries_Init(ALE_Test_Mode ALE_test_mode)
{
int i;
if(ALE_BYPASS==ALE_test_mode)
return;
for(i=0; i<GE_NUM_ETHERNET_PORT; i++)
{
ALE_entries[i].macAddress[0]= (_hill(Dest_MAC_address[i])>>8)&0xFF;
ALE_entries[i].macAddress[1]= (_hill(Dest_MAC_address[i])>>0)&0xFF;
ALE_entries[i].macAddress[2]= (_loll(Dest_MAC_address[i])>>24)&0xFF;
ALE_entries[i].macAddress[3]= (_loll(Dest_MAC_address[i])>>16)&0xFF;
ALE_entries[i].macAddress[4]= (_loll(Dest_MAC_address[i])>>8)&0xFF;
ALE_entries[i].macAddress[5]= (_loll(Dest_MAC_address[i])>>0)&0xFF;
ALE_entries[i].portNumber= 0; //all packect are received to host port (0)
ALE_entries[i].ucastType = ALE_UCASTTYPE_UCAST_NOAGE;
ALE_entries[i].secureEnable = 0;
ALE_entries[i].blockEnable = 0;
}
ale_cfg.unicastEntries= ALE_entries;
ale_cfg.num_unicastEntries= GE_NUM_ETHERNET_PORT;
ge_cfg.ale_cfg= &ale_cfg;
}
就是和例子设置一样的,不对吗,还要怎么设置,
你说的那个是不是在Gigabit Ethernet (GbE) Switch Subsystem上面,我看了寄存器,和设置的一样
那你看下HOST PORT的统计是什么状态?前面您说的在增加指的是SGMII port的?
那你检查下host port(port 0)端口 统计模块 收发是否正常
那另外一个SGMII 口呢?此时EMAC有没有向网络发PAUSE帧?