mbox series

[v6,0/4] slirp: Add query-usernet QMP command

Message ID 20180504074207.22634-1-famz@redhat.com
Headers show
Series slirp: Add query-usernet QMP command | expand

Message

Fam Zheng May 4, 2018, 7:42 a.m. UTC
v6: Rename QAPI enum: TCPS -> UsernetTcpState. [Daniel]

v5: Fix QAPI example in comments. [Eric]
v4: vlan -> hub. [Samuel]
    Free 'info. [Samuel]

v3: - Add Eric's rev-by to patch 2.
    - Address Eric's comments on patch 1:
      * Fix spell/grammar: "programmed", "awaiting".
      * Fix include "qapi/qapi-commands-net.h".
      * Underscores to dashes.
      * "Since 2.13" now.

v2: Fix compiler error. [patchew]

The command is a counterpart of HMP "info usernet" and is at least very useful
for the VM tests. So add it.

Fam Zheng (4):
  qapi: Introduce UsernetTcpState
  slirp: Use QAPI enum to replace TCPS_* macros
  slirp: Add "query-usernet" QMP command
  tests: Use query-usernet instead of 'info usernet'

 net/slirp.c        |  26 +++++++
 qapi/net.json      | 214 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 slirp/libslirp.h   |   2 +
 slirp/misc.c       | 159 ++++++++++++++++++++++++++++-----------
 slirp/tcp.h        |  21 +-----
 slirp/tcp_input.c  | 103 +++++++++++++-------------
 slirp/tcp_subr.c   |  25 ++++---
 slirp/tcp_timer.c  |   7 +-
 tests/vm/basevm.py |  14 ++--
 9 files changed, 435 insertions(+), 136 deletions(-)

Comments

no-reply@patchew.org May 4, 2018, 7:49 a.m. UTC | #1
Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20180504074207.22634-1-famz@redhat.com
Subject: [Qemu-devel] [PATCH v6 0/4] slirp: Add query-usernet QMP command

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]               patchew/20180504074207.22634-1-famz@redhat.com -> patchew/20180504074207.22634-1-famz@redhat.com
Switched to a new branch 'test'
c08e6e3a7f tests: Use query-usernet instead of 'info usernet'
c493a69267 slirp: Add "query-usernet" QMP command
5150e445b4 slirp: Use QAPI enum to replace TCPS_* macros
0f3b1a240b qapi: Introduce UsernetTcpState

=== OUTPUT BEGIN ===
Checking PATCH 1/4: qapi: Introduce UsernetTcpState...
Checking PATCH 2/4: slirp: Use QAPI enum to replace TCPS_* macros...
ERROR: code indent should never use tabs
#112: FILE: slirp/tcp_input.c:88:
+^I    (tp)->t_state == USERNET_TCP_STATE_ESTABLISHED) { \$

ERROR: code indent should never use tabs
#121: FILE: slirp/tcp_input.c:193:
+^Iif (tp->t_state == USERNET_TCP_STATE_SYN_RECEIVED && ti->ti_len)$

ERROR: code indent should never use tabs
#130: FILE: slirp/tcp_input.c:460:
+^I  tp->t_state = USERNET_TCP_STATE_LISTEN;$

ERROR: code indent should never use tabs
#139: FILE: slirp/tcp_input.c:476:
+^Iif (tp->t_state == USERNET_TCP_STATE_CLOSED)$

ERROR: braces {} are necessary for all arms of this statement
#139: FILE: slirp/tcp_input.c:476:
+	if (tp->t_state == USERNET_TCP_STATE_CLOSED)
[...]

ERROR: code indent should never use tabs
#148: FILE: slirp/tcp_input.c:495:
+^Iif (optp && tp->t_state != USERNET_TCP_STATE_LISTEN)$

ERROR: braces {} are necessary for all arms of this statement
#148: FILE: slirp/tcp_input.c:495:
+	if (optp && tp->t_state != USERNET_TCP_STATE_LISTEN)
[...]

ERROR: code indent should never use tabs
#157: FILE: slirp/tcp_input.c:516:
+^Iif (tp->t_state == USERNET_TCP_STATE_ESTABLISHED &&$

ERROR: code indent should never use tabs
#166: FILE: slirp/tcp_input.c:618:
+^Icase USERNET_TCP_STATE_LISTEN: {$

ERROR: code indent should never use tabs
#175: FILE: slirp/tcp_input.c:729:
+^I    tp->t_state = USERNET_TCP_STATE_SYN_RECEIVED;$

ERROR: code indent should never use tabs
#184: FILE: slirp/tcp_input.c:763:
+^I  tp->t_state = USERNET_TCP_STATE_SYN_RECEIVED;$

ERROR: code indent should never use tabs
#188: FILE: slirp/tcp_input.c:766:
+^I} /* case USERNET_TCP_STATE_LISTEN */$

ERROR: code indent should never use tabs
#197: FILE: slirp/tcp_input.c:780:
+^Icase USERNET_TCP_STATE_SYN_SENT:$

ERROR: code indent should never use tabs
#206: FILE: slirp/tcp_input.c:807:
+^I^I^Itp->t_state = USERNET_TCP_STATE_ESTABLISHED;$

ERROR: code indent should never use tabs
#215: FILE: slirp/tcp_input.c:818:
+^I^I^Itp->t_state = USERNET_TCP_STATE_SYN_RECEIVED;$

ERROR: code indent should never use tabs
#224: FILE: slirp/tcp_input.c:888:
+^I    tp->t_state > USERNET_TCP_STATE_CLOSE_WAIT && ti->ti_len) {$

ERROR: code indent should never use tabs
#233: FILE: slirp/tcp_input.c:907:
+^I^I^I    tp->t_state == USERNET_TCP_STATE_TIME_WAIT &&$

ERROR: code indent should never use tabs
#247: FILE: slirp/tcp_input.c:943:
+^Icase USERNET_TCP_STATE_SYN_RECEIVED:$

ERROR: code indent should never use tabs
#248: FILE: slirp/tcp_input.c:944:
+^Icase USERNET_TCP_STATE_ESTABLISHED:$

ERROR: code indent should never use tabs
#249: FILE: slirp/tcp_input.c:945:
+^Icase USERNET_TCP_STATE_FIN_WAIT_1:$

ERROR: code indent should never use tabs
#250: FILE: slirp/tcp_input.c:946:
+^Icase USERNET_TCP_STATE_FIN_WAIT_2:$

ERROR: code indent should never use tabs
#251: FILE: slirp/tcp_input.c:947:
+^Icase USERNET_TCP_STATE_CLOSE_WAIT:$

ERROR: code indent should never use tabs
#252: FILE: slirp/tcp_input.c:948:
+^I^Itp->t_state = USERNET_TCP_STATE_CLOSED;$

ERROR: code indent should never use tabs
#259: FILE: slirp/tcp_input.c:952:
+^Icase USERNET_TCP_STATE_CLOSING:$

ERROR: code indent should never use tabs
#260: FILE: slirp/tcp_input.c:953:
+^Icase USERNET_TCP_STATE_LAST_ACK:$

ERROR: code indent should never use tabs
#261: FILE: slirp/tcp_input.c:954:
+^Icase USERNET_TCP_STATE_TIME_WAIT:$

ERROR: code indent should never use tabs
#270: FILE: slirp/tcp_input.c:982:
+^Icase USERNET_TCP_STATE_SYN_RECEIVED:$

ERROR: code indent should never use tabs
#276: FILE: slirp/tcp_input.c:987:
+^I^Itp->t_state = USERNET_TCP_STATE_ESTABLISHED;$

ERROR: code indent should never use tabs
#285: FILE: slirp/tcp_input.c:1007:
+^I^I    tp->t_state = USERNET_TCP_STATE_FIN_WAIT_1;$

ERROR: code indent should never use tabs
#300: FILE: slirp/tcp_input.c:1027:
+^Icase USERNET_TCP_STATE_ESTABLISHED:$

ERROR: code indent should never use tabs
#301: FILE: slirp/tcp_input.c:1028:
+^Icase USERNET_TCP_STATE_FIN_WAIT_1:$

ERROR: code indent should never use tabs
#302: FILE: slirp/tcp_input.c:1029:
+^Icase USERNET_TCP_STATE_FIN_WAIT_2:$

ERROR: code indent should never use tabs
#303: FILE: slirp/tcp_input.c:1030:
+^Icase USERNET_TCP_STATE_CLOSE_WAIT:$

ERROR: code indent should never use tabs
#304: FILE: slirp/tcp_input.c:1031:
+^Icase USERNET_TCP_STATE_CLOSING:$

ERROR: code indent should never use tabs
#305: FILE: slirp/tcp_input.c:1032:
+^Icase USERNET_TCP_STATE_LAST_ACK:$

ERROR: code indent should never use tabs
#306: FILE: slirp/tcp_input.c:1033:
+^Icase USERNET_TCP_STATE_TIME_WAIT:$

ERROR: code indent should never use tabs
#315: FILE: slirp/tcp_input.c:1164:
+^I^Icase USERNET_TCP_STATE_FIN_WAIT_1:$

ERROR: code indent should never use tabs
#324: FILE: slirp/tcp_input.c:1176:
+^I^I^I^Itp->t_state = USERNET_TCP_STATE_FIN_WAIT_2;$

ERROR: code indent should never use tabs
#333: FILE: slirp/tcp_input.c:1186:
+^I^Icase USERNET_TCP_STATE_CLOSING:$

ERROR: code indent should never use tabs
#336: FILE: slirp/tcp_input.c:1188:
+^I^I^I^Itp->t_state = USERNET_TCP_STATE_TIME_WAIT;$

ERROR: code indent should never use tabs
#345: FILE: slirp/tcp_input.c:1200:
+^I^Icase USERNET_TCP_STATE_LAST_ACK:$

ERROR: code indent should never use tabs
#354: FILE: slirp/tcp_input.c:1212:
+^I^Icase USERNET_TCP_STATE_TIME_WAIT:$

WARNING: line over 80 characters
#363: FILE: slirp/tcp_input.c:1320:
+			 * will got to USERNET_TCP_STATE_LAST_ACK, and use tcp_output()

ERROR: code indent should never use tabs
#363: FILE: slirp/tcp_input.c:1320:
+^I^I^I * will got to USERNET_TCP_STATE_LAST_ACK, and use tcp_output()$

ERROR: code indent should never use tabs
#373: FILE: slirp/tcp_input.c:1334:
+^I^Icase USERNET_TCP_STATE_SYN_RECEIVED:$

ERROR: code indent should never use tabs
#374: FILE: slirp/tcp_input.c:1335:
+^I^Icase USERNET_TCP_STATE_ESTABLISHED:$

ERROR: code indent should never use tabs
#377: FILE: slirp/tcp_input.c:1337:
+^I^I    tp->t_state = USERNET_TCP_STATE_LAST_ACK;$

ERROR: code indent should never use tabs
#380: FILE: slirp/tcp_input.c:1339:
+^I^I    tp->t_state = USERNET_TCP_STATE_CLOSE_WAIT;$

ERROR: code indent should never use tabs
#389: FILE: slirp/tcp_input.c:1346:
+^I^Icase USERNET_TCP_STATE_FIN_WAIT_1:$

ERROR: code indent should never use tabs
#390: FILE: slirp/tcp_input.c:1347:
+^I^I^Itp->t_state = USERNET_TCP_STATE_CLOSING;$

ERROR: code indent should never use tabs
#400: FILE: slirp/tcp_input.c:1355:
+^I^Icase USERNET_TCP_STATE_FIN_WAIT_2:$

ERROR: code indent should never use tabs
#401: FILE: slirp/tcp_input.c:1356:
+^I^I^Itp->t_state = USERNET_TCP_STATE_TIME_WAIT;$

ERROR: code indent should never use tabs
#410: FILE: slirp/tcp_input.c:1364:
+^I^Icase USERNET_TCP_STATE_TIME_WAIT:$

ERROR: code indent should never use tabs
#431: FILE: slirp/tcp_subr.c:286:
+^Itp->t_state = USERNET_TCP_STATE_CLOSED;$

ERROR: code indent should never use tabs
#440: FILE: slirp/tcp_subr.c:305:
+^I^Itp->t_state = USERNET_TCP_STATE_CLOSED;$

ERROR: code indent should never use tabs
#452: FILE: slirp/tcp_subr.c:375:
+^Icase USERNET_TCP_STATE_CLOSED:$

ERROR: code indent should never use tabs
#453: FILE: slirp/tcp_subr.c:376:
+^Icase USERNET_TCP_STATE_LISTEN:$

ERROR: code indent should never use tabs
#454: FILE: slirp/tcp_subr.c:377:
+^Icase USERNET_TCP_STATE_SYN_SENT:$

ERROR: code indent should never use tabs
#455: FILE: slirp/tcp_subr.c:378:
+^I^Itp->t_state = USERNET_TCP_STATE_CLOSED;$

ERROR: code indent should never use tabs
#462: FILE: slirp/tcp_subr.c:382:
+^Icase USERNET_TCP_STATE_SYN_RECEIVED:$

ERROR: code indent should never use tabs
#463: FILE: slirp/tcp_subr.c:383:
+^Icase USERNET_TCP_STATE_ESTABLISHED:$

ERROR: code indent should never use tabs
#464: FILE: slirp/tcp_subr.c:384:
+^I^Itp->t_state = USERNET_TCP_STATE_FIN_WAIT_1;$

ERROR: code indent should never use tabs
#469: FILE: slirp/tcp_subr.c:387:
+^Icase USERNET_TCP_STATE_CLOSE_WAIT:$

ERROR: code indent should never use tabs
#470: FILE: slirp/tcp_subr.c:388:
+^I^Itp->t_state = USERNET_TCP_STATE_LAST_ACK;$

ERROR: code indent should never use tabs
#500: FILE: slirp/tcp_timer.c:139:
+^I^Iif (tp->t_state != USERNET_TCP_STATE_TIME_WAIT &&$

ERROR: code indent should never use tabs
#509: FILE: slirp/tcp_timer.c:263:
+^I^Iif (tp->t_state < USERNET_TCP_STATE_ESTABLISHED)$

WARNING: line over 80 characters
#513: FILE: slirp/tcp_timer.c:266:
+		if ((SO_OPTIONS) && tp->t_state <= USERNET_TCP_STATE_CLOSE_WAIT) {

ERROR: code indent should never use tabs
#513: FILE: slirp/tcp_timer.c:266:
+^I^Iif ((SO_OPTIONS) && tp->t_state <= USERNET_TCP_STATE_CLOSE_WAIT) {$

total: 66 errors, 2 warnings, 444 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 3/4: slirp: Add "query-usernet" QMP command...
Checking PATCH 4/4: tests: Use query-usernet instead of 'info usernet'...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Fam Zheng May 8, 2018, 12:45 a.m. UTC | #2
On Fri, 05/04 00:49, no-reply@patchew.org wrote:
> Hi,
> 
> This series seems to have some coding style problems. See output below for
> more information:

Code indentation issues are due to the pre-existing style in the file and is
not changed by the patch.

Fam

> 
> Type: series
> Message-id: 20180504074207.22634-1-famz@redhat.com
> Subject: [Qemu-devel] [PATCH v6 0/4] slirp: Add query-usernet QMP command
> 
> === TEST SCRIPT BEGIN ===
> #!/bin/bash
> 
> BASE=base
> n=1
> total=$(git log --oneline $BASE.. | wc -l)
> failed=0
> 
> git config --local diff.renamelimit 0
> git config --local diff.renames True
> git config --local diff.algorithm histogram
> 
> commits="$(git log --format=%H --reverse $BASE..)"
> for c in $commits; do
>     echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
>     if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
>         failed=1
>         echo
>     fi
>     n=$((n+1))
> done
> 
> exit $failed
> === TEST SCRIPT END ===
> 
> Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
> From https://github.com/patchew-project/qemu
>  * [new tag]               patchew/20180504074207.22634-1-famz@redhat.com -> patchew/20180504074207.22634-1-famz@redhat.com
> Switched to a new branch 'test'
> c08e6e3a7f tests: Use query-usernet instead of 'info usernet'
> c493a69267 slirp: Add "query-usernet" QMP command
> 5150e445b4 slirp: Use QAPI enum to replace TCPS_* macros
> 0f3b1a240b qapi: Introduce UsernetTcpState
> 
> === OUTPUT BEGIN ===
> Checking PATCH 1/4: qapi: Introduce UsernetTcpState...
> Checking PATCH 2/4: slirp: Use QAPI enum to replace TCPS_* macros...
> ERROR: code indent should never use tabs
> #112: FILE: slirp/tcp_input.c:88:
> +^I    (tp)->t_state == USERNET_TCP_STATE_ESTABLISHED) { \$
> 
> ERROR: code indent should never use tabs
> #121: FILE: slirp/tcp_input.c:193:
> +^Iif (tp->t_state == USERNET_TCP_STATE_SYN_RECEIVED && ti->ti_len)$
> 
> ERROR: code indent should never use tabs
> #130: FILE: slirp/tcp_input.c:460:
> +^I  tp->t_state = USERNET_TCP_STATE_LISTEN;$
> 
> ERROR: code indent should never use tabs
> #139: FILE: slirp/tcp_input.c:476:
> +^Iif (tp->t_state == USERNET_TCP_STATE_CLOSED)$
> 
> ERROR: braces {} are necessary for all arms of this statement
> #139: FILE: slirp/tcp_input.c:476:
> +	if (tp->t_state == USERNET_TCP_STATE_CLOSED)
> [...]
> 
> ERROR: code indent should never use tabs
> #148: FILE: slirp/tcp_input.c:495:
> +^Iif (optp && tp->t_state != USERNET_TCP_STATE_LISTEN)$
> 
> ERROR: braces {} are necessary for all arms of this statement
> #148: FILE: slirp/tcp_input.c:495:
> +	if (optp && tp->t_state != USERNET_TCP_STATE_LISTEN)
> [...]
> 
> ERROR: code indent should never use tabs
> #157: FILE: slirp/tcp_input.c:516:
> +^Iif (tp->t_state == USERNET_TCP_STATE_ESTABLISHED &&$
> 
> ERROR: code indent should never use tabs
> #166: FILE: slirp/tcp_input.c:618:
> +^Icase USERNET_TCP_STATE_LISTEN: {$
> 
> ERROR: code indent should never use tabs
> #175: FILE: slirp/tcp_input.c:729:
> +^I    tp->t_state = USERNET_TCP_STATE_SYN_RECEIVED;$
> 
> ERROR: code indent should never use tabs
> #184: FILE: slirp/tcp_input.c:763:
> +^I  tp->t_state = USERNET_TCP_STATE_SYN_RECEIVED;$
> 
> ERROR: code indent should never use tabs
> #188: FILE: slirp/tcp_input.c:766:
> +^I} /* case USERNET_TCP_STATE_LISTEN */$
> 
> ERROR: code indent should never use tabs
> #197: FILE: slirp/tcp_input.c:780:
> +^Icase USERNET_TCP_STATE_SYN_SENT:$
> 
> ERROR: code indent should never use tabs
> #206: FILE: slirp/tcp_input.c:807:
> +^I^I^Itp->t_state = USERNET_TCP_STATE_ESTABLISHED;$
> 
> ERROR: code indent should never use tabs
> #215: FILE: slirp/tcp_input.c:818:
> +^I^I^Itp->t_state = USERNET_TCP_STATE_SYN_RECEIVED;$
> 
> ERROR: code indent should never use tabs
> #224: FILE: slirp/tcp_input.c:888:
> +^I    tp->t_state > USERNET_TCP_STATE_CLOSE_WAIT && ti->ti_len) {$
> 
> ERROR: code indent should never use tabs
> #233: FILE: slirp/tcp_input.c:907:
> +^I^I^I    tp->t_state == USERNET_TCP_STATE_TIME_WAIT &&$
> 
> ERROR: code indent should never use tabs
> #247: FILE: slirp/tcp_input.c:943:
> +^Icase USERNET_TCP_STATE_SYN_RECEIVED:$
> 
> ERROR: code indent should never use tabs
> #248: FILE: slirp/tcp_input.c:944:
> +^Icase USERNET_TCP_STATE_ESTABLISHED:$
> 
> ERROR: code indent should never use tabs
> #249: FILE: slirp/tcp_input.c:945:
> +^Icase USERNET_TCP_STATE_FIN_WAIT_1:$
> 
> ERROR: code indent should never use tabs
> #250: FILE: slirp/tcp_input.c:946:
> +^Icase USERNET_TCP_STATE_FIN_WAIT_2:$
> 
> ERROR: code indent should never use tabs
> #251: FILE: slirp/tcp_input.c:947:
> +^Icase USERNET_TCP_STATE_CLOSE_WAIT:$
> 
> ERROR: code indent should never use tabs
> #252: FILE: slirp/tcp_input.c:948:
> +^I^Itp->t_state = USERNET_TCP_STATE_CLOSED;$
> 
> ERROR: code indent should never use tabs
> #259: FILE: slirp/tcp_input.c:952:
> +^Icase USERNET_TCP_STATE_CLOSING:$
> 
> ERROR: code indent should never use tabs
> #260: FILE: slirp/tcp_input.c:953:
> +^Icase USERNET_TCP_STATE_LAST_ACK:$
> 
> ERROR: code indent should never use tabs
> #261: FILE: slirp/tcp_input.c:954:
> +^Icase USERNET_TCP_STATE_TIME_WAIT:$
> 
> ERROR: code indent should never use tabs
> #270: FILE: slirp/tcp_input.c:982:
> +^Icase USERNET_TCP_STATE_SYN_RECEIVED:$
> 
> ERROR: code indent should never use tabs
> #276: FILE: slirp/tcp_input.c:987:
> +^I^Itp->t_state = USERNET_TCP_STATE_ESTABLISHED;$
> 
> ERROR: code indent should never use tabs
> #285: FILE: slirp/tcp_input.c:1007:
> +^I^I    tp->t_state = USERNET_TCP_STATE_FIN_WAIT_1;$
> 
> ERROR: code indent should never use tabs
> #300: FILE: slirp/tcp_input.c:1027:
> +^Icase USERNET_TCP_STATE_ESTABLISHED:$
> 
> ERROR: code indent should never use tabs
> #301: FILE: slirp/tcp_input.c:1028:
> +^Icase USERNET_TCP_STATE_FIN_WAIT_1:$
> 
> ERROR: code indent should never use tabs
> #302: FILE: slirp/tcp_input.c:1029:
> +^Icase USERNET_TCP_STATE_FIN_WAIT_2:$
> 
> ERROR: code indent should never use tabs
> #303: FILE: slirp/tcp_input.c:1030:
> +^Icase USERNET_TCP_STATE_CLOSE_WAIT:$
> 
> ERROR: code indent should never use tabs
> #304: FILE: slirp/tcp_input.c:1031:
> +^Icase USERNET_TCP_STATE_CLOSING:$
> 
> ERROR: code indent should never use tabs
> #305: FILE: slirp/tcp_input.c:1032:
> +^Icase USERNET_TCP_STATE_LAST_ACK:$
> 
> ERROR: code indent should never use tabs
> #306: FILE: slirp/tcp_input.c:1033:
> +^Icase USERNET_TCP_STATE_TIME_WAIT:$
> 
> ERROR: code indent should never use tabs
> #315: FILE: slirp/tcp_input.c:1164:
> +^I^Icase USERNET_TCP_STATE_FIN_WAIT_1:$
> 
> ERROR: code indent should never use tabs
> #324: FILE: slirp/tcp_input.c:1176:
> +^I^I^I^Itp->t_state = USERNET_TCP_STATE_FIN_WAIT_2;$
> 
> ERROR: code indent should never use tabs
> #333: FILE: slirp/tcp_input.c:1186:
> +^I^Icase USERNET_TCP_STATE_CLOSING:$
> 
> ERROR: code indent should never use tabs
> #336: FILE: slirp/tcp_input.c:1188:
> +^I^I^I^Itp->t_state = USERNET_TCP_STATE_TIME_WAIT;$
> 
> ERROR: code indent should never use tabs
> #345: FILE: slirp/tcp_input.c:1200:
> +^I^Icase USERNET_TCP_STATE_LAST_ACK:$
> 
> ERROR: code indent should never use tabs
> #354: FILE: slirp/tcp_input.c:1212:
> +^I^Icase USERNET_TCP_STATE_TIME_WAIT:$
> 
> WARNING: line over 80 characters
> #363: FILE: slirp/tcp_input.c:1320:
> +			 * will got to USERNET_TCP_STATE_LAST_ACK, and use tcp_output()
> 
> ERROR: code indent should never use tabs
> #363: FILE: slirp/tcp_input.c:1320:
> +^I^I^I * will got to USERNET_TCP_STATE_LAST_ACK, and use tcp_output()$
> 
> ERROR: code indent should never use tabs
> #373: FILE: slirp/tcp_input.c:1334:
> +^I^Icase USERNET_TCP_STATE_SYN_RECEIVED:$
> 
> ERROR: code indent should never use tabs
> #374: FILE: slirp/tcp_input.c:1335:
> +^I^Icase USERNET_TCP_STATE_ESTABLISHED:$
> 
> ERROR: code indent should never use tabs
> #377: FILE: slirp/tcp_input.c:1337:
> +^I^I    tp->t_state = USERNET_TCP_STATE_LAST_ACK;$
> 
> ERROR: code indent should never use tabs
> #380: FILE: slirp/tcp_input.c:1339:
> +^I^I    tp->t_state = USERNET_TCP_STATE_CLOSE_WAIT;$
> 
> ERROR: code indent should never use tabs
> #389: FILE: slirp/tcp_input.c:1346:
> +^I^Icase USERNET_TCP_STATE_FIN_WAIT_1:$
> 
> ERROR: code indent should never use tabs
> #390: FILE: slirp/tcp_input.c:1347:
> +^I^I^Itp->t_state = USERNET_TCP_STATE_CLOSING;$
> 
> ERROR: code indent should never use tabs
> #400: FILE: slirp/tcp_input.c:1355:
> +^I^Icase USERNET_TCP_STATE_FIN_WAIT_2:$
> 
> ERROR: code indent should never use tabs
> #401: FILE: slirp/tcp_input.c:1356:
> +^I^I^Itp->t_state = USERNET_TCP_STATE_TIME_WAIT;$
> 
> ERROR: code indent should never use tabs
> #410: FILE: slirp/tcp_input.c:1364:
> +^I^Icase USERNET_TCP_STATE_TIME_WAIT:$
> 
> ERROR: code indent should never use tabs
> #431: FILE: slirp/tcp_subr.c:286:
> +^Itp->t_state = USERNET_TCP_STATE_CLOSED;$
> 
> ERROR: code indent should never use tabs
> #440: FILE: slirp/tcp_subr.c:305:
> +^I^Itp->t_state = USERNET_TCP_STATE_CLOSED;$
> 
> ERROR: code indent should never use tabs
> #452: FILE: slirp/tcp_subr.c:375:
> +^Icase USERNET_TCP_STATE_CLOSED:$
> 
> ERROR: code indent should never use tabs
> #453: FILE: slirp/tcp_subr.c:376:
> +^Icase USERNET_TCP_STATE_LISTEN:$
> 
> ERROR: code indent should never use tabs
> #454: FILE: slirp/tcp_subr.c:377:
> +^Icase USERNET_TCP_STATE_SYN_SENT:$
> 
> ERROR: code indent should never use tabs
> #455: FILE: slirp/tcp_subr.c:378:
> +^I^Itp->t_state = USERNET_TCP_STATE_CLOSED;$
> 
> ERROR: code indent should never use tabs
> #462: FILE: slirp/tcp_subr.c:382:
> +^Icase USERNET_TCP_STATE_SYN_RECEIVED:$
> 
> ERROR: code indent should never use tabs
> #463: FILE: slirp/tcp_subr.c:383:
> +^Icase USERNET_TCP_STATE_ESTABLISHED:$
> 
> ERROR: code indent should never use tabs
> #464: FILE: slirp/tcp_subr.c:384:
> +^I^Itp->t_state = USERNET_TCP_STATE_FIN_WAIT_1;$
> 
> ERROR: code indent should never use tabs
> #469: FILE: slirp/tcp_subr.c:387:
> +^Icase USERNET_TCP_STATE_CLOSE_WAIT:$
> 
> ERROR: code indent should never use tabs
> #470: FILE: slirp/tcp_subr.c:388:
> +^I^Itp->t_state = USERNET_TCP_STATE_LAST_ACK;$
> 
> ERROR: code indent should never use tabs
> #500: FILE: slirp/tcp_timer.c:139:
> +^I^Iif (tp->t_state != USERNET_TCP_STATE_TIME_WAIT &&$
> 
> ERROR: code indent should never use tabs
> #509: FILE: slirp/tcp_timer.c:263:
> +^I^Iif (tp->t_state < USERNET_TCP_STATE_ESTABLISHED)$
> 
> WARNING: line over 80 characters
> #513: FILE: slirp/tcp_timer.c:266:
> +		if ((SO_OPTIONS) && tp->t_state <= USERNET_TCP_STATE_CLOSE_WAIT) {
> 
> ERROR: code indent should never use tabs
> #513: FILE: slirp/tcp_timer.c:266:
> +^I^Iif ((SO_OPTIONS) && tp->t_state <= USERNET_TCP_STATE_CLOSE_WAIT) {$
> 
> total: 66 errors, 2 warnings, 444 lines checked
> 
> Your patch has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> 
> Checking PATCH 3/4: slirp: Add "query-usernet" QMP command...
> Checking PATCH 4/4: tests: Use query-usernet instead of 'info usernet'...
> === OUTPUT END ===
> 
> Test command exited with code: 1
> 
> 
> ---
> Email generated automatically by Patchew [http://patchew.org/].
> Please send your feedback to patchew-devel@redhat.com
Fam Zheng May 16, 2018, 2:30 a.m. UTC | #3
On Fri, 05/04 15:42, Fam Zheng wrote:
> v6: Rename QAPI enum: TCPS -> UsernetTcpState. [Daniel]

Ping?

Fam