Skip to content

Commit

Permalink
Make sure compiler_meta__->drop starts out false (#4722)
Browse files Browse the repository at this point in the history
* Make sure drop starts out false

We found scenarios where the skb->cb is not zeroed out before the bpf
program is called. Since compiler_meta__ = skb->cb, there is an issue in
some specific scenarios. For example, since the bpf code looks at
compiler_meta__->drop to tell whether the packet should be dropped or not,
if by any chance compiler_meta__->drop is initialised to true, the
program will mistakenly drop the packet. To solve this, we are
initialising compiler_meta__->drop to false before doing any
processing on compiler_meta__->drop.

* Adapt test cases to compiler_meta__->drop initialisation

---------

Co-authored-by: Mouse <mouse@mojatatu.com>
  • Loading branch information
vbnogueira and mouse-mt authored Jun 24, 2024
1 parent 0a9a19e commit f781e0b
Show file tree
Hide file tree
Showing 46 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions backends/tc/ebpfCodeGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ void TCIngressPipelinePNA::emitGlobalMetadataInitializer(EBPF::CodeBuilder *buil
builder->append("if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;");
builder->newline();

// Make sure drop starts out false
builder->emitIndent();
builder->append("compiler_meta__->drop = false;");
builder->newline();

// workaround to make TC protocol-independent, DO NOT REMOVE
builder->emitIndent();
// replace ether_type only if a packet comes from XDP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
1 change: 1 addition & 0 deletions testdata/p4tc_samples_outputs/calculator_control_blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
1 change: 1 addition & 0 deletions testdata/p4tc_samples_outputs/checksum_control_blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
1 change: 1 addition & 0 deletions testdata/p4tc_samples_outputs/hash1_control_blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
1 change: 1 addition & 0 deletions testdata/p4tc_samples_outputs/ipip_control_blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
1 change: 1 addition & 0 deletions testdata/p4tc_samples_outputs/matchtype_control_blocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ SEC("p4tc/main")
int tc_ingress_func(struct __sk_buff *skb) {
struct pna_global_metadata *compiler_meta__ = (struct pna_global_metadata *) skb->cb;
if (compiler_meta__->pass_to_kernel == true) return TC_ACT_OK;
compiler_meta__->drop = false;
if (!compiler_meta__->recirculated) {
compiler_meta__->mark = 153;
struct internal_metadata *md = (struct internal_metadata *)(unsigned long)skb->data_meta;
Expand Down
Loading

0 comments on commit f781e0b

Please sign in to comment.