All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH v2 1/2] mptcp: reduce number of pr_debug() calls.
@ 2019-06-11 17:51 Peter Krystad
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Krystad @ 2019-06-11 17:51 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]

squashto: Handle MPTCP TCP options

Signed-off-by: Peter Krystad <peter.krystad(a)linux.intel.com>
---
 net/mptcp/options.c | 30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/net/mptcp/options.c b/net/mptcp/options.c
index 1bee4a267fd8..a6ab6cef4a44 100644
--- a/net/mptcp/options.c
+++ b/net/mptcp/options.c
@@ -13,7 +13,7 @@
 void mptcp_parse_option(const unsigned char *ptr, int opsize,
 			struct tcp_options_received *opt_rx)
 {
-	struct mptcp_options_received *mp_opt;
+	struct mptcp_options_received *mp_opt = &opt_rx->mptcp;
 	u8 subtype = *ptr >> 4;
 	int expected_opsize;
 
@@ -29,25 +29,28 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,
 		    opsize != TCPOLEN_MPTCP_MPC_SYNACK)
 			break;
 
-		pr_debug("MP_CAPABLE");
-		opt_rx->mptcp.version = *ptr++ & MPTCPOPT_VERSION_MASK;
-		if (opt_rx->mptcp.version != 0)
+		mp_opt->version = *ptr++ & MPTCPOPT_VERSION_MASK;
+		if (mp_opt->version != 0)
 			break;
 
-		pr_debug("flags=%02x", *ptr);
-		opt_rx->mptcp.flags = *ptr++;
-		if (!((opt_rx->mptcp.flags & MPTCP_CAP_FLAG_MASK) == MPTCP_CAP_HMAC_SHA1) ||
-		    (opt_rx->mptcp.flags & MPTCP_CAP_EXTENSIBILITY))
+		mp_opt->flags = *ptr++;
+		if (!((mp_opt->flags & MPTCP_CAP_FLAG_MASK) == MPTCP_CAP_HMAC_SHA1) ||
+		    (mp_opt->flags & MPTCP_CAP_EXTENSIBILITY))
 			break;
 
-		opt_rx->mptcp.mp_capable = 1;
-		opt_rx->mptcp.sndr_key = get_unaligned_be64(ptr);
-		pr_debug("sndr_key=%llu", opt_rx->mptcp.sndr_key);
+		mp_opt->mp_capable = 1;
+		mp_opt->sndr_key = get_unaligned_be64(ptr);
 		ptr += 8;
+
 		if (opsize == TCPOLEN_MPTCP_MPC_SYNACK) {
-			opt_rx->mptcp.rcvr_key = get_unaligned_be64(ptr);
-			pr_debug("rcvr_key=%llu", opt_rx->mptcp.rcvr_key);
+			mp_opt->rcvr_key = get_unaligned_be64(ptr);
 			ptr += 8;
+			pr_debug("MP_CAPABLE flags=%x, sndr=%llu, rcvr=%llu",
+				 mp_opt->flags, mp_opt->sndr_key,
+				 mp_opt->rcvr_key);
+		} else {
+			pr_debug("MP_CAPABLE flags=%x, sndr=%llu",
+				 mp_opt->flags, mp_opt->sndr_key);
 		}
 		break;
 
@@ -83,7 +86,6 @@ void mptcp_parse_option(const unsigned char *ptr, int opsize,
 	 */
 	case MPTCPOPT_DSS:
 		pr_debug("DSS");
-		mp_opt = &opt_rx->mptcp;
 		mp_opt->dss = 1;
 		ptr++;
 
-- 
2.17.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [MPTCP] [PATCH v2 1/2] mptcp: reduce number of pr_debug() calls.
@ 2019-06-11 20:56 Matthieu Baerts
  0 siblings, 0 replies; 2+ messages in thread
From: Matthieu Baerts @ 2019-06-11 20:56 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 579 bytes --]

Hi Peter,

On 11/06/2019 19:51, Peter Krystad wrote:
> squashto: Handle MPTCP TCP options

Thank you for this v2!

- 8c31f2a73c52: "squashed" in "mptcp: Handle MPTCP TCP options"
- f435387d7a74: conflict
- 3dbe13718918: conflict
- 6614ebdd54b7..076a9a1a7cc8: result

Tests are good, Belgium won, it seems everything is good to finish
preparing these patches for Eric!

Cheers,
Matt
-- 
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-11 20:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 17:51 [MPTCP] [PATCH v2 1/2] mptcp: reduce number of pr_debug() calls Peter Krystad
2019-06-11 20:56 Matthieu Baerts

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.