目前在调试PA的emacexample,已经调通了,可以向PC发送和接收UDP数据包。但是例程中PA的配置是中添加了mac地址,IP地址和port的条目。
因为我后期想添加协议栈,所以我想请问如何添加条目,可以让其接收到PC发送的arp请求包?
Allen35065:
In response to your ARP question. Assuming that you want to forward all ARP requests (regardless of the source MAC ADDR) to a unique queue you only need to call the Pa_addMac function with the struct below ,ethertype set to 0x0806 (for the ARP ethertype). The rest is don't care.
typedef struct {
paMacAddr_t src; //Source MAC address
paMacAddr_t dst; //destination MAC addr
unit16_t vlan; //VLAN tage VID field, 12 lsbs
uint16_t ethertype; //ethertype field
unit32_t mplsTag;
uint16_t inport; //input EMAC port number as specfied by the EMAC port
} paEthInfo_t ;
So, for the matchRoute you can use any flowID you want, you just need to set the queue to the unique one you want the packets to be forwarded to. If you have a separate FDQ or pool of descriptors, you can just set the flowID to the one desired. This will forward all the packets with the ARP ethertype (0x0806) to the dest queue you specified using the flow you want.