All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: ubraun@linux.vnet.ibm.com
Cc: utz.bacher@de.ibm.com, netdev@vger.kernel.org,
	linux-s390@vger.kernel.org, schwidefsky@de.ibm.com,
	heiko.carstens@de.ibm.com, ursula.braun@de.ibm.com
Subject: Re: [PATCH V2 net-next 1/3] tcp: introduce TCP experimental option for SMC
Date: Wed, 15 Jul 2015 21:28:37 -0700 (PDT)	[thread overview]
Message-ID: <20150715.212837.233151628267116088.davem@davemloft.net> (raw)
In-Reply-To: <1436877755-23431-2-git-send-email-ubraun@linux.vnet.ibm.com>

From: Ursula Braun <ubraun@linux.vnet.ibm.com>
Date: Tue, 14 Jul 2015 14:42:33 +0200

> diff --git a/include/linux/tcp.h b/include/linux/tcp.h
> index 48c3696..1b9a698 100644
> --- a/include/linux/tcp.h
> +++ b/include/linux/tcp.h
> @@ -90,15 +90,28 @@ struct tcp_options_received {
>  		sack_ok : 4,	/* SACK seen on SYN packet		*/
>  		snd_wscale : 4,	/* Window scaling received from sender	*/
>  		rcv_wscale : 4;	/* Window scaling to send to receiver	*/
> +	u8	smc_capability:1; /* SMC capability			*/
>  	u8	num_sacks;	/* Number of SACK blocks		*/
>  	u16	user_mss;	/* mss requested by user in ioctl	*/
>  	u16	mss_clamp;	/* Maximal mss, negotiated at connection setup */
>  };

This adds new space to this structure, which can be avoided.

sack_ok only actually needs 3 bits, not 4, then you can use the extra
bit for smc_capability.

> diff --git a/include/net/request_sock.h b/include/net/request_sock.h
> index 87935ca..dee47d2 100644
> --- a/include/net/request_sock.h
> +++ b/include/net/request_sock.h
> @@ -55,7 +55,8 @@ struct request_sock {
>  	struct sock			*rsk_listener;
>  	u16				mss;
>  	u8				num_retrans; /* number of retransmits */
> -	u8				cookie_ts:1; /* syncookie: encode tcpopts in timestamp */
> +	u8				cookie_ts:1, /* syncookie: encode tcpopts in timestamp */
> +					smc_capability:1;
>  	u8				num_timeout:7; /* number of timeouts */
>  	/* The following two fields can be easily recomputed I think -AK */
>  	u32				window_clamp; /* window clamp at creation time */

Again, similar situation here.

Please find a way to add your new boolean value without expanding the size of
this structure.  Here is it clear that a single u8 is fully consumed by the
cookie_ts and num_timeout bit fields.

> +#if IS_ENABLED(CONFIG_AFSMC)

I think this ifdef is completely pointless.

What do you think every Linux distribution is going to do for their kernels?
They are going to turn everything on.

So you need to find a way for your new feature to be nearly zero cost,
especially in the fast paths, assuming the code is enabled.

  reply	other threads:[~2015-07-16  4:28 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 12:42 [PATCH V2 net-next 0/3] net: implement SMC-R solution Ursula Braun
2015-07-14 12:42 ` [PATCH V2 net-next 1/3] tcp: introduce TCP experimental option for SMC Ursula Braun
2015-07-16  4:28   ` David Miller [this message]
2015-07-22  8:59     ` [PATCH V3 net-next 0/5] net: implement SMC-R solution Ursula Braun
2015-07-22  8:59       ` [PATCH V3 net-next 1/5] tcp: TCP experimental option for SMC - definitions Ursula Braun
2015-07-22  8:59       ` [PATCH V3 net-next 2/5] tcp: TCP experimental option for SMC - TCP hooks Ursula Braun
2015-07-22  8:59       ` [PATCH V3 net-next 3/5] net: introduce socket family constants Ursula Braun
2015-07-22  8:59       ` [PATCH V3 net-next 4/5] smc: introduce socket family AF_SMC Ursula Braun
2015-07-22  8:59       ` [PATCH V3 net-next 5/5] smc: increase / decrease static key Ursula Braun
2015-07-26 23:15       ` [PATCH V3 net-next 0/5] net: implement SMC-R solution David Miller
2015-07-31 19:04         ` Ursula Braun
2015-08-21 11:30         ` [PATCH V4 net-next 0/2] " Ursula Braun
2015-08-21 11:30           ` [PATCH V4 net-next 1/2] net: introduce socket family constants Ursula Braun
2015-08-21 11:30           ` [PATCH V4 net-next 2/2] smc: introduce socket family AF_SMC Ursula Braun
2015-08-25 18:18           ` [PATCH V4 net-next 0/2] net: implement SMC-R solution David Miller
2015-07-14 12:42 ` [PATCH V2 net-next 2/3] net: introduce socket family constants Ursula Braun
2015-07-16  4:29   ` David Miller
2015-07-14 12:42 ` [PATCH V2 net-next 3/3] smc: introduce socket family AF_SMC Ursula Braun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150715.212837.233151628267116088.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=heiko.carstens@de.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=ubraun@linux.vnet.ibm.com \
    --cc=ursula.braun@de.ibm.com \
    --cc=utz.bacher@de.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.