Hi,
Sorry, The above message doesn't address my question correctly.
In the below given P4 code, I need to validate the "next_hop_id" field parameter to ascertain whether it contains a "NULL" value or not. If it is a "NULL" value drop the packet, if not forward the packet to given next_hop_id. Question is how do you validate the field "next_hop_id" to implement the functionality?
Note: "next_hop_id" contains the port_numberaction set_nhop(bit<9> next_hop_id) {
// If next_hop_id is "NULL" drop the packet
drop();
// If next_hop_id is not "NULL" execute below lines
#ifdef TARGET_BMV2_V1MODEL
standard_metadata.egress_spec = next_hop_id;
#endif // TARGET_BMV2_V1MODEL
}
Thanks,
Amith