Skip to content

Metadata

Steffen Lindner edited this page Apr 15, 2019 · 1 revision

The implementation contains some metadata for correct behaviour.

BIER metadata

The bier metadata contains the following fields

struct bier_metadata_t {
    bit<64> remainingBits;
    bit<1> mdValid;
}

where meta.bier_md.remainingBits is used for looping over the original Bier BitString. When the bier control matches on a bit set in the bitstring this bit is cleared in meta.bier_md.remainingBits. Also the corresponding forwarding bitmask is cleared form the remaining bits.

The mdValid field is used for initialization of the metadata. If the field is not set to 1 the metadata gets initialized.

Port metadata

The port information is stored in a bitstring similar to bier. A bit string of 1011 means that port 1, 2 and 4 are available while port 3 is not.

struct port_metadata_t {
    bit<8> status;
    bit<1> mdValid;
}

The port information is stored in meta.ports.status as bitstring as described before. The mdValid flag is used like in the bier case.

Metadata naming

The metadata can be accesses with the following names

struct metadata {
    bier_metadata_t bier_md;
    port_metadata_t ports;
    intrinsic_metadata_t intrinsic_metadata;
}

where bier_md is the bier speific metadata, ports the port related metadata and intrinsic_metadata used for internal usage, i.e. recirculation and resubmitting.