All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: flush if we can't fit another DATA chunk
@ 2016-03-29 13:41 ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 10+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-03-29 13:41 UTC (permalink / raw)
  To: netdev; +Cc: Neil Horman, Vlad Yasevich, linux-sctp

There is no point in delaying the packet if we can't fit a single byte
of data on it anymore. So lets just reduce the threshold by the amount
that a data chunk with 4 bytes (rounding) would use.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
 net/sctp/output.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
 	/* Check whether this chunk and all the rest of pending data will fit
 	 * or delay in hopes of bundling a full sized packet.
 	 */
-	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
+	if (chunk->skb->len + q->out_qlen >
+		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
 		/* Enough data queued to fill a packet */
 		return SCTP_XMIT_OK;
 
-- 
2.5.0

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

* [PATCH] sctp: flush if we can't fit another DATA chunk
@ 2016-03-29 13:41 ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 10+ messages in thread
From: Marcelo Ricardo Leitner @ 2016-03-29 13:41 UTC (permalink / raw)
  To: netdev; +Cc: Neil Horman, Vlad Yasevich, linux-sctp

There is no point in delaying the packet if we can't fit a single byte
of data on it anymore. So lets just reduce the threshold by the amount
that a data chunk with 4 bytes (rounding) would use.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
 net/sctp/output.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sctp/output.c b/net/sctp/output.c
index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
 	/* Check whether this chunk and all the rest of pending data will fit
 	 * or delay in hopes of bundling a full sized packet.
 	 */
-	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
+	if (chunk->skb->len + q->out_qlen >
+		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
 		/* Enough data queued to fill a packet */
 		return SCTP_XMIT_OK;
 
-- 
2.5.0


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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
  2016-03-29 13:41 ` Marcelo Ricardo Leitner
@ 2016-03-30 12:03   ` Neil Horman
  -1 siblings, 0 replies; 10+ messages in thread
From: Neil Horman @ 2016-03-30 12:03 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner; +Cc: netdev, Vlad Yasevich, linux-sctp

On Tue, Mar 29, 2016 at 10:41:25AM -0300, Marcelo Ricardo Leitner wrote:
> There is no point in delaying the packet if we can't fit a single byte
> of data on it anymore. So lets just reduce the threshold by the amount
> that a data chunk with 4 bytes (rounding) would use.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
>  net/sctp/output.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
>  	/* Check whether this chunk and all the rest of pending data will fit
>  	 * or delay in hopes of bundling a full sized packet.
>  	 */
> -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> +	if (chunk->skb->len + q->out_qlen >
> +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
>  		/* Enough data queued to fill a packet */
>  		return SCTP_XMIT_OK;
>  
> -- 
> 2.5.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Acked-By: Neil Horman <nhorman@tuxdriver.com>

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
@ 2016-03-30 12:03   ` Neil Horman
  0 siblings, 0 replies; 10+ messages in thread
From: Neil Horman @ 2016-03-30 12:03 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner; +Cc: netdev, Vlad Yasevich, linux-sctp

On Tue, Mar 29, 2016 at 10:41:25AM -0300, Marcelo Ricardo Leitner wrote:
> There is no point in delaying the packet if we can't fit a single byte
> of data on it anymore. So lets just reduce the threshold by the amount
> that a data chunk with 4 bytes (rounding) would use.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
>  net/sctp/output.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
>  	/* Check whether this chunk and all the rest of pending data will fit
>  	 * or delay in hopes of bundling a full sized packet.
>  	 */
> -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> +	if (chunk->skb->len + q->out_qlen >
> +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
>  		/* Enough data queued to fill a packet */
>  		return SCTP_XMIT_OK;
>  
> -- 
> 2.5.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Acked-By: Neil Horman <nhorman@tuxdriver.com>

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
  2016-03-29 13:41 ` Marcelo Ricardo Leitner
@ 2016-03-30 19:46   ` David Miller
  -1 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2016-03-30 19:46 UTC (permalink / raw)
  To: marcelo.leitner; +Cc: netdev, nhorman, vyasevich, linux-sctp

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Tue, 29 Mar 2016 10:41:25 -0300

> There is no point in delaying the packet if we can't fit a single byte
> of data on it anymore. So lets just reduce the threshold by the amount
> that a data chunk with 4 bytes (rounding) would use.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
>  net/sctp/output.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
>  	/* Check whether this chunk and all the rest of pending data will fit
>  	 * or delay in hopes of bundling a full sized packet.
>  	 */
> -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> +	if (chunk->skb->len + q->out_qlen >
> +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)

There is no maxsize in this function.

You must generate and test your patches against my networking tree.

Neil, how were you able to see where 'maxsize' is and how it's even
calculated before determining that this change is correct?

Please don't ACK patches you really didn't verify in any way at all,
thanks.  It's better to have no reviews than bad reviews, because ACKs
are supposed to give me a reason to be more confident in the change.

Marcelo, I'm ignoring the rest of your SCTP changes, you have to get
your act together.

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
@ 2016-03-30 19:46   ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2016-03-30 19:46 UTC (permalink / raw)
  To: marcelo.leitner; +Cc: netdev, nhorman, vyasevich, linux-sctp

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Tue, 29 Mar 2016 10:41:25 -0300

> There is no point in delaying the packet if we can't fit a single byte
> of data on it anymore. So lets just reduce the threshold by the amount
> that a data chunk with 4 bytes (rounding) would use.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
>  net/sctp/output.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/sctp/output.c b/net/sctp/output.c
> index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> --- a/net/sctp/output.c
> +++ b/net/sctp/output.c
> @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
>  	/* Check whether this chunk and all the rest of pending data will fit
>  	 * or delay in hopes of bundling a full sized packet.
>  	 */
> -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> +	if (chunk->skb->len + q->out_qlen >
> +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)

There is no maxsize in this function.

You must generate and test your patches against my networking tree.

Neil, how were you able to see where 'maxsize' is and how it's even
calculated before determining that this change is correct?

Please don't ACK patches you really didn't verify in any way at all,
thanks.  It's better to have no reviews than bad reviews, because ACKs
are supposed to give me a reason to be more confident in the change.

Marcelo, I'm ignoring the rest of your SCTP changes, you have to get
your act together.

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
  2016-03-30 19:46   ` David Miller
@ 2016-03-30 19:52     ` marcelo.leitner
  -1 siblings, 0 replies; 10+ messages in thread
From: marcelo.leitner @ 2016-03-30 19:52 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, nhorman, vyasevich, linux-sctp

On Wed, Mar 30, 2016 at 03:46:22PM -0400, David Miller wrote:
> From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Date: Tue, 29 Mar 2016 10:41:25 -0300
> 
> > There is no point in delaying the packet if we can't fit a single byte
> > of data on it anymore. So lets just reduce the threshold by the amount
> > that a data chunk with 4 bytes (rounding) would use.
> > 
> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > ---
> >  net/sctp/output.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/sctp/output.c b/net/sctp/output.c
> > index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> > --- a/net/sctp/output.c
> > +++ b/net/sctp/output.c
> > @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
> >  	/* Check whether this chunk and all the rest of pending data will fit
> >  	 * or delay in hopes of bundling a full sized packet.
> >  	 */
> > -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> > +	if (chunk->skb->len + q->out_qlen >
> > +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
> 
> There is no maxsize in this function.
> 
> You must generate and test your patches against my networking tree.
> 
> Neil, how were you able to see where 'maxsize' is and how it's even
> calculated before determining that this change is correct?
> 
> Please don't ACK patches you really didn't verify in any way at all,
> thanks.  It's better to have no reviews than bad reviews, because ACKs
> are supposed to give me a reason to be more confident in the change.
> 
> Marcelo, I'm ignoring the rest of your SCTP changes, you have to get
> your act together.

Argh, indeed. Bad decision here to split up the patchset. Sorry for that.

  Marcelo

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
@ 2016-03-30 19:52     ` marcelo.leitner
  0 siblings, 0 replies; 10+ messages in thread
From: marcelo.leitner @ 2016-03-30 19:52 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, nhorman, vyasevich, linux-sctp

On Wed, Mar 30, 2016 at 03:46:22PM -0400, David Miller wrote:
> From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Date: Tue, 29 Mar 2016 10:41:25 -0300
> 
> > There is no point in delaying the packet if we can't fit a single byte
> > of data on it anymore. So lets just reduce the threshold by the amount
> > that a data chunk with 4 bytes (rounding) would use.
> > 
> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > ---
> >  net/sctp/output.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/sctp/output.c b/net/sctp/output.c
> > index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> > --- a/net/sctp/output.c
> > +++ b/net/sctp/output.c
> > @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
> >  	/* Check whether this chunk and all the rest of pending data will fit
> >  	 * or delay in hopes of bundling a full sized packet.
> >  	 */
> > -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> > +	if (chunk->skb->len + q->out_qlen >
> > +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
> 
> There is no maxsize in this function.
> 
> You must generate and test your patches against my networking tree.
> 
> Neil, how were you able to see where 'maxsize' is and how it's even
> calculated before determining that this change is correct?
> 
> Please don't ACK patches you really didn't verify in any way at all,
> thanks.  It's better to have no reviews than bad reviews, because ACKs
> are supposed to give me a reason to be more confident in the change.
> 
> Marcelo, I'm ignoring the rest of your SCTP changes, you have to get
> your act together.

Argh, indeed. Bad decision here to split up the patchset. Sorry for that.

  Marcelo

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
  2016-03-30 19:46   ` David Miller
@ 2016-03-30 20:32     ` Neil Horman
  -1 siblings, 0 replies; 10+ messages in thread
From: Neil Horman @ 2016-03-30 20:32 UTC (permalink / raw)
  To: David Miller; +Cc: marcelo.leitner, netdev, vyasevich, linux-sctp

On Wed, Mar 30, 2016 at 03:46:22PM -0400, David Miller wrote:
> From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Date: Tue, 29 Mar 2016 10:41:25 -0300
> 
> > There is no point in delaying the packet if we can't fit a single byte
> > of data on it anymore. So lets just reduce the threshold by the amount
> > that a data chunk with 4 bytes (rounding) would use.
> > 
> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > ---
> >  net/sctp/output.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/sctp/output.c b/net/sctp/output.c
> > index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> > --- a/net/sctp/output.c
> > +++ b/net/sctp/output.c
> > @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
> >  	/* Check whether this chunk and all the rest of pending data will fit
> >  	 * or delay in hopes of bundling a full sized packet.
> >  	 */
> > -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> > +	if (chunk->skb->len + q->out_qlen >
> > +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
> 
> There is no maxsize in this function.
> 
> You must generate and test your patches against my networking tree.
> 
> Neil, how were you able to see where 'maxsize' is and how it's even
> calculated before determining that this change is correct?
> 
Shit, sorry, dave, I trusted that Marcello built and tested the patch, and
reviewed it based on the validity of the math (which making assumptions for what
maxsize was, should be correct).  No exuse, I screwed up.
Neil

> Please don't ACK patches you really didn't verify in any way at all,
> thanks.  It's better to have no reviews than bad reviews, because ACKs
> are supposed to give me a reason to be more confident in the change.
> 
> Marcelo, I'm ignoring the rest of your SCTP changes, you have to get
> your act together.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

* Re: [PATCH] sctp: flush if we can't fit another DATA chunk
@ 2016-03-30 20:32     ` Neil Horman
  0 siblings, 0 replies; 10+ messages in thread
From: Neil Horman @ 2016-03-30 20:32 UTC (permalink / raw)
  To: David Miller; +Cc: marcelo.leitner, netdev, vyasevich, linux-sctp

On Wed, Mar 30, 2016 at 03:46:22PM -0400, David Miller wrote:
> From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> Date: Tue, 29 Mar 2016 10:41:25 -0300
> 
> > There is no point in delaying the packet if we can't fit a single byte
> > of data on it anymore. So lets just reduce the threshold by the amount
> > that a data chunk with 4 bytes (rounding) would use.
> > 
> > Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> > ---
> >  net/sctp/output.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/sctp/output.c b/net/sctp/output.c
> > index 97745351d58c2fb32b9f9b57d61831d7724d83b2..c518569123ce42a8f21f80754756306c39875013 100644
> > --- a/net/sctp/output.c
> > +++ b/net/sctp/output.c
> > @@ -705,7 +705,8 @@ static sctp_xmit_t sctp_packet_can_append_data(struct sctp_packet *packet,
> >  	/* Check whether this chunk and all the rest of pending data will fit
> >  	 * or delay in hopes of bundling a full sized packet.
> >  	 */
> > -	if (chunk->skb->len + q->out_qlen >= transport->pathmtu - packet->overhead)
> > +	if (chunk->skb->len + q->out_qlen >
> > +		maxsize - packet->overhead - sizeof(sctp_data_chunk_t) - 4)
> 
> There is no maxsize in this function.
> 
> You must generate and test your patches against my networking tree.
> 
> Neil, how were you able to see where 'maxsize' is and how it's even
> calculated before determining that this change is correct?
> 
Shit, sorry, dave, I trusted that Marcello built and tested the patch, and
reviewed it based on the validity of the math (which making assumptions for what
maxsize was, should be correct).  No exuse, I screwed up.
Neil

> Please don't ACK patches you really didn't verify in any way at all,
> thanks.  It's better to have no reviews than bad reviews, because ACKs
> are supposed to give me a reason to be more confident in the change.
> 
> Marcelo, I'm ignoring the rest of your SCTP changes, you have to get
> your act together.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

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

end of thread, other threads:[~2016-03-30 20:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-29 13:41 [PATCH] sctp: flush if we can't fit another DATA chunk Marcelo Ricardo Leitner
2016-03-29 13:41 ` Marcelo Ricardo Leitner
2016-03-30 12:03 ` Neil Horman
2016-03-30 12:03   ` Neil Horman
2016-03-30 19:46 ` David Miller
2016-03-30 19:46   ` David Miller
2016-03-30 19:52   ` marcelo.leitner
2016-03-30 19:52     ` marcelo.leitner
2016-03-30 20:32   ` Neil Horman
2016-03-30 20:32     ` Neil Horman

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.