From: Jamal Hadi Salim <jhs@mojatatu.com> To: Xin Long <lucien.xin@gmail.com> Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Vlad Yasevich <vyasevic@redhat.com>, Daniel Borkmann <daniel@iogearbox.net>, David Miller <davem@davemloft.net>, "linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>, Michael Tuexen <Michael.Tuexen@lurchi.franken.de>, Eric Dumazet <edumazet@google.com>, Brenda Butler <bjb@mojatatu.com>, gabor@mojatatu.com Subject: Re: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Date: Sun, 23 Oct 2016 15:52:08 -0400 [thread overview] Message-ID: <2fa21505-59c2-fb8b-6e89-11fccc953d25@mojatatu.com> (raw) In-Reply-To: <CADvbK_ci-aaX6-mgXTgR0mJm9ww7+48DmXH+m5R+-0PyMDH16g@mail.gmail.com> On 16-10-23 02:20 PM, Xin Long wrote: > This patch doesn't ignore all the ENOMEN cases, only after msg is > enqueued in out queue/send queue, in the lower layer, when alloc > new skb and copy data from old skb, if it fails to alloc new skb, sctp > will ignore this ENOMEM, as this msg will be taken care by retransmit > mechanism, it's reasonable and also safe, user can't feel that. > Yes, that part i got. > But for the cases before enqueue, like in sctp_sendmsg, > sctp_datamsg_from_user may return ENOMEM, this err will return > back to user, and can't be ignored. > The hard part is distinguishing between the above case and real failure. I am assuming in the case above user is _not_ required to send again. But in the general case they are required to send again. Correct? > So I don't really think we should change something in manpage, what > do you think ? maybe a little explanation there is also nice, :) Yes, that would help. In particular it should be clear what user space is expected to do. While this is about sctp - I am assuming equivalent behavior for all callers of sendxxx() regardless of protocol. cheers, jamal
WARNING: multiple messages have this Message-ID (diff)
From: Jamal Hadi Salim <jhs@mojatatu.com> To: Xin Long <lucien.xin@gmail.com> Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>, Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>, Vlad Yasevich <vyasevic@redhat.com>, Daniel Borkmann <daniel@iogearbox.net>, David Miller <davem@davemloft.net>, "linux-sctp@vger.kernel.org" <linux-sctp@vger.kernel.org>, Michael Tuexen <Michael.Tuexen@lurchi.franken.de>, Eric Dumazet <edumazet@google.com>, Brenda Butler <bjb@mojatatu.com>, gabor@mojatatu.com Subject: Re: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Date: Sun, 23 Oct 2016 19:52:08 +0000 [thread overview] Message-ID: <2fa21505-59c2-fb8b-6e89-11fccc953d25@mojatatu.com> (raw) In-Reply-To: <CADvbK_ci-aaX6-mgXTgR0mJm9ww7+48DmXH+m5R+-0PyMDH16g@mail.gmail.com> On 16-10-23 02:20 PM, Xin Long wrote: > This patch doesn't ignore all the ENOMEN cases, only after msg is > enqueued in out queue/send queue, in the lower layer, when alloc > new skb and copy data from old skb, if it fails to alloc new skb, sctp > will ignore this ENOMEM, as this msg will be taken care by retransmit > mechanism, it's reasonable and also safe, user can't feel that. > Yes, that part i got. > But for the cases before enqueue, like in sctp_sendmsg, > sctp_datamsg_from_user may return ENOMEM, this err will return > back to user, and can't be ignored. > The hard part is distinguishing between the above case and real failure. I am assuming in the case above user is _not_ required to send again. But in the general case they are required to send again. Correct? > So I don't really think we should change something in manpage, what > do you think ? maybe a little explanation there is also nice, :) Yes, that would help. In particular it should be clear what user space is expected to do. While this is about sctp - I am assuming equivalent behavior for all callers of sendxxx() regardless of protocol. cheers, jamal
next prev parent reply other threads:[~2016-10-23 19:52 UTC|newest] Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-10-23 15:03 send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_t Jamal Hadi Salim 2016-10-23 15:32 ` Fwd: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Jamal Hadi Salim 2016-10-23 15:32 ` Fwd: send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pac Jamal Hadi Salim 2016-10-23 18:20 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Xin Long 2016-10-23 18:20 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Xin Long 2016-10-23 19:52 ` Jamal Hadi Salim [this message] 2016-10-23 19:52 ` Jamal Hadi Salim 2016-10-24 6:30 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Xin Long 2016-10-24 6:30 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Xin Long 2016-10-24 11:48 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Marcelo Ricardo Leitner 2016-10-24 11:48 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Marcelo Ricardo Leitner 2016-10-24 12:38 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Jamal Hadi Salim 2016-10-24 12:38 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Jamal Hadi Salim 2016-10-25 9:05 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Xin Long 2016-10-25 9:05 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Xin Long 2016-10-25 10:34 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Marcelo Ricardo Leitner 2016-10-25 10:34 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Marcelo Ricardo Leitner 2016-10-25 11:04 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_packet_transmit Jamal Hadi Salim 2016-10-25 11:04 ` send/sendmsg ENOMEM errors WAS(Re: [PATCH net 6/6] sctp: not return ENOMEM err back in sctp_pack Jamal Hadi Salim
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=2fa21505-59c2-fb8b-6e89-11fccc953d25@mojatatu.com \ --to=jhs@mojatatu.com \ --cc=Michael.Tuexen@lurchi.franken.de \ --cc=bjb@mojatatu.com \ --cc=daniel@iogearbox.net \ --cc=davem@davemloft.net \ --cc=edumazet@google.com \ --cc=gabor@mojatatu.com \ --cc=linux-sctp@vger.kernel.org \ --cc=lucien.xin@gmail.com \ --cc=marcelo.leitner@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=vyasevic@redhat.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.