Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Jan 27, 2025
1 parent 0031326 commit 24012cf
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 40 deletions.
43 changes: 25 additions & 18 deletions misc/native/p4emu_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,15 +451,14 @@ int doOneCommand(struct packetContext *ctx, unsigned char* buf) {
}
if (strcmp(arg[0], "portvrf") == 0) {
port2vrf_ntry.port = atoi(arg[2]);
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->bridge = 0;
if (del == 0) {
port2vrf_res->command = 0;
port2vrf_res->vrf = 0;
port2vrf_deinit(&port2vrf_ntry);
return 0;
}
port2vrf_res->command = 1;
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->bridge = 0;
port2vrf_res->vrf = atoi(arg[3]);
port2vrf_res->command = 1;
return 0;
}
if (strcmp(arg[0], "tcpmss4in") == 0) {
Expand Down Expand Up @@ -540,48 +539,57 @@ int doOneCommand(struct packetContext *ctx, unsigned char* buf) {
}
if (strcmp(arg[0], "loconnifc") == 0) {
port2vrf_ntry.port = atoi(arg[2]);
if (del == 0) {
port2vrf_deinit(&port2vrf_ntry);
return 0;
}
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->command = 4;
port2vrf_res->bridge = 0;
port2vrf_res->vrf = 0;
port2vrf_res->label1 = atoi(arg[3]);
if (del == 0) port2vrf_res->command = 0;
port2vrf_res->command = 4;
return 0;
}
if (strcmp(arg[0], "loconnnei") == 0) {
port2vrf_ntry.port = atoi(arg[2]);
if (del == 0) {
port2vrf_deinit(&port2vrf_ntry);
return 0;
}
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->command = 5;
port2vrf_res->bridge = 0;
port2vrf_res->vrf = 0;
port2vrf_res->label1 = atoi(arg[3]);
if (del == 0) port2vrf_res->command = 0;
port2vrf_res->command = 5;
return 0;
}
if (strcmp(arg[0], "nshconn") == 0) {
port2vrf_ntry.port = atoi(arg[2]);
if (del == 0) {
port2vrf_deinit(&port2vrf_ntry);
return 0;
}
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->command = 6;
port2vrf_res->bridge = 0;
port2vrf_res->vrf = 0;
port2vrf_res->label1 = atoi(arg[3]);
port2vrf_res->label2 = atoi(arg[4]);
if (del == 0) port2vrf_res->command = 0;
port2vrf_res->command = 6;
return 0;
}
if (strcmp(arg[0], "xconnect") == 0) {
port2vrf_ntry.port = atoi(arg[2]);
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->command = 3;
port2vrf_res->bridge = 0;
port2vrf_res->vrf = 0;
port2vrf_res->nexthop = atoi(arg[4]);
port2vrf_res->label1 = atoi(arg[5]);
port2vrf_res->label2 = atoi(arg[7]);
port2vrf_res->command = 3;
mpls_ntry.label = atoi(arg[6]);
mpls_ntry.port = port2vrf_res->port;
mpls_ntry.command = 4;
if (del == 0) port2vrf_res->command = 0;
if (del == 0) port2vrf_deinit(&port2vrf_ntry);
if (del == 0) table_del(&mpls_table, &mpls_ntry);
else table_add(&mpls_table, &mpls_ntry);
return 0;
Expand Down Expand Up @@ -609,15 +617,14 @@ int doOneCommand(struct packetContext *ctx, unsigned char* buf) {
}
if (strcmp(arg[0], "portbridge") == 0) {
port2vrf_ntry.port = atoi(arg[2]);
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->vrf = 0;
if (del == 0) {
port2vrf_res->command = 0;
port2vrf_res->bridge = 0;
port2vrf_deinit(&port2vrf_ntry);
return 0;
}
port2vrf_res->command = 2;
port2vrf_res = port2vrf_init(&port2vrf_ntry);
port2vrf_res->vrf = 0;
port2vrf_res->bridge = atoi(arg[3]);
port2vrf_res->command = 2;
return 0;
}
if (strcmp(arg[0], "bridgemac") == 0) {
Expand Down
44 changes: 26 additions & 18 deletions misc/native/p4emu_tab.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ struct port2vrf_entry* port2vrf_init(struct port2vrf_entry *ntry) {
}


void port2vrf_deinit(struct port2vrf_entry *ntry) {
int index = table_find(&port2vrf_table, ntry);
if (index < 0) return;
ntry = table_get(&port2vrf_table, index);
table_del(&port2vrf_table, ntry);
}


struct vrf2rib_entry {
int vrf;
long pack;
Expand Down Expand Up @@ -539,14 +547,14 @@ struct nat4_entry {
struct insp6_entry {
int srcPort;
int trgPort;
int srcAddr4;
int trgAddr4;
int srcAddr3;
int trgAddr3;
int srcAddr2;
int srcAddr1;
int trgAddr2;
int srcAddr2;
int srcAddr3;
int srcAddr4;
int trgAddr1;
int trgAddr2;
int trgAddr3;
int trgAddr4;
int prot;
long packRx;
long byteRx;
Expand All @@ -557,14 +565,14 @@ struct insp6_entry {
struct nat6_entry {
int oSrcPort;
int oTrgPort;
int oSrcAddr4;
int oTrgAddr4;
int oSrcAddr3;
int oTrgAddr3;
int oSrcAddr2;
int oTrgAddr2;
int oSrcAddr1;
int oSrcAddr2;
int oSrcAddr3;
int oSrcAddr4;
int oTrgAddr1;
int oTrgAddr2;
int oTrgAddr3;
int oTrgAddr4;
int prot;
int nSrcAddr1;
int nSrcAddr2;
Expand Down Expand Up @@ -632,14 +640,14 @@ struct tun4_entry {
struct tun6_entry {
int srcPort;
int trgPort;
int srcAddr4;
int trgAddr4;
int srcAddr3;
int trgAddr3;
int srcAddr2;
int trgAddr2;
int srcAddr1;
int srcAddr2;
int srcAddr3;
int srcAddr4;
int trgAddr1;
int trgAddr2;
int trgAddr3;
int trgAddr4;
int prot;
int command; // 1=gre, 2=l2tp, 3=vxlan, 4=ip4ip, 5=ip6ip, 6=pckoudp, 7=esp, 8=openvpn, 9=wireguard, 10=amt, 11=gtp, 12=l3tp, 13=tmux, 14=etherip
long pack;
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.1.27-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-01-27 16:04:14, took 00:15:01, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries
-;-;-;2025-01-27 16:35:14, took 00:15:04, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/basic01.tst;basic01.tst;success;dummy test
http://sources.freertr.org/cfg/basic02.tst;basic02.tst;success;interface with slot
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.1.27-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-01-27 16:04:14, took 00:15:01, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries<br/>
tested: 2025-01-27 16:35:14, took 00:15:04, with 50 workers, on 3634 cases, 0 failed, 0 traces, 2 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.1.27-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-01-27 16:17:52, took 00:13:14, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries
-;-;-;2025-01-27 16:46:00, took 00:10:23, with 50 workers, on 700 cases, 0 failed, 0 traces, 1 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/p4lang-acl001.tst;p4lang-acl001.tst;success;p4lang: copp
http://sources.freertr.org/cfg/p4lang-acl002.tst;p4lang-acl002.tst;success;p4lang: ingress access list
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.1.27-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-01-27 16:17:52, took 00:13:14, with 50 workers, on 700 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2025-01-27 16:46:00, took 00:10:23, with 50 workers, on 700 cases, 0 failed, 0 traces, 1 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit 24012cf

Please sign in to comment.