TNSM_Latency_Prediction / code / control / ingress / 2_custom / tables / table7.p4
table7.p4
Raw
    table t7 {
        key = {
    #ifdef LPM_1
            hdr.ipv4.dstAddr: lpm;
    #elif LPM_2
            hdr.ipv4.dstAddr: lpm;
            hdr.ipv4.srcAddr: lpm;
    #endif

    #ifdef EXACT_1
            hdr.custom1.field0: exact;
    #elif EXACT_2
            hdr.custom1.field0: exact;
            hdr.custom2.field0: exact;
    #elif EXACT_3
            hdr.custom1.field0: exact;
            hdr.custom2.field0: exact;
            hdr.custom3.field0: exact;
    #elif EXACT_4
            hdr.custom1.field0: exact;
            hdr.custom2.field0: exact;
            hdr.custom3.field0: exact;
            hdr.custom4.field0: exact;
    #endif
        }
        actions = {
    #ifdef SET_OUTPUT
            set_output;
    #endif
    #ifdef ACTION_MOD1
            mod_header1;
    #elif ACTION_MOD2
            mod_header2;
    #elif ACTION_MOD3
            mod_header3;
    #elif ACTION_MOD4
            mod_header4;
    #endif
            NoAction;
        }
        size = TABLE_SIZE;
    }