Rewrite one check to bit<1>
This commit is contained in:
parent
9f5b9fb0c9
commit
d1cc9d2643
3 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ control MyComputeChecksum(inout headers hdr, inout metadata meta) {
|
||||||
);
|
);
|
||||||
|
|
||||||
/* checksumming for icmp6_na_ns_option */
|
/* checksumming for icmp6_na_ns_option */
|
||||||
update_checksum_with_payload(meta.chk_icmp6_na_ns == true,
|
update_checksum_with_payload(meta.chk_icmp6_na_ns == 1,
|
||||||
{
|
{
|
||||||
hdr.ipv6.src_addr, /* 128 */
|
hdr.ipv6.src_addr, /* 128 */
|
||||||
hdr.ipv6.dst_addr, /* 128 */
|
hdr.ipv6.dst_addr, /* 128 */
|
||||||
|
|
|
@ -181,7 +181,7 @@ struct metadata {
|
||||||
task_t switch_task;
|
task_t switch_task;
|
||||||
|
|
||||||
/* migrate tasks to bool */
|
/* migrate tasks to bool */
|
||||||
bool chk_icmp6_na_ns;
|
bit<1> chk_icmp6_na_ns;
|
||||||
bool chk_icmp6;
|
bool chk_icmp6;
|
||||||
bool chk_icmp;
|
bool chk_icmp;
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ parser MyParser(packet_in packet,
|
||||||
|
|
||||||
meta.chk_icmp = false;
|
meta.chk_icmp = false;
|
||||||
meta.chk_icmp6 = false;
|
meta.chk_icmp6 = false;
|
||||||
meta.chk_icmp6_na_ns = false;
|
meta.chk_icmp6_na_ns = 0;
|
||||||
|
|
||||||
packet.extract(hdr.ethernet);
|
packet.extract(hdr.ethernet);
|
||||||
transition select(hdr.ethernet.ethertype){
|
transition select(hdr.ethernet.ethertype){
|
||||||
|
|
Loading…
Reference in a new issue