netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 net-next] sctp: no need to check assoc id before calling sctp_assoc_set_id
@ 2017-06-10  7:27 Xin Long
  2017-06-10 16:03 ` Marcelo Ricardo Leitner
  2017-06-10 20:23 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Xin Long @ 2017-06-10  7:27 UTC (permalink / raw)
  To: network dev, linux-sctp; +Cc: Marcelo Ricardo Leitner, Neil Horman, davem

sctp_assoc_set_id does the assoc id check in the beginning when
processing dupcookie, no need to do the same check before calling
it.

v1->v2:
  fix some typo errs Marcelo pointed in changelog.

Signed-off-by: Xin Long <lucien.xin@gmail.com>
---
 net/sctp/associola.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/net/sctp/associola.c b/net/sctp/associola.c
index 288c5e0..72b07dd 100644
--- a/net/sctp/associola.c
+++ b/net/sctp/associola.c
@@ -1181,12 +1181,8 @@ void sctp_assoc_update(struct sctp_association *asoc,
 		if (sctp_state(asoc, COOKIE_WAIT))
 			sctp_stream_update(&asoc->stream, &new->stream);
 
-		if (!asoc->assoc_id) {
-			/* get a new association id since we don't have one
-			 * yet.
-			 */
-			sctp_assoc_set_id(asoc, GFP_ATOMIC);
-		}
+		/* get a new assoc id if we don't have one yet. */
+		sctp_assoc_set_id(asoc, GFP_ATOMIC);
 	}
 
 	/* SCTP-AUTH: Save the peer parameters from the new associations
-- 
2.1.0

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

* Re: [PATCHv2 net-next] sctp: no need to check assoc id before calling sctp_assoc_set_id
  2017-06-10  7:27 [PATCHv2 net-next] sctp: no need to check assoc id before calling sctp_assoc_set_id Xin Long
@ 2017-06-10 16:03 ` Marcelo Ricardo Leitner
  2017-06-10 20:23 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Ricardo Leitner @ 2017-06-10 16:03 UTC (permalink / raw)
  To: Xin Long; +Cc: network dev, linux-sctp, Neil Horman, davem

On Sat, Jun 10, 2017 at 03:27:12PM +0800, Xin Long wrote:
> sctp_assoc_set_id does the assoc id check in the beginning when
> processing dupcookie, no need to do the same check before calling
> it.
> 
> v1->v2:
>   fix some typo errs Marcelo pointed in changelog.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

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

> ---
>  net/sctp/associola.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/net/sctp/associola.c b/net/sctp/associola.c
> index 288c5e0..72b07dd 100644
> --- a/net/sctp/associola.c
> +++ b/net/sctp/associola.c
> @@ -1181,12 +1181,8 @@ void sctp_assoc_update(struct sctp_association *asoc,
>  		if (sctp_state(asoc, COOKIE_WAIT))
>  			sctp_stream_update(&asoc->stream, &new->stream);
>  
> -		if (!asoc->assoc_id) {
> -			/* get a new association id since we don't have one
> -			 * yet.
> -			 */
> -			sctp_assoc_set_id(asoc, GFP_ATOMIC);
> -		}
> +		/* get a new assoc id if we don't have one yet. */
> +		sctp_assoc_set_id(asoc, GFP_ATOMIC);
>  	}
>  
>  	/* SCTP-AUTH: Save the peer parameters from the new associations
> -- 
> 2.1.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
> 

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

* Re: [PATCHv2 net-next] sctp: no need to check assoc id before calling sctp_assoc_set_id
  2017-06-10  7:27 [PATCHv2 net-next] sctp: no need to check assoc id before calling sctp_assoc_set_id Xin Long
  2017-06-10 16:03 ` Marcelo Ricardo Leitner
@ 2017-06-10 20:23 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-06-10 20:23 UTC (permalink / raw)
  To: lucien.xin; +Cc: netdev, linux-sctp, marcelo.leitner, nhorman

From: Xin Long <lucien.xin@gmail.com>
Date: Sat, 10 Jun 2017 15:27:12 +0800

> sctp_assoc_set_id does the assoc id check in the beginning when
> processing dupcookie, no need to do the same check before calling
> it.
> 
> v1->v2:
>   fix some typo errs Marcelo pointed in changelog.
> 
> Signed-off-by: Xin Long <lucien.xin@gmail.com>

Also applied, thanks.

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

end of thread, other threads:[~2017-06-10 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-10  7:27 [PATCHv2 net-next] sctp: no need to check assoc id before calling sctp_assoc_set_id Xin Long
2017-06-10 16:03 ` Marcelo Ricardo Leitner
2017-06-10 20:23 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).