mptcp: fix warnings reported by checkpatch
Subsystems (2)
Matthieu Baerts
PATCH 1/1 mptcp: fix warnings reported by checkpatch
WARNING: line over 80 characters
#233: FILE: net/mptcp/options.c:47:
+ * negotiated, the receiver MUST close the subflow with a RST as it is
---
Notes:
to be squashed in "mptcp: Handle MPTCP TCP options"
net/mptcp/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/mptcp/options.c +2 -2
@@ -44,8 +44,8 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,* * Section 3.3.0: * "If a checksum is not present when its use has been -* negotiated, the receiver MUST close the subflow with a RST as it is -* considered broken." +* negotiated, the receiver MUST close the subflow with a RST as +* it is considered broken." * * We don't implement DSS checksum - fall back to TCP. */
Signature · 1 line
2.20.1
Matthieu Baerts
PATCH 1/1 mptcp: fix warnings reported by checkpatch
WARNING: 'thi' may be misspelled - perhaps 'the'?
#77: FILE: net/mptcp/ctrl.c:38:
+ /* users with CAP_NET_ADMIN or root (not and) can change thi
---
Notes:
to be squashed in "mptcp: new sysctl to control the activation per NS"
net/mptcp/ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/mptcp/ctrl.c +1 -1
@@ -35,7 +35,7 @@ static struct ctl_table mptcp_sysctl_table[] = { .procname = "enabled", .maxlen = sizeof(int), .mode = 0644, -/* users with CAP_NET_ADMIN or root (not and) can change thi +/* users with CAP_NET_ADMIN or root (not and) can change this * value, same as other sysctl or the 'net' tree. */ .proc_handler = proc_dointvec,
Signature · 1 line
2.20.1
Matthieu Baerts
PATCH 1/1 mptcp: fix warnings reported by checkpatch
In reply to Matthieu BaertsWARNING: 'regarless' may be misspelled - perhaps 'regardless'? #13:
Note that now we need to call __mptcp_init_sock() regarless of mptcp
---
Notes:
to be squashed in "mptcp: queue data for mptcp level retransmission"
.topmsg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
.topmsg +1 -1
@@ -10,7 +10,7 @@ the current page fragment can always host an MPTCP rtx queue entry. The MPTCP rtx queue is flushed at disconnect() and close() time -Note that now we need to call __mptcp_init_sock() regarless of mptcp +Note that now we need to call __mptcp_init_sock() regardless of mptcp enable status, as the destructor will try to walk the rtx_queue. Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
Signature · 1 line
2.20.1
Matthieu Baerts
PATCH 1/1 mptcp: fix warnings reported by checkpatch
In reply to Matthieu BaertsWARNING: Improper SPDX comment style for 'net/mptcp/mib.c', please use '//' instead +/* SPDX-License-Identifier: GPL-2.0-or-later */
WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 +/* SPDX-License-Identifier: GPL-2.0-or-later */
WARNING: line over 80 characters
+ SNMP_MIB_ITEM("MPCapableFallbackACK", MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK),
WARNING: line over 80 characters
+ SNMP_MIB_ITEM("MPCapableFallbackSYNACK", MPTCP_MIB_MPCAPABLEACTIVEFALLBACK),
WARNING: line over 80 characters
+ MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK,/* Server-side fallback during 3-way handshake */
WARNING: line over 80 characters
+ MPTCP_MIB_MPCAPABLEACTIVEFALLBACK, /* Client-side fallback during 3-way handshake */
WARNING: line over 80 characters
+ MPTCP_MIB_RETRANSSEGS, /* Segments retransmitted at the MPTCP-level */
WARNING: line over 80 characters
+ MPTCP_MIB_JOINNOTOKEN, /* Received MP_JOIN but the token was not found */
WARNING: line over 80 characters
+ MPTCP_MIB_DSSNOMATCH, /* Received a new mapping that did not match the previous one */
---
Notes:
to be squashed in "mptcp: add MIB counter infrastructure"
net/mptcp/mib.c | 32 +++++++++++++++++++++----------- net/mptcp/mib.h | 30 ++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 21 deletions(-)
net/mptcp/mib.c +21 -11
@@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ +// SPDX-License-Identifier: GPL-2.0-or-later #include <linux/seq_file.h> #include <net/ip.h>
@@ -9,16 +9,26 @@#include "mib.h" static const struct snmp_mib mptcp_snmp_list[] = { -SNMP_MIB_ITEM ("MPCapableSYNRX" ,MPTCP_MIB_MPCAPABLEPASSIVE ), -SNMP_MIB_ITEM ("MPCapableACKRX" ,MPTCP_MIB_MPCAPABLEPASSIVEACK ), -SNMP_MIB_ITEM ("MPCapableFallbackACK" ,MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK ), -SNMP_MIB_ITEM ("MPCapableFallbackSYNACK" ,MPTCP_MIB_MPCAPABLEACTIVEFALLBACK ), -SNMP_MIB_ITEM ("MPTCPRetrans" ,MPTCP_MIB_RETRANSSEGS ), -SNMP_MIB_ITEM ("MPJoinNoTokenFound" ,MPTCP_MIB_JOINNOTOKEN ), -SNMP_MIB_ITEM ("MPJoinSynRx" ,MPTCP_MIB_JOINSYNRX ), -SNMP_MIB_ITEM ("MPJoinAckHMacFailure" ,MPTCP_MIB_JOINACKMAC ), -SNMP_MIB_ITEM ("DSSNotMatching" ,MPTCP_MIB_DSSNOMATCH ), -SNMP_MIB_ITEM ("InfiniteMapRx" ,MPTCP_MIB_INFINITEMAPRX ), +SNMP_MIB_ITEM ("MPCapableSYNRX" , +MPTCP_MIB_MPCAPABLEPASSIVE ), +SNMP_MIB_ITEM ("MPCapableACKRX" , +MPTCP_MIB_MPCAPABLEPASSIVEACK ), +SNMP_MIB_ITEM ("MPCapableFallbackACK" , +MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK ), +SNMP_MIB_ITEM ("MPCapableFallbackSYNACK" , +MPTCP_MIB_MPCAPABLEACTIVEFALLBACK ), +SNMP_MIB_ITEM ("MPTCPRetrans" , +MPTCP_MIB_RETRANSSEGS ), +SNMP_MIB_ITEM ("MPJoinNoTokenFound" , +MPTCP_MIB_JOINNOTOKEN ), +SNMP_MIB_ITEM ("MPJoinSynRx" , +MPTCP_MIB_JOINSYNRX ), +SNMP_MIB_ITEM ("MPJoinAckHMacFailure" , +MPTCP_MIB_JOINACKMAC ), +SNMP_MIB_ITEM ("DSSNotMatching" , +MPTCP_MIB_DSSNOMATCH ), +SNMP_MIB_ITEM ("InfiniteMapRx" , +MPTCP_MIB_INFINITEMAPRX ),SNMP_MIB_SENTINEL };
net/mptcp/mib.h +20 -10
@@ -2,16 +2,26 @@enum linux_mptcp_mib_field {MPTCP_MIB_NUM =0 , -MPTCP_MIB_MPCAPABLEPASSIVE ,/* Received SYN with MP_CAPABLE */ -MPTCP_MIB_MPCAPABLEPASSIVEACK ,/* Received third ACK with MP_CAPABLE */ -MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK ,/* Server-side fallback during 3-way handshake */ -MPTCP_MIB_MPCAPABLEACTIVEFALLBACK ,/* Client-side fallback during 3-way handshake */ -MPTCP_MIB_RETRANSSEGS ,/* Segments retransmitted at the MPTCP-level */ -MPTCP_MIB_JOINNOTOKEN ,/* Received MP_JOIN but the token was not found */ -MPTCP_MIB_JOINSYNRX ,/* Received a SYN + MP_JOIN */ -MPTCP_MIB_JOINACKMAC ,/* HMAC was wrong on ACK + MP_JOIN */ -MPTCP_MIB_DSSNOMATCH ,/* Received a new mapping that did not match the previous one */ -MPTCP_MIB_INFINITEMAPRX ,/* Received an infinite mapping */ +/* Received SYN with MP_CAPABLE */ +MPTCP_MIB_MPCAPABLEPASSIVE , +/* Received third ACK with MP_CAPABLE */ +MPTCP_MIB_MPCAPABLEPASSIVEACK , +/* Server-side fallback during 3-way handshake */ +MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK , +/* Client-side fallback during 3-way handshake */ +MPTCP_MIB_MPCAPABLEACTIVEFALLBACK , +/* Segments retransmitted at the MPTCP-level */ +MPTCP_MIB_RETRANSSEGS , +/* Received MP_JOIN but the token was not found */ +MPTCP_MIB_JOINNOTOKEN , +/* Received a SYN + MP_JOIN */ +MPTCP_MIB_JOINSYNRX , +/* HMAC was wrong on ACK + MP_JOIN */ +MPTCP_MIB_JOINACKMAC , +/* Received a new mapping that did not match the previous one */ +MPTCP_MIB_DSSNOMATCH , +/* Received an infinite mapping */ +MPTCP_MIB_INFINITEMAPRX , __MPTCP_MIB_MAX };
Signature · 1 line
2.20.1
Matthieu Baerts
PATCH 1/1 mptcp: fix warnings reported by checkpatch
In reply to Matthieu BaertsWARNING: line over 80 characters
#60: FILE: net/mptcp/protocol.c:1010:
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK);
WARNING: line over 80 characters
#69: FILE: net/mptcp/protocol.c:1163:
+ MPTCP_INC_STATS(sock_net(sk), MPTCP_MIB_MPCAPABLEACTIVEFALLBACK);
---
Notes:
to be squashed in "mptcp: increment MIB counters in a few places"
net/mptcp/protocol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/mptcp/protocol.c +4 -2
@@ -1007,7 +1007,8 @@ static struct sock *mptcp_accept(struct sock *sk, int flags, int *err, new_sock->sk =NULL ;sock_release (new_sock); -MPTCP_INC_STATS (sock_net (sk),MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK ); +MPTCP_INC_STATS (sock_net (sk), +MPTCP_MIB_MPCAPABLEPASSIVEFALLBACK ); }return newsk;
@@ -1160,7 +1161,8 @@ void mptcp_finish_connect(struct sock *sk, int mp_capable)bh_unlock_sock (sk);local_bh_enable (); }else { -MPTCP_INC_STATS (sock_net (sk),MPTCP_MIB_MPCAPABLEACTIVEFALLBACK ); +MPTCP_INC_STATS (sock_net (sk), +MPTCP_MIB_MPCAPABLEACTIVEFALLBACK ); }inet_sk_state_store (sk,TCP_ESTABLISHED ); }
Signature · 1 line
2.20.1
Paolo Abeni
Hi,
Quoted 18 lines · Matthieu Baerts
WARNING: line over 80 characters
#233: FILE:net/mptcp/options.c:47:
+ * negotiated, the receiver MUST close the subflow with a RST as it isSigned-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>---
Notes:
to be squashed in "mptcp: Handle MPTCP TCP options"net/mptcp/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)net/mptcp/options.c +0
-0
net/mptcp/options.c void mptcp_parse_option(const unsigned char *ptr, int opsize, · line 51
Quoted 10 lines
net/mptcp/options.c +2
-2@@ -44,8 +44,8 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,* * Section 3.3.0: * "If a checksum is not present when its use has been -* negotiated, the receiver MUST close the subflow with a RST as it is -* considered broken." +* negotiated, the receiver MUST close the subflow with a RST as +* it is considered broken." * * We don't implement DSS checksum - fall back to TCP. */
This one and the next 2 patches are IMHO uncontroversially good, but the 4th is a bit against my personal taste - I would keep the checkpatch offenders instead;). No objections on the 5th patch.
Cheers,
Paolo
Matthieu Baerts
Hi Paolo,
+cc Florian
Thank you for the reviews!
Quoted 27 lines · Paolo Abeni
Hi,
Quoted 24 lines · Matthieu Baerts
WARNING: line over 80 characters
#233: FILE:net/mptcp/options.c:47:
+ * negotiated, the receiver MUST close the subflow with a RST as it isSigned-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>---
Notes:
to be squashed in "mptcp: Handle MPTCP TCP options"net/mptcp/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)net/mptcp/options.c +1
-2@@ -44,8 +44,8 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,* * Section 3.3.0: * "If a checksum is not present when its use has been -* negotiated, the receiver MUST close the subflow with a RST as it is -* considered broken." +* negotiated, the receiver MUST close the subflow with a RST as
Quoted 8 lines
net/mptcp/options.c void mptcp_parse_option(const unsigned char *ptr, int opsize, · line 51
Quoted 4 lines
net/mptcp/options.c +1
-0+* it is considered broken." * * We don't implement DSS checksum - fall back to TCP. */ This one and the next 2 patches are IMHO uncontroversially good, but the 4th is a bit against my personal taste - I would keep the checkpatch offenders instead;). No objections on the 5th patch.
I am fine to drop the 4th one. Florian mentioned earlier that it is better to fix checkpatch issues than having comments about that during the reviews or dedicated patches later to fix just that. But because Florian wrote this code (mptcp_snmp_list + linux_mptcp_mib_field), I guess he is also fine not to follow checkpatch rules :)
I am going to apply the other patches, they are not linked to each others.
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium
Matthieu Baerts
Hi Paolo,
Quoted 47 lines · Matthieu Baerts
Hi Paolo,
+cc Florian
Thank you for the reviews!
Quoted 31 lines · Paolo Abeni
Hi,
Quoted 28 lines · Matthieu Baerts
WARNING: line over 80 characters
#233: FILE:net/mptcp/options.c:47:
+ * negotiated, the receiver MUST close the subflow with a RST as it isSigned-off-by Matthieu Baerts <matthieu.baerts(a)tessares.net>---
Notes:
to be squashed in "mptcp: Handle MPTCP TCP options"
net/mptcp/options.c| 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)net/mptcp/options.c +0
-1@@ -44,8 +44,8 @@ void mptcp_parse_option(const unsigned char *ptr,int opsize, * * Section 3.3.0: * "If a checksum is not present when its use has been - * negotiated, the receiver MUST close the subflow with aRST as it is
- * considered broken."
+ * negotiated, the receiver MUST close the subflow with a RST asQuoted 8 lines
Quoted 4 lines
+ * it is considered broken."
*
* We don't implement DSS checksum - fall back to TCP. */This one and the next 2 patches are IMHO uncontroversially good, but the 4th is a bit against my personal taste - I would keep the checkpatch offenders instead;). No objections on the 5th patch.
Quoted 7 lines
I am fine to drop the 4th one. Florian mentioned earlier that it is better to fix checkpatch issues than having comments about that during the reviews or dedicated patches later to fix just that. But because Florian wrote this code (
mptcp_snmp_list+linux_mptcp_mib_field), I guess he is also fine not to follow checkpatch rules :)I am going to apply the other patches, they are not linked to each others.
- ca0aa2a7167f "squashed" patch 1/5 in "mptcp: Handle MPTCP TCP options"
- 6d74ebddfb37 "squashed" patch 2/5 in "mptcp: new sysctl to control the activation per NS"
- ce91edef4344 "squashed" patch 3/5 in "mptcp: queue data for mptcp level retransmission"
- patch 4/5 is not applied
- 2236d77c0c5f: "squashed" patch 5/5 in "mptcp: increment MIB counters in a few places"
- 6f951dc4ca1b..4c046ac001b8: result
Cheers,
Matt
Signature · 5 lines
Matthieu Baerts | R&D Engineer matthieu.baerts(a)tessares.net Tessares SA | Hybrid Access Solutions www.tessares.net 1 Avenue Jean Monnet, 1348 Louvain-la-Neuve, Belgium