All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: convert sack_needed and sack_generation to bits
@ 2015-11-30 14:17 ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 6+ messages in thread
From: Marcelo Ricardo Leitner @ 2015-11-30 14:17 UTC (permalink / raw)
  To: netdev; +Cc: Vlad Yasevich, Neil Horman, linux-sctp, lucien.xin

They don't need to be any bigger than that and with this we start a new
bitfield for tracking association runtime stuff, like zero window
situation.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---

Motivated by https://patchwork.ozlabs.org/patch/509836/

 include/net/sctp/structs.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 495c87e367b3f2e8941807f56a77d2e14469bfed..7bbb71081aeb6cfdc9cb049cf7a094dbcd4603bb 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -775,10 +775,10 @@ struct sctp_transport {
 		hb_sent:1,
 
 		/* Is the Path MTU update pending on this tranport */
-		pmtu_pending:1;
+		pmtu_pending:1,
 
-	/* Has this transport moved the ctsn since we last sacked */
-	__u32 sack_generation;
+		/* Has this transport moved the ctsn since we last sacked */
+		sack_generation:1;
 	u32 dst_cookie;
 
 	struct flowi fl;
@@ -1482,19 +1482,19 @@ struct sctp_association {
 			prsctp_capable:1,   /* Can peer do PR-SCTP? */
 			auth_capable:1;     /* Is peer doing SCTP-AUTH? */
 
-		/* Ack State   : This flag indicates if the next received
+		/* sack_needed : This flag indicates if the next received
 		 *             : packet is to be responded to with a
-		 *             : SACK. This is initializedto 0.  When a packet
-		 *             : is received it is incremented. If this value
+		 *             : SACK. This is initialized to 0.  When a packet
+		 *             : is received sack_cnt is incremented. If this value
 		 *             : reaches 2 or more, a SACK is sent and the
 		 *             : value is reset to 0. Note: This is used only
 		 *             : when no DATA chunks are received out of
 		 *             : order.  When DATA chunks are out of order,
 		 *             : SACK's are not delayed (see Section 6).
 		 */
-		__u8    sack_needed;     /* Do we need to sack the peer? */
+		__u8    sack_needed:1,     /* Do we need to sack the peer? */
+			sack_generation:1;
 		__u32	sack_cnt;
-		__u32	sack_generation;
 
 		__u32   adaptation_ind;	 /* Adaptation Code point. */
 
-- 
2.5.0

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

* [PATCH] sctp: convert sack_needed and sack_generation to bits
@ 2015-11-30 14:17 ` Marcelo Ricardo Leitner
  0 siblings, 0 replies; 6+ messages in thread
From: Marcelo Ricardo Leitner @ 2015-11-30 14:17 UTC (permalink / raw)
  To: netdev; +Cc: Vlad Yasevich, Neil Horman, linux-sctp, lucien.xin

They don't need to be any bigger than that and with this we start a new
bitfield for tracking association runtime stuff, like zero window
situation.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---

Motivated by https://patchwork.ozlabs.org/patch/509836/

 include/net/sctp/structs.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 495c87e367b3f2e8941807f56a77d2e14469bfed..7bbb71081aeb6cfdc9cb049cf7a094dbcd4603bb 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -775,10 +775,10 @@ struct sctp_transport {
 		hb_sent:1,
 
 		/* Is the Path MTU update pending on this tranport */
-		pmtu_pending:1;
+		pmtu_pending:1,
 
-	/* Has this transport moved the ctsn since we last sacked */
-	__u32 sack_generation;
+		/* Has this transport moved the ctsn since we last sacked */
+		sack_generation:1;
 	u32 dst_cookie;
 
 	struct flowi fl;
@@ -1482,19 +1482,19 @@ struct sctp_association {
 			prsctp_capable:1,   /* Can peer do PR-SCTP? */
 			auth_capable:1;     /* Is peer doing SCTP-AUTH? */
 
-		/* Ack State   : This flag indicates if the next received
+		/* sack_needed : This flag indicates if the next received
 		 *             : packet is to be responded to with a
-		 *             : SACK. This is initializedto 0.  When a packet
-		 *             : is received it is incremented. If this value
+		 *             : SACK. This is initialized to 0.  When a packet
+		 *             : is received sack_cnt is incremented. If this value
 		 *             : reaches 2 or more, a SACK is sent and the
 		 *             : value is reset to 0. Note: This is used only
 		 *             : when no DATA chunks are received out of
 		 *             : order.  When DATA chunks are out of order,
 		 *             : SACK's are not delayed (see Section 6).
 		 */
-		__u8    sack_needed;     /* Do we need to sack the peer? */
+		__u8    sack_needed:1,     /* Do we need to sack the peer? */
+			sack_generation:1;
 		__u32	sack_cnt;
-		__u32	sack_generation;
 
 		__u32   adaptation_ind;	 /* Adaptation Code point. */
 
-- 
2.5.0


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

* Re: [PATCH] sctp: convert sack_needed and sack_generation to bits
  2015-11-30 14:17 ` Marcelo Ricardo Leitner
@ 2015-11-30 14:43   ` Vlad Yasevich
  -1 siblings, 0 replies; 6+ messages in thread
From: Vlad Yasevich @ 2015-11-30 14:43 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner, netdev; +Cc: Neil Horman, linux-sctp, lucien.xin

On 11/30/2015 09:17 AM, Marcelo Ricardo Leitner wrote:
> They don't need to be any bigger than that and with this we start a new
> bitfield for tracking association runtime stuff, like zero window
> situation.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

-vlad

> ---
> 
> Motivated by https://patchwork.ozlabs.org/patch/509836/
> 
>  include/net/sctp/structs.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index 495c87e367b3f2e8941807f56a77d2e14469bfed..7bbb71081aeb6cfdc9cb049cf7a094dbcd4603bb 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -775,10 +775,10 @@ struct sctp_transport {
>  		hb_sent:1,
>  
>  		/* Is the Path MTU update pending on this tranport */
> -		pmtu_pending:1;
> +		pmtu_pending:1,
>  
> -	/* Has this transport moved the ctsn since we last sacked */
> -	__u32 sack_generation;
> +		/* Has this transport moved the ctsn since we last sacked */
> +		sack_generation:1;
>  	u32 dst_cookie;
>  
>  	struct flowi fl;
> @@ -1482,19 +1482,19 @@ struct sctp_association {
>  			prsctp_capable:1,   /* Can peer do PR-SCTP? */
>  			auth_capable:1;     /* Is peer doing SCTP-AUTH? */
>  
> -		/* Ack State   : This flag indicates if the next received
> +		/* sack_needed : This flag indicates if the next received
>  		 *             : packet is to be responded to with a
> -		 *             : SACK. This is initializedto 0.  When a packet
> -		 *             : is received it is incremented. If this value
> +		 *             : SACK. This is initialized to 0.  When a packet
> +		 *             : is received sack_cnt is incremented. If this value
>  		 *             : reaches 2 or more, a SACK is sent and the
>  		 *             : value is reset to 0. Note: This is used only
>  		 *             : when no DATA chunks are received out of
>  		 *             : order.  When DATA chunks are out of order,
>  		 *             : SACK's are not delayed (see Section 6).
>  		 */
> -		__u8    sack_needed;     /* Do we need to sack the peer? */
> +		__u8    sack_needed:1,     /* Do we need to sack the peer? */
> +			sack_generation:1;
>  		__u32	sack_cnt;
> -		__u32	sack_generation;
>  
>  		__u32   adaptation_ind;	 /* Adaptation Code point. */
>  
> 

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

* Re: [PATCH] sctp: convert sack_needed and sack_generation to bits
@ 2015-11-30 14:43   ` Vlad Yasevich
  0 siblings, 0 replies; 6+ messages in thread
From: Vlad Yasevich @ 2015-11-30 14:43 UTC (permalink / raw)
  To: Marcelo Ricardo Leitner, netdev; +Cc: Neil Horman, linux-sctp, lucien.xin

On 11/30/2015 09:17 AM, Marcelo Ricardo Leitner wrote:
> They don't need to be any bigger than that and with this we start a new
> bitfield for tracking association runtime stuff, like zero window
> situation.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Acked-by: Vlad Yasevich <vyasevich@gmail.com>

-vlad

> ---
> 
> Motivated by https://patchwork.ozlabs.org/patch/509836/
> 
>  include/net/sctp/structs.h | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index 495c87e367b3f2e8941807f56a77d2e14469bfed..7bbb71081aeb6cfdc9cb049cf7a094dbcd4603bb 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -775,10 +775,10 @@ struct sctp_transport {
>  		hb_sent:1,
>  
>  		/* Is the Path MTU update pending on this tranport */
> -		pmtu_pending:1;
> +		pmtu_pending:1,
>  
> -	/* Has this transport moved the ctsn since we last sacked */
> -	__u32 sack_generation;
> +		/* Has this transport moved the ctsn since we last sacked */
> +		sack_generation:1;
>  	u32 dst_cookie;
>  
>  	struct flowi fl;
> @@ -1482,19 +1482,19 @@ struct sctp_association {
>  			prsctp_capable:1,   /* Can peer do PR-SCTP? */
>  			auth_capable:1;     /* Is peer doing SCTP-AUTH? */
>  
> -		/* Ack State   : This flag indicates if the next received
> +		/* sack_needed : This flag indicates if the next received
>  		 *             : packet is to be responded to with a
> -		 *             : SACK. This is initializedto 0.  When a packet
> -		 *             : is received it is incremented. If this value
> +		 *             : SACK. This is initialized to 0.  When a packet
> +		 *             : is received sack_cnt is incremented. If this value
>  		 *             : reaches 2 or more, a SACK is sent and the
>  		 *             : value is reset to 0. Note: This is used only
>  		 *             : when no DATA chunks are received out of
>  		 *             : order.  When DATA chunks are out of order,
>  		 *             : SACK's are not delayed (see Section 6).
>  		 */
> -		__u8    sack_needed;     /* Do we need to sack the peer? */
> +		__u8    sack_needed:1,     /* Do we need to sack the peer? */
> +			sack_generation:1;
>  		__u32	sack_cnt;
> -		__u32	sack_generation;
>  
>  		__u32   adaptation_ind;	 /* Adaptation Code point. */
>  
> 


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

* Re: [PATCH] sctp: convert sack_needed and sack_generation to bits
  2015-11-30 14:17 ` Marcelo Ricardo Leitner
@ 2015-12-03  4:40   ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-12-03  4:40 UTC (permalink / raw)
  To: marcelo.leitner; +Cc: netdev, vyasevich, nhorman, linux-sctp, lucien.xin

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Mon, 30 Nov 2015 12:17:06 -0200

> They don't need to be any bigger than that and with this we start a new
> bitfield for tracking association runtime stuff, like zero window
> situation.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Applied.

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

* Re: [PATCH] sctp: convert sack_needed and sack_generation to bits
@ 2015-12-03  4:40   ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2015-12-03  4:40 UTC (permalink / raw)
  To: marcelo.leitner; +Cc: netdev, vyasevich, nhorman, linux-sctp, lucien.xin

From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Date: Mon, 30 Nov 2015 12:17:06 -0200

> They don't need to be any bigger than that and with this we start a new
> bitfield for tracking association runtime stuff, like zero window
> situation.
> 
> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>

Applied.

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

end of thread, other threads:[~2015-12-03  4:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30 14:17 [PATCH] sctp: convert sack_needed and sack_generation to bits Marcelo Ricardo Leitner
2015-11-30 14:17 ` Marcelo Ricardo Leitner
2015-11-30 14:43 ` Vlad Yasevich
2015-11-30 14:43   ` Vlad Yasevich
2015-12-03  4:40 ` David Miller
2015-12-03  4:40   ` David Miller

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.