mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #399 from DrDoof/fix/lag-cli-and-gui
lag: fix the web page's group numbering, and the command's syntax line
This commit is contained in:
3 files changed
+13
-8
No files matched your search
+7
-4
@@ -395,7 +395,7 @@ void parse_lag(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if (cmd_words_len < 2)
|
||||
if (cmd_words_len < 3)
|
||||
goto err;
|
||||
|
||||
// Parse group, expect only one number 0-9;
|
||||
@@ -406,10 +406,13 @@ void parse_lag(void)
|
||||
if (group > 3)
|
||||
goto err;
|
||||
|
||||
if (cmd_compare(2, "d")) {
|
||||
port_lag_members_set(group, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t w = 2;
|
||||
while (w < cmd_words_len) {
|
||||
// write_char('|'); print_byte(w); write_char(':'); write_char(cmd_buffer[cmd_words_b[w]]); write_char('-');
|
||||
|
||||
// Parse port.
|
||||
if (cmd_parse_port_separator(cmd_words_b[w++]) == 0)
|
||||
goto err;
|
||||
@@ -419,7 +422,7 @@ void parse_lag(void)
|
||||
port_lag_members_set(group, members);
|
||||
return;
|
||||
err:
|
||||
print_string("Error: lag <1-4> [port]...\n");
|
||||
print_string("Error: lag (show | <1-4> (d | <port>...))\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,9 +48,11 @@ void port_lag_hash_set(__xdata uint8_t lag, __xdata uint8_t hash_bits) __banked;
|
||||
## LAG configuration on the Serial Console
|
||||
For testing the following commands are provided on the serial console:
|
||||
```
|
||||
> lag <LAG-ID> [p1] [p2]...
|
||||
Create or set a LAG. Trunk-ID is 1 or 2. Ports are physical ports
|
||||
If only the LAG-ID is given but no members, the LAG is deleted
|
||||
> lag <LAG-ID> <p1> [p2]...
|
||||
Create or set a LAG. LAG-ID is 1 to 4. Ports are physical ports.
|
||||
|
||||
> lag <LAG-ID> d
|
||||
Delete the LAG.
|
||||
|
||||
> lag show
|
||||
Shows information on all 4 lags
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ function fetchLag() {
|
||||
sendXHTTP(xhttp);
|
||||
}
|
||||
async function lagSub(l) {
|
||||
var cmd = "lag " + l;
|
||||
var cmd = "lag " + (l + 1);
|
||||
for (let i = 1; i <= numPorts; i++) {
|
||||
if (document.getElementById("p_mLAG"+l+"_"+i).checked)
|
||||
cmd = cmd + ` ${i}`;
|
||||
|
||||
Reference in new issue
Block a user