+notes; Try shifting the cast into the parser

This commit is contained in:
Nico Schottelius 2019-03-06 13:12:06 +01:00
parent 0bd12260c6
commit 0ca0b94b1c
4 changed files with 22 additions and 7 deletions

View file

@ -67,6 +67,21 @@
| | - P4 checksum_with_payload | |
| | - Reading scapy / inet6 | |
| | - Further checksum tests -> required everywhere in IPv6 | |
| | - (partial) NDP working in controller | |
| | - icmp6 echo request working in controller | |
| | - Hosts can ping6 the switch | |
| | - Ran into P4 casting bug: https://github.com/p4lang/p4c/issues/1765 | |
| | | |
| | Next target: | |
| | - Focus on enabling the "Internet" with ICMP6 translation | |
| | | |
| | Next steps: | |
| | - Investigate again into checksumming with payload in P4 | |
| | - Answering icmp6 echo request *in* in the switch | |
| | - Translate icmp6 to icmp | |
| | - Translate icmp to icmp6 | |
| | | |
| | | |
| | | |
| | | |
| 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | |
@ -113,10 +128,10 @@
**** DONE Parse icmp
**** DONE Parse icmpv6
**** DONE Add (static) egress configuration
**** TODO Calculate ICMP6 checksums
**** DONE Calculate ICMP6 checksums in controller
***** Need to include the payload!?!!
**** TODO Implement minimal neighbor discovery
***** TODO For the switch
**** DONE Implement minimal neighbor discovery in controller
***** DONE For the switch
****** DONE Register IPv6 address in table
****** DONE Parse ICMPv6 up to neighbor solicitation -> no: checksum problem
****** DONE Use NDP (Neighbor Solicitation (NDP) , Neighbor Advertisement (NDP)) -> no: controller
@ -165,7 +180,7 @@ multicast address of the target address."
******* associate the "node" with the multicast group ID
***** If destination is within ff02::1:ff00:0/104, multicast
**** TODO Make switch answer icmp6 echo request for
**** DONE Make switch answer icmp6 echo request for
**** TODO Make switch answer icmp echo request for
**** TODO Add default route for v6 and v4 hosts
**** TODO Translate icmp <-> icmp6

View file

@ -21,13 +21,11 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
control MyComputeChecksum(inout headers hdr, inout metadata meta) {
apply {
bit<32> icmp6_len = (bit<32>) hdr.ipv6.payload_length;
update_checksum_with_payload(meta.calc_icmp6_checksum,
{
hdr.ipv6.src_addr, /* 128 */
hdr.ipv6.dst_addr, /* 128 */
icmp6_len, /* 32 */
meta.cast_length, /* 32 */
24w0, /* 24 0's */
PROTO_ICMP6 /* 8 */
},

View file

@ -133,6 +133,7 @@ struct metadata {
port_t ingress_port;
task_t task;
bit<16> tcp_length;
bit<32> cast_length;
bool calc_icmp6_checksum;
}

View file

@ -37,6 +37,7 @@ parser MyParser(packet_in packet,
state ipv6 {
packet.extract(hdr.ipv6);
meta.tcp_length = hdr.ipv6.payload_length;
meta.cast_length = (<bit32>) hdr.ipv6.payload_length;
transition select(hdr.ipv6.next_header){
PROTO_TCP: tcp;