Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parameters to main control for Rx and Tx host metadata #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
@@ -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>(
@@ -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);

@@ -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