Commit bb632219 authored by Miguel Jimenez Lopez's avatar Miguel Jimenez Lopez

pfilter-builder: ARP & ICMP traffics should be re-directed to the external fabric interface

to reach external CPU in the WR-NIC architecture.
parent 42bed9b8
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
the internal fabric. The frame, in the fabric, is prefixed with the internal fabric. The frame, in the fabric, is prefixed with
a status word that includes the class bits. a status word that includes the class bits.
The CPU is expected to receive PTP, ICMP, ARP and DHCP replies (so The CPU is expected to receive PTP, ICMP and DHCP replies (so
local "bootpc" port). local "bootpc" port).
The fabric should receive Etherbone (i.e. UDP port 0xebd0), the The fabric should receive Etherbone (i.e. UDP port 0xebd0), the
...@@ -413,9 +413,9 @@ void pfilter_init_novlan(char *fname) ...@@ -413,9 +413,9 @@ void pfilter_init_novlan(char *fname)
pfilter_cmp(11, 0x0011, 0x00ff, MOV, FRAME_UDP); pfilter_cmp(11, 0x0011, 0x00ff, MOV, FRAME_UDP);
pfilter_logic2(FRAME_UDP, FRAME_UDP, AND, FRAME_IP_OK); pfilter_logic2(FRAME_UDP, FRAME_UDP, AND, FRAME_IP_OK);
/* For CPU: arp or icmp unicast or ptp (or latency) */ /* For CPU: icmp unicast or ptp (or latency) */
pfilter_logic2(FRAME_FOR_CPU, FRAME_TYPE_ARP, OR, FRAME_TYPE_PTP2); /* Now, ARP & ICMP traffic are bypassed to the external fabric (NIC) */
pfilter_logic3(FRAME_FOR_CPU, FRAME_IP_OK, AND, FRAME_ICMP, OR, FRAME_FOR_CPU); pfilter_logic2(FRAME_FOR_CPU, FRAME_TYPE_PTP2, MOV, R_ZERO);
/* Now look in UDP ports: at offset 18 (14 + 20 + 8 = 36) */ /* Now look in UDP ports: at offset 18 (14 + 20 + 8 = 36) */
pfilter_cmp(18, 0x0000, 0xff00, MOV, PORT_UDP_HOST); /* ports 0-255 */ pfilter_cmp(18, 0x0000, 0xff00, MOV, PORT_UDP_HOST); /* ports 0-255 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment