From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: Neil Horman <nhorman@tuxdriver.com>,
network dev <netdev@vger.kernel.org>,
linux-sctp@vger.kernel.org, davem <davem@davemloft.net>,
Vlad Yasevich <vyasevich@gmail.com>,
daniel@iogearbox.net
Subject: Re: [PATCH net 1/6] sctp: remove the unnecessary state check in sctp_outq_tail
Date: Mon, 12 Sep 2016 16:48:38 -0300 [thread overview]
Message-ID: <20160912194838.GE17689@localhost.localdomain> (raw)
In-Reply-To: <CADvbK_f-09NvfeCbeaZZF8+LuMASTYnrh+02RvTz5UR-huiR3g@mail.gmail.com>
On Sat, Sep 10, 2016 at 12:03:53AM +0800, Xin Long wrote:
> > That said, have you considered the retransmit case? That is to say, if you
> > queue and flush the outq, and some packets fail delivery, and in the time
> > between the intial send and the expiration of the RTX timer (during which the
> > socket lock will have been released), an event may occur which changes the
> > transport state, which will then be ignored with your patch.
> Sorry, I'm not sure if I got it.
>
> You mean "during which changes q->asoc->state", right ?
>
> This patch removes the check of q->asoc->state in sctp_outq_tail().
>
> sctp_outq_tail() is called for data only in:
> sctp_primitive_SEND -> sctp_do_sm -> sctp_cmd_send_msg ->
> sctp_cmd_interpreter -> sctp_cmd_send_msg() -> sctp_outq_tail()
>
> before calling sctp_primitive_SEND, hold sock lock first.
> then sctp_primitive_SEND choose FUNC according:
>
> #define TYPE_SCTP_PRIMITIVE_SEND {
> ....
>
> if asoc->state is unavailable, FUNC can't be sctp_cmd_send_msg,
> but sctp_sf_error_closed/sctp_sf_error_shutdown, sctp_outq_tail
> can't be called, either.
> I mean sctp_primitive_SEND do the same check for asoc->state
> already actually.
>
> so the code in sctp_outq_tail is redundant actually.
I also don't see an issue with this patch, btw.
Xin, you may want to add more/such details to the changelog, specially
about the timer versus primitive handling.
Marcelo
next prev parent reply other threads:[~2016-09-12 19:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 9:31 [PATCH net 0/6] sctp: fix the transmit err process Xin Long
2016-09-08 9:31 ` [PATCH net 1/6] sctp: remove the unnecessary state check in sctp_outq_tail Xin Long
2016-09-08 9:31 ` [PATCH net 2/6] sctp: do not return the transmit err back to sctp_sendmsg Xin Long
2016-09-08 9:31 ` [PATCH net 3/6] sctp: free msg->chunks when sctp_primitive_SEND return err Xin Long
2016-09-12 19:41 ` Marcelo Ricardo Leitner
2016-09-08 14:27 ` [PATCH net 1/6] sctp: remove the unnecessary state check in sctp_outq_tail Neil Horman
2016-09-08 17:34 ` Xin Long
2016-09-08 19:23 ` Neil Horman
2016-09-09 7:11 ` Xin Long
2016-09-09 14:28 ` Neil Horman
2016-09-09 16:03 ` Xin Long
2016-09-12 19:48 ` Marcelo Ricardo Leitner [this message]
2016-09-13 17:58 ` Xin Long
2016-09-13 11:57 ` Neil Horman
2016-09-08 9:43 ` [PATCH net 4/6] sctp: save transmit error to sk_err in sctp_outq_flush Xin Long
2016-09-08 9:44 ` [PATCH net 5/6] sctp: make sctp_outq_flush/tail/uncork return void Xin Long
2016-09-08 9:44 ` [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Xin Long
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=20160912194838.GE17689@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=vyasevich@gmail.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).