Keep packet type correct for multicast / ndp
This commit is contained in:
parent
142bc29c82
commit
6f83eeddb2
2 changed files with 16 additions and 14 deletions
|
|
@ -201,21 +201,10 @@ control MyEgress(inout headers hdr,
|
|||
inout metadata meta,
|
||||
inout standard_metadata_t standard_metadata) {
|
||||
apply {
|
||||
/* set tcp header valid after modifying it -- keep this in mind*/
|
||||
// hdr.tcp.setValid();
|
||||
|
||||
// If ingress clone
|
||||
// ingress clone
|
||||
if (standard_metadata.instance_type == 1 && meta.ether_modified == 1){
|
||||
hdr.ethernet.ethertype = meta.ethertype;
|
||||
|
||||
// hdr.cpu.setValid();
|
||||
// hdr.cpu.srcAddr = hdr.ethernet.srcAddr;
|
||||
// hdr.cpu.ingress_port = (bit<16>)meta.ingress_port;
|
||||
|
||||
// truncate((bit<32>)22); //ether+cpu header
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -231,3 +220,14 @@ MyEgress(),
|
|||
MyComputeChecksum(),
|
||||
MyDeparser()
|
||||
) main;
|
||||
|
||||
|
||||
/* set tcp header valid after modifying it -- keep this in mind*/
|
||||
// hdr.tcp.setValid();
|
||||
|
||||
|
||||
// hdr.cpu.setValid();
|
||||
// hdr.cpu.srcAddr = hdr.ethernet.srcAddr;
|
||||
// hdr.cpu.ingress_port = (bit<16>)meta.ingress_port;
|
||||
|
||||
// truncate((bit<32>)22); //ether+cpu header
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue