From: Vlad Yasevich <vyasevich@gmail.com>
To: Wang Weidong <wangweidong1@huawei.com>,
davem@davemloft.net, nhorman@tuxdriver.com
Cc: dingtianhong@huawei.com, linux-sctp@vger.kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH 2/4] sctp: remove the repeat initialize with 0
Date: Fri, 25 Oct 2013 19:42:08 -0400 [thread overview]
Message-ID: <526B01D0.7090403@gmail.com> (raw)
In-Reply-To: <1382665805-13952-3-git-send-email-wangweidong1@huawei.com>
On 10/24/2013 09:50 PM, Wang Weidong wrote:
> kmem_cache_zalloc had set the allocated memory to zero. I think no need
> to initialize with 0. And move the comments to the function begin.
>
> Signed-off-by: Wang Weidong <wangweidong1@huawei.com>
Yes, thank you.
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
-vlad
> ---
> net/sctp/sm_make_chunk.c | 29 ++++++++---------------------
> 1 file changed, 8 insertions(+), 21 deletions(-)
>
> diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
> index d244a23..fe69032 100644
> --- a/net/sctp/sm_make_chunk.c
> +++ b/net/sctp/sm_make_chunk.c
> @@ -1297,6 +1297,13 @@ struct sctp_chunk *sctp_make_auth(const struct sctp_association *asoc)
>
> /* Turn an skb into a chunk.
> * FIXME: Eventually move the structure directly inside the skb->cb[].
> + *
> + * sctpimpguide-05.txt Section 2.8.2
> + * M1) Each time a new DATA chunk is transmitted
> + * set the 'TSN.Missing.Report' count for that TSN to 0. The
> + * 'TSN.Missing.Report' count will be used to determine missing chunks
> + * and when to fast retransmit.
> + *
> */
> struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
> const struct sctp_association *asoc,
> @@ -1314,29 +1321,9 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
> INIT_LIST_HEAD(&retval->list);
> retval->skb = skb;
> retval->asoc = (struct sctp_association *)asoc;
> - retval->has_tsn = 0;
> - retval->has_ssn = 0;
> - retval->rtt_in_progress = 0;
> - retval->sent_at = 0;
> retval->singleton = 1;
> - retval->end_of_packet = 0;
> - retval->ecn_ce_done = 0;
> - retval->pdiscard = 0;
> -
> - /* sctpimpguide-05.txt Section 2.8.2
> - * M1) Each time a new DATA chunk is transmitted
> - * set the 'TSN.Missing.Report' count for that TSN to 0. The
> - * 'TSN.Missing.Report' count will be used to determine missing chunks
> - * and when to fast retransmit.
> - */
> - retval->tsn_missing_report = 0;
> - retval->tsn_gap_acked = 0;
> - retval->fast_retransmit = SCTP_CAN_FRTX;
>
> - /* If this is a fragmented message, track all fragments
> - * of the message (for SEND_FAILED).
> - */
> - retval->msg = NULL;
> + retval->fast_retransmit = SCTP_CAN_FRTX;
>
> /* Polish the bead hole. */
> INIT_LIST_HEAD(&retval->transmitted_list);
>
next prev parent reply other threads:[~2013-10-25 23:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 1:50 [PATCH 0/4] sctp: do some clean up and fix comments Wang Weidong
2013-10-25 1:50 ` [PATCH 1/4] sctp: merge two if statements to one Wang Weidong
2013-10-25 13:04 ` Sergei Shtylyov
2013-10-26 2:55 ` wangweidong
2013-10-25 23:40 ` Vlad Yasevich
2013-10-26 2:59 ` wangweidong
2013-10-25 1:50 ` [PATCH 2/4] sctp: remove the repeat initialize with 0 Wang Weidong
2013-10-25 23:42 ` Vlad Yasevich [this message]
2013-10-25 1:50 ` [PATCH 3/4] sctp: fix some comments in associola.c Wang Weidong
2013-10-25 23:43 ` Vlad Yasevich
2013-10-25 1:50 ` [PATCH 4/4] sctp: fix comment in chunk.c Wang Weidong
2013-10-25 23:45 ` Vlad Yasevich
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=526B01D0.7090403@gmail.com \
--to=vyasevich@gmail.com \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=linux-sctp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=wangweidong1@huawei.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 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).