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 Dec 31, 2024
1 parent bfb4217 commit 4145590
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 70 deletions.
44 changes: 18 additions & 26 deletions misc/native/p4emu_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ int hashDataPacket(unsigned char *bufP) {
if (prt < 0) return; \
if (prt >= dataPorts) return; \
bufS = bufS - bufP + preBuff; \
packTx[prt]++; \
byteTx[prt] += bufS; \
ifaceStat[prt]->packTx++; \
ifaceStat[prt]->byteTx += bufS; \
sendPack(&bufD[bufP], bufS, prt);


Expand Down Expand Up @@ -1519,9 +1519,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
case ETHERTYPE_MPLS_UCAST: // mpls
if (port2vrf_res == NULL) doDropper;
if (port2vrf_res->mpls == 0) doDropper;
ttl = ctx->port;
packMpls[ttl]++;
byteMpls[ttl] += bufS;
ctx->stat->packMpls++;
ctx->stat->byteMpls += bufS;
mpls_rx:
label = get32msb(bufD, bufP);
ttl = (label & 0xff) - 1;
Expand Down Expand Up @@ -1644,9 +1643,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
}
doDropper;
case ETHERTYPE_VLAN: // dot1q
ttl = ctx->port;
packVlan[ttl]++;
byteVlan[ttl] += bufS;
ctx->stat->packVlan++;
ctx->stat->byteVlan += bufS;
ttl = get16msb(bufD, bufP) & 0xfff;
ctx->hash ^= ttl;
vlanin_ntry.port = prt;
Expand All @@ -1662,9 +1660,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
case ETHERTYPE_IPV4: // ipv4
if (port2vrf_res == NULL) doDropper;
if (port2vrf_res->command != 1) doDropper;
ttl = ctx->port;
packIpv4[ttl]++;
byteIpv4[ttl] += bufS;
ctx->stat->packIpv4++;
ctx->stat->byteIpv4 += bufS;
vrf2rib_ntry.vrf = port2vrf_res->vrf;
ipv4_rx:
index = table_find(&vrf2rib4_table, &vrf2rib_ntry);
Expand Down Expand Up @@ -1935,9 +1932,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
case ETHERTYPE_IPV6: // ipv6
if (port2vrf_res == NULL) doDropper;
if (port2vrf_res->command != 1) doDropper;
ttl = ctx->port;
packIpv6[ttl]++;
byteIpv6[ttl] += bufS;
ctx->stat->packIpv6++;
ctx->stat->byteIpv6 += bufS;
vrf2rib_ntry.vrf = port2vrf_res->vrf;
ipv6_rx:
index = table_find(&vrf2rib6_table, &vrf2rib_ntry);
Expand Down Expand Up @@ -2262,9 +2258,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
}
doDropper;
case ETHERTYPE_PPPOE_DATA: // pppoe
ttl = ctx->port;
packPppoe[ttl]++;
bytePppoe[ttl] += bufS;
ctx->stat->packPppoe++;
ctx->stat->bytePppoe += bufS;
pppoe_ntry.port = prt;
pppoe_ntry.session = get16msb(bufD, bufP + 2);
ctx->hash ^= pppoe_ntry.session;
Expand All @@ -2281,9 +2276,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
goto ethtyp_rx;
case ETHERTYPE_ROUTEDMAC: // routed bridge
if (port2vrf_res == NULL) doDropper;
ttl = ctx->port;
packBridge[ttl]++;
byteBridge[ttl] += bufS;
ctx->stat->packBridge++;
ctx->stat->byteBridge += bufS;
if (port2vrf_res->command != 2) doDropper;
bridge_ntry.id = port2vrf_res->bridge;
memcpy(&bufH[0], &bufD[bufP], 12);
Expand Down Expand Up @@ -2377,9 +2371,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
doDropper;
case ETHERTYPE_POLKA: // polka
if (port2vrf_res == NULL) doDropper;
ttl = ctx->port;
packPolka[ttl]++;
bytePolka[ttl] += bufS;
ctx->stat->packPolka++;
ctx->stat->bytePolka += bufS;
ttl = bufD[bufP + 1];
if ((ttl & 0xff) <= 1) doPunting;
ttl--;
Expand Down Expand Up @@ -2448,9 +2441,8 @@ void processDataPacket(struct packetContext *ctx, int bufS, int prt) {
case ETHERTYPE_NSH: // nsh
if (port2vrf_res == NULL) doDropper;
if (port2vrf_res->nsh == 0) doDropper;
ttl = ctx->port;
packNsh[ttl]++;
byteNsh[ttl] += bufS;
ctx->stat->packNsh++;
ctx->stat->byteNsh += bufS;
nsh_rx:
ttl = get16msb(bufD, bufP + 0);
if ((ttl & 0xe000) != 0) doDropper;
Expand Down
21 changes: 11 additions & 10 deletions misc/native/p4emu_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -2995,7 +2995,7 @@ void doStatLoop() {
if ((round % 10) != 0) continue;
for (int i = 0; i < dataPorts; i++) {
struct ifaceStat_entry *stat = ifaceStat[i];
fprintf(commandTx, "counter %i %li %li %li %li %li %li\r\n", i, stat->packRx, stat->byteRx, packTx[i], byteTx[i], stat->packDr, stat->byteDr);
fprintf(commandTx, "counter %i %li %li %li %li %li %li\r\n", i, stat->packRx, stat->byteRx, stat->packTx, stat->byteTx, stat->packDr, stat->byteDr);
int o = getState(i);
fprintf(commandTx, "state %i %i\r\n", i, o);
}
Expand Down Expand Up @@ -3023,14 +3023,15 @@ void doStatLoop() {
continue;
}
for (int i = 0; i < dataPorts; i++) {
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_MPLS_UCAST, packMpls[i], byteMpls[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_VLAN, packVlan[i], byteVlan[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_IPV4, packIpv4[i], byteIpv4[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_IPV6, packIpv6[i], byteIpv6[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_PPPOE_DATA, packPppoe[i], bytePppoe[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_ROUTEDMAC, packBridge[i], byteBridge[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_POLKA, packPolka[i], bytePolka[i]);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_NSH, packNsh[i], byteNsh[i]);
struct ifaceStat_entry *stat = ifaceStat[i];
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_MPLS_UCAST, stat->packMpls, stat->byteMpls);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_VLAN, stat->packVlan, stat->byteVlan);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_IPV4, stat->packIpv4, stat->byteIpv4);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_IPV6, stat->packIpv6, stat->byteIpv6);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_PPPOE_DATA, stat->packPppoe, stat->bytePppoe);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_ROUTEDMAC, stat->packBridge, stat->byteBridge);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_POLKA, stat->packPolka, stat->bytePolka);
fprintf(commandTx, "ethertype %i %i %li %li\r\n", i, ETHERTYPE_NSH, stat->packNsh, stat->byteNsh);
}
for (int i=0; i<nsh_table.size; i++) {
struct nsh_entry *ntry = table_get(&nsh_table, i);
Expand Down Expand Up @@ -3125,7 +3126,7 @@ void doMainLoop() {
printf(" iface rx tx drop rx tx drop\n");
for (int i=0; i<dataPorts; i++) {
struct ifaceStat_entry *stat = ifaceStat[i];
printf("%32s %10li %10li %10li %10li %10li %10li\n", ifaceName[i], stat->packRx, packTx[i], stat->packDr, stat->byteRx, byteTx[i], stat->byteDr);
printf("%32s %10li %10li %10li %10li %10li %10li\n", ifaceName[i], stat->packRx, stat->packTx, stat->packDr, stat->byteRx, stat->byteTx, stat->byteDr);
}
break;
case 'm':
Expand Down
18 changes: 0 additions & 18 deletions misc/native/p4emu_tab.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,6 @@ int dataPorts;
int cpuPort;
char *ifaceName[maxPorts];
struct ifaceStat_entry *ifaceStat[maxPorts];
long int byteTx[maxPorts];
long int packTx[maxPorts];
long int byteMpls[maxPorts];
long int packMpls[maxPorts];
long int byteVlan[maxPorts];
long int packVlan[maxPorts];
long int byteIpv4[maxPorts];
long int packIpv4[maxPorts];
long int byteIpv6[maxPorts];
long int packIpv6[maxPorts];
long int bytePppoe[maxPorts];
long int packPppoe[maxPorts];
long int byteBridge[maxPorts];
long int packBridge[maxPorts];
long int bytePolka[maxPorts];
long int packPolka[maxPorts];
long int byteNsh[maxPorts];
long int packNsh[maxPorts];



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 v24.12.31-cur, done by sprscc13@mrn0b0dy.
-;-;-;2024-12-31 09:55:12, took 00:14:49, with 50 workers, on 3602 cases, 0 failed, 0 traces, 2 retries
-;-;-;2024-12-31 10:48:35, took 00:14:58, with 50 workers, on 3602 cases, 0 failed, 0 traces, 3 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 v24.12.31-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2024-12-31 09:55:12, took 00:14:49, with 50 workers, on 3602 cases, 0 failed, 0 traces, 2 retries<br/>
tested: 2024-12-31 10:48:35, took 00:14:58, with 50 workers, on 3602 cases, 0 failed, 0 traces, 3 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
10 changes: 5 additions & 5 deletions src/rtr8.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v24.12.31-cur, done by sprscc13@mrn0b0dy.
-;-;-;2024-12-31 10:25:10, took 00:14:31, with 50 workers, on 674 cases, 4 failed, 0 traces, 50 retries
-;-;-;2024-12-31 10:58:51, took 00:09:54, with 50 workers, on 674 cases, 0 failed, 0 traces, 0 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 Expand Up @@ -245,9 +245,9 @@ http://sources.freertr.org/cfg/p4lang-crypt110.tst;p4lang-crypt110.tst;success;p
http://sources.freertr.org/cfg/p4lang-crypt111.tst;p4lang-crypt111.tst;success;p4lang: macsec over tmux
http://sources.freertr.org/cfg/p4lang-crypt112.tst;p4lang-crypt112.tst;success;p4lang: sgt over tmux
http://sources.freertr.org/cfg/p4lang-crypt113.tst;p4lang-crypt113.tst;success;p4lang: packout on port
http://sources.freertr.org/cfg/p4lang-crypt114.tst;p4lang-crypt114.tst;#6-run-r1 tping 100 10 1.1.1.2 vrf v1;p4lang: packout on vlan port
http://sources.freertr.org/cfg/p4lang-crypt114.tst;p4lang-crypt114.tst;success;p4lang: packout on vlan port
http://sources.freertr.org/cfg/p4lang-crypt115.tst;p4lang-crypt115.tst;success;p4lang: packout on macsec port
http://sources.freertr.org/cfg/p4lang-crypt116.tst;p4lang-crypt116.tst;#6-run-r1 tping 100 10 1.1.1.2 vrf v1;p4lang: packout on macsec vlan port
http://sources.freertr.org/cfg/p4lang-crypt116.tst;p4lang-crypt116.tst;success;p4lang: packout on macsec vlan port
http://sources.freertr.org/cfg/p4lang-crypt117.tst;p4lang-crypt117.tst;success;p4lang: ipsec with packout
http://sources.freertr.org/cfg/p4lang-crypt118.tst;p4lang-crypt118.tst;success;p4lang: openvpn with packout
http://sources.freertr.org/cfg/p4lang-crypt119.tst;p4lang-crypt119.tst;success;p4lang: wireguard with packout
Expand All @@ -262,8 +262,8 @@ http://sources.freertr.org/cfg/p4lang-crypt127.tst;p4lang-crypt127.tst;success;p
http://sources.freertr.org/cfg/p4lang-crypt128.tst;p4lang-crypt128.tst;success;p4lang: sgt over macsec over qinq
http://sources.freertr.org/cfg/p4lang-crypt129.tst;p4lang-crypt129.tst;success;p4lang: sgt qinq ingress access list
http://sources.freertr.org/cfg/p4lang-crypt130.tst;p4lang-crypt130.tst;success;p4lang: sgt qinq egress access list
http://sources.freertr.org/cfg/p4lang-crypt131.tst;p4lang-crypt131.tst;#6-run-r1 tping 100 10 1.1.1.2 vrf v1;p4lang: packout on qinq port
http://sources.freertr.org/cfg/p4lang-crypt132.tst;p4lang-crypt132.tst;#6-run-r1 tping 100 10 1.1.1.2 vrf v1;p4lang: packout on macsec qinq port
http://sources.freertr.org/cfg/p4lang-crypt131.tst;p4lang-crypt131.tst;success;p4lang: packout on qinq port
http://sources.freertr.org/cfg/p4lang-crypt132.tst;p4lang-crypt132.tst;success;p4lang: packout on macsec qinq port
http://sources.freertr.org/cfg/p4lang-crypt133.tst;p4lang-crypt133.tst;success;p4lang: macsec with static key
http://sources.freertr.org/cfg/p4lang-crypt134.tst;p4lang-crypt134.tst;success;p4lang: ipsec with aes128gcm
http://sources.freertr.org/cfg/p4lang-crypt135.tst;p4lang-crypt135.tst;success;p4lang: ipsec with aes192gcm
Expand Down
8 changes: 4 additions & 4 deletions src/rtr8.ftr
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,9 @@ qc pass: p4lang: sgt over l2tp3
qc pass: p4lang: macsec over tmux
qc pass: p4lang: sgt over tmux
qc pass: p4lang: packout on port
failed: p4lang: packout on vlan port
qc pass: p4lang: packout on vlan port
qc pass: p4lang: packout on macsec port
failed: p4lang: packout on macsec vlan port
qc pass: p4lang: packout on macsec vlan port
qc pass: p4lang: ipsec with packout
qc pass: p4lang: openvpn with packout
qc pass: p4lang: wireguard with packout
Expand All @@ -258,8 +258,8 @@ qc pass: p4lang: sgt over qinq
qc pass: p4lang: sgt over macsec over qinq
qc pass: p4lang: sgt qinq ingress access list
qc pass: p4lang: sgt qinq egress access list
failed: p4lang: packout on qinq port
failed: p4lang: packout on macsec qinq port
qc pass: p4lang: packout on qinq port
qc pass: p4lang: packout on macsec qinq port
qc pass: p4lang: macsec with static key
qc pass: p4lang: ipsec with aes128gcm
qc pass: p4lang: ipsec with aes192gcm
Expand Down
10 changes: 5 additions & 5 deletions 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 v24.12.31-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2024-12-31 10:25:10, took 00:14:31, with 50 workers, on 674 cases, 4 failed, 0 traces, 50 retries<br/>
tested: 2024-12-31 10:58:51, took 00:09:54, with 50 workers, on 674 cases, 0 failed, 0 traces, 0 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 Expand Up @@ -257,9 +257,9 @@
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt111.tst">p4lang-crypt111.tst</a></td><td>success</td><td>p4lang: macsec over tmux</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt112.tst">p4lang-crypt112.tst</a></td><td>success</td><td>p4lang: sgt over tmux</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt113.tst">p4lang-crypt113.tst</a></td><td>success</td><td>p4lang: packout on port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt114.tst">p4lang-crypt114.tst</a></td><td>#6-run-r1 tping 100 10 1.1.1.2 vrf v1</td><td>p4lang: packout on vlan port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt114.tst">p4lang-crypt114.tst</a></td><td>success</td><td>p4lang: packout on vlan port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt115.tst">p4lang-crypt115.tst</a></td><td>success</td><td>p4lang: packout on macsec port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt116.tst">p4lang-crypt116.tst</a></td><td>#6-run-r1 tping 100 10 1.1.1.2 vrf v1</td><td>p4lang: packout on macsec vlan port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt116.tst">p4lang-crypt116.tst</a></td><td>success</td><td>p4lang: packout on macsec vlan port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt117.tst">p4lang-crypt117.tst</a></td><td>success</td><td>p4lang: ipsec with packout</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt118.tst">p4lang-crypt118.tst</a></td><td>success</td><td>p4lang: openvpn with packout</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt119.tst">p4lang-crypt119.tst</a></td><td>success</td><td>p4lang: wireguard with packout</td></tr>
Expand All @@ -274,8 +274,8 @@
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt128.tst">p4lang-crypt128.tst</a></td><td>success</td><td>p4lang: sgt over macsec over qinq</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt129.tst">p4lang-crypt129.tst</a></td><td>success</td><td>p4lang: sgt qinq ingress access list</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt130.tst">p4lang-crypt130.tst</a></td><td>success</td><td>p4lang: sgt qinq egress access list</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt131.tst">p4lang-crypt131.tst</a></td><td>#6-run-r1 tping 100 10 1.1.1.2 vrf v1</td><td>p4lang: packout on qinq port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt132.tst">p4lang-crypt132.tst</a></td><td>#6-run-r1 tping 100 10 1.1.1.2 vrf v1</td><td>p4lang: packout on macsec qinq port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt131.tst">p4lang-crypt131.tst</a></td><td>success</td><td>p4lang: packout on qinq port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt132.tst">p4lang-crypt132.tst</a></td><td>success</td><td>p4lang: packout on macsec qinq port</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt133.tst">p4lang-crypt133.tst</a></td><td>success</td><td>p4lang: macsec with static key</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt134.tst">p4lang-crypt134.tst</a></td><td>success</td><td>p4lang: ipsec with aes128gcm</td></tr>
<tr><td><a href="http://sources.freertr.org/cfg/p4lang-crypt135.tst">p4lang-crypt135.tst</a></td><td>success</td><td>p4lang: ipsec with aes192gcm</td></tr>
Expand Down

0 comments on commit 4145590

Please sign in to comment.