Skip to content

Commit

Permalink
Format all json runtime files
Browse files Browse the repository at this point in the history
  • Loading branch information
stano45 committed Aug 10, 2024
1 parent 303821a commit 698a528
Show file tree
Hide file tree
Showing 8 changed files with 216 additions and 264 deletions.
204 changes: 99 additions & 105 deletions examples/host_containers/config/s1-runtime.json
Original file line number Diff line number Diff line change
@@ -1,106 +1,100 @@
{
"target": "bmv2",
"p4info": "build/load_balance.p4.p4info.txt",
"bmv2_json": "build/load_balance.json",
"table_entries": [
{
"table": "MyIngress.ecmp_group",
"default_action": true,
"action_name": "MyIngress.drop",
"action_params": {}
},
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.1.1",
32
]
},
"action_name": "MyIngress.set_rewrite_src",
"action_params": {
"new_src": "10.0.1.10"
}
},
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.1.10",
32
]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
"ecmp_base": 1,
"ecmp_count": 2
}
},
{
"table": "MyIngress.ecmp_nhop",
"match": {
"meta.ecmp_select": 0
},
"action_name": "MyIngress.set_nhop",
"action_params": {
"nhop_dmac": "08:00:00:00:01:01",
"nhop_ipv4": "10.0.1.1",
"port": 1
}
},
{
"table": "MyIngress.ecmp_nhop",
"match": {
"meta.ecmp_select": 1
},
"action_name": "MyIngress.set_nhop",
"action_params": {
"nhop_dmac": "08:00:00:00:02:02",
"nhop_ipv4": "10.0.2.2",
"port": 2
}
},
{
"table": "MyIngress.ecmp_nhop",
"match": {
"meta.ecmp_select": 2
},
"action_name": "MyIngress.set_nhop",
"action_params": {
"nhop_dmac": "08:00:00:00:03:03",
"nhop_ipv4": "10.0.3.3",
"port": 3
}
},
{
"table": "MyEgress.send_frame",
"match": {
"standard_metadata.egress_port": 1
},
"action_name": "MyEgress.rewrite_mac",
"action_params": {
"smac": "00:00:00:01:01:00"
}
},
{
"table": "MyEgress.send_frame",
"match": {
"standard_metadata.egress_port": 2
},
"action_name": "MyEgress.rewrite_mac",
"action_params": {
"smac": "00:00:00:01:02:00"
}
},
{
"table": "MyEgress.send_frame",
"match": {
"standard_metadata.egress_port": 3
},
"action_name": "MyEgress.rewrite_mac",
"action_params": {
"smac": "00:00:00:01:03:00"
}
}
]
}
"target": "bmv2",
"p4info": "build/load_balance.p4.p4info.txt",
"bmv2_json": "build/load_balance.json",
"table_entries": [
{
"table": "MyIngress.ecmp_group",
"default_action": true,
"action_name": "MyIngress.drop",
"action_params": {}
},
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
},
"action_name": "MyIngress.set_rewrite_src",
"action_params": {
"new_src": "10.0.1.10"
}
},
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": ["10.0.1.10", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
"ecmp_base": 1,
"ecmp_count": 2
}
},
{
"table": "MyIngress.ecmp_nhop",
"match": {
"meta.ecmp_select": 0
},
"action_name": "MyIngress.set_nhop",
"action_params": {
"nhop_dmac": "08:00:00:00:01:01",
"nhop_ipv4": "10.0.1.1",
"port": 1
}
},
{
"table": "MyIngress.ecmp_nhop",
"match": {
"meta.ecmp_select": 1
},
"action_name": "MyIngress.set_nhop",
"action_params": {
"nhop_dmac": "08:00:00:00:02:02",
"nhop_ipv4": "10.0.2.2",
"port": 2
}
},
{
"table": "MyIngress.ecmp_nhop",
"match": {
"meta.ecmp_select": 2
},
"action_name": "MyIngress.set_nhop",
"action_params": {
"nhop_dmac": "08:00:00:00:03:03",
"nhop_ipv4": "10.0.3.3",
"port": 3
}
},
{
"table": "MyEgress.send_frame",
"match": {
"standard_metadata.egress_port": 1
},
"action_name": "MyEgress.rewrite_mac",
"action_params": {
"smac": "00:00:00:01:01:00"
}
},
{
"table": "MyEgress.send_frame",
"match": {
"standard_metadata.egress_port": 2
},
"action_name": "MyEgress.rewrite_mac",
"action_params": {
"smac": "00:00:00:01:02:00"
}
},
{
"table": "MyEgress.send_frame",
"match": {
"standard_metadata.egress_port": 3
},
"action_name": "MyEgress.rewrite_mac",
"action_params": {
"smac": "00:00:00:01:03:00"
}
}
]
}
12 changes: 3 additions & 9 deletions examples/host_containers/config/s2-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.2.2",
32
]
"hdr.ipv4.dstAddr": ["10.0.2.2", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
Expand All @@ -26,10 +23,7 @@
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.1.1",
32
]
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
Expand Down Expand Up @@ -82,4 +76,4 @@
}
}
]
}
}
12 changes: 3 additions & 9 deletions examples/host_containers/config/s3-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.3.3",
32
]
"hdr.ipv4.dstAddr": ["10.0.3.3", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
Expand All @@ -26,10 +23,7 @@
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.1.1",
32
]
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
Expand Down Expand Up @@ -82,4 +76,4 @@
}
}
]
}
}
12 changes: 3 additions & 9 deletions examples/host_containers/config/s4-runtime.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.4.4",
32
]
"hdr.ipv4.dstAddr": ["10.0.4.4", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
Expand All @@ -26,10 +23,7 @@
{
"table": "MyIngress.ecmp_group",
"match": {
"hdr.ipv4.dstAddr": [
"10.0.1.1",
32
]
"hdr.ipv4.dstAddr": ["10.0.1.1", 32]
},
"action_name": "MyIngress.set_ecmp_select",
"action_params": {
Expand Down Expand Up @@ -82,4 +76,4 @@
}
}
]
}
}
Loading

0 comments on commit 698a528

Please sign in to comment.