Skip to content

Commit

Permalink
Merge pull request #23 from jkoeppeler/merge-templates
Browse files Browse the repository at this point in the history
Merge templates
  • Loading branch information
gycsaba96 authored Sep 27, 2023
2 parents bc2cc47 + 34c07b0 commit 10cc168
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions templates/p4_psa_ebpf_template/main.p4
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,19 @@ control ebpfIngress(inout headers hdr,
}

table forward {
#ifdef MAC_FORWARDING
key = {
hdr.ethernet.dstAddr : exact;
}
#elif IP_FORWARDING
key = {
hdr.ipv4.dst : exact;
}
#else //default: port-based forwarding
key = {
istd.ingress_port : exact;
}
#endif

actions = {
drop;
Expand Down

0 comments on commit 10cc168

Please sign in to comment.