Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions pna.p4
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,16 @@ extern T SelectByDirection<T>(



// Struct to contain vendor-specific metadata fields that can be
// accessed while pakcets are being processed in the main control.
// The definition of the fields and their behavior is completely
// vendor-specific, and this part of the pna.p4 header file is
// expected to be customized by each vendor implementing PNA.

struct vendor_metadata_t {
}



// BEGIN:Programmable_blocks
control PreControlT<PH, PM>(
Expand All @@ -791,10 +801,13 @@ parser MainParserT<PM, MH, MM>(
inout MM main_user_meta,
in pna_main_parser_input_metadata_t istd);

control MainControlT<PM, MH, MM>(
control MainControlT<PM, MH, MM, MTX, MRX>(
//in PM pre_user_meta,
inout MH main_hdr,
inout MM main_user_meta,
inout vendor_metadata_t vmeta,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is line 808 needed ?

inout MTX txmeta,
inout MRX rxmeta,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should control block have two separate vendor meta for each direction ?

in pna_main_input_metadata_t istd,
inout pna_main_output_metadata_t ostd);

Expand All @@ -804,10 +817,10 @@ control MainDeparserT<MH, MM>(
in MM main_user_meta,
in pna_main_output_metadata_t ostd);

package PNA_NIC<PH, PM, MH, MM>(
package PNA_NIC<PH, PM, MH, MM, MTX, MRX>(
MainParserT<PM, MH, MM> main_parser,
PreControlT<PH, PM> pre_control,
MainControlT<PM, MH, MM> main_control,
MainControlT<PM, MH, MM, MTX, MRX> main_control,
MainDeparserT<MH, MM> main_deparser);
// END:Programmable_blocks

Expand Down