Re-re-re-try to do checkumming based on a meta field
This commit is contained in:
parent
f7fc8ef412
commit
591175db7a
3 changed files with 28 additions and 15 deletions
|
@ -51,6 +51,7 @@
|
|||
| | * Summary on Slack | |
|
||||
| | * 1130 meeting now | |
|
||||
| | | |
|
||||
| | | |
|
||||
| 2019-03-01 | Feature list / priority list / roadmap clear | x |
|
||||
| | Joining P4 Slack | |
|
||||
| | | |
|
||||
|
@ -86,7 +87,7 @@
|
|||
| | - Multiple branches: | |
|
||||
| | * Work on checksumming / p4 | |
|
||||
| | * Work on metadata passing / p4 | |
|
||||
| | * Work on static mapping (w/ incorrect checksum) | |
|
||||
| | * Work on static mapping (w/ incorrect checksum) 1:1 | |
|
||||
| | | |
|
||||
| | | |
|
||||
| 2019-03-08 | NAT46 1:1 table ICMP, ICMPv6 working | |
|
||||
|
@ -198,6 +199,10 @@ p4@ubuntu:~/master-thesis$
|
|||
**** TODO Translate ipv6 --> ipv4 with a (freely programmable) prefix
|
||||
***** TODO Insert prefix into switch
|
||||
***** TODO Implement the calculation
|
||||
***** TODO Sketch the flow for session handling for icmp6 w/o packet loss
|
||||
- switch receives icmp6 packet for known prefix
|
||||
- controller needs to create session entry (?)
|
||||
|
||||
**** TODO Translate icmp <-> icmp6
|
||||
**** TODO Create table entry for mapping v4->v6 [net]
|
||||
**** TODO Create table entry for mapping v6->v4 [net]
|
||||
|
@ -539,8 +544,6 @@ performance, security and adaptivity of the solutions.
|
|||
- Milestone 1: Stateless NAT64/NAT46 translations in P4
|
||||
- Milestone 2: Stateful (dynamic) NAT64/NAT46 translations
|
||||
- Milestone 3: Hardware adaption
|
||||
|
||||
|
||||
** Original ideas
|
||||
Proposal 1: Automating NAT64 with P4
|
||||
|
||||
|
|
|
@ -21,18 +21,18 @@ control MyVerifyChecksum(inout headers hdr, inout metadata meta) {
|
|||
|
||||
control MyComputeChecksum(inout headers hdr, inout metadata meta) {
|
||||
apply {
|
||||
// GRRRRR update_checksum_with_payload(meta.do_cksum,
|
||||
// GRRRRR {
|
||||
// GRRRRR hdr.ipv6.src_addr, /* 128 */
|
||||
// GRRRRR hdr.ipv6.dst_addr, /* 128 */
|
||||
// GRRRRR 16w0, /* 16 try implicit cast */
|
||||
// GRRRRR hdr.ipv6.payload_length, /* 16 */
|
||||
// GRRRRR 24w0, /* 24 0's */
|
||||
// GRRRRR PROTO_ICMP6 /* 8 */
|
||||
// GRRRRR },
|
||||
// GRRRRR hdr.icmp6.checksum,
|
||||
// GRRRRR HashAlgorithm.csum16
|
||||
// GRRRRR );
|
||||
update_checksum_with_payload(meta.do_cksum == 1,
|
||||
{
|
||||
hdr.ipv6.src_addr, /* 128 */
|
||||
hdr.ipv6.dst_addr, /* 128 */
|
||||
16w0, /* 16 try implicit cast */
|
||||
hdr.ipv6.payload_length, /* 16 */
|
||||
24w0, /* 24 0's */
|
||||
PROTO_ICMP6 /* 8 */
|
||||
},
|
||||
hdr.icmp6.checksum,
|
||||
HashAlgorithm.csum16
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,6 +66,16 @@ control MyIngress(inout headers hdr,
|
|||
//meta.cast_length = (bit<32>) hdr.ipv6.payload_length;
|
||||
}
|
||||
|
||||
/* this needs SESSIONS!!
|
||||
- icmp6: (src addr, dst addr, ID??, )
|
||||
- tcp: (src port, dst port, dst_addr, src addr)
|
||||
- udp: (src port, dst port, dst_addr, src addr)
|
||||
*/
|
||||
action nat64_static(ipv4_addr_t nataddr, ipv6_addr_t nat64_prefix) {
|
||||
hdr.ipv4.dst_addr = hdr.ipv6.dst_addr - nat64_prefix;
|
||||
hdr.ipv4.dst_addr = hdr.ipv6.dst_addr - nat64_prefix;
|
||||
}
|
||||
|
||||
/********************** Reply to NDP for US ***********************************/
|
||||
table ndp_answer {
|
||||
key = {
|
||||
|
|
Loading…
Reference in a new issue