P4C
The P4 Compiler
Loading...
Searching...
No Matches
BFN::HeaderStackInfo Struct Reference

Metadata about how header stacks are used in the program. More...

#include <header_stack.h>

Classes

struct  Info
 

Public Member Functions

auto at (cstring n) -> decltype(info.at(n))
 
auto at (cstring n) const -> decltype(info.at(n))
 
auto begin () -> decltype(Values(info).begin())
 
auto begin () const -> decltype(Values(info).begin())
 
auto count (cstring n) const -> decltype(info.count(n))
 
auto end () -> decltype(Values(info).end())
 
auto end () const -> decltype(Values(info).end())
 
const Infoget (cstring n) const
 

Friends

struct ::CollectHeaderStackInfo
 
class ::ElimUnusedHeaderStackInfo
 

Detailed Description

Metadata about how header stacks are used in the program.


Class Documentation

◆ BFN::HeaderStackInfo::Info

struct BFN::HeaderStackInfo::Info
Class Members
bool inThread[2] = {true, true}

Which threads is this header stack visible in? By default, the same header stack is used in both threads, but after CreateThreadLocalInstances runs, header stacks are thread-specific.

int maxpop = 0

What is the maximum number of elements that are popped off of this header stack in a single pop_front primitive invocation?

int maxpush = 0

What is the maximum number of elements that are pushed onto this header stack in a single push_front primitive invocation?

cstring name The name of the header stack this metadata describes.
int size = 0 How many elements are in this header stack?