lkml.org 
[lkml]   [2020]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4] sctp: fix refcount bug in sctp_wfree
On Thu, Mar 26, 2020 at 8:14 AM Marcelo Ricardo Leitner
<marcelo.leitner@gmail.com> wrote:
>
> On Sun, Mar 22, 2020 at 05:04:25PM +0800, Qiujun Huang wrote:
> > sctp_sock_migrate should iterate over the datamsgs to modify
> > all trunks(skbs) to newsk. For this, out_msg_list is added to
>
> s/trunks/chunks/

My :p.

>
> > sctp_outq to maintain datamsgs list.
>
> It is an interesting approach. It speeds up the migration, yes, but it
> will also use more memory per datamsg, for an operation that, when
> performed, the socket is usually calm.
>
> It's also another list to be handled, and I'm not seeing the patch
> here move the datamsg itself now to the new outq. It would need
> something along these lines:

Are all the rx chunks in the rx queues?

> sctp_sock_migrate()
> {
> ...
> /* Move any messages in the old socket's receive queue that are for the
> * peeled off association to the new socket's receive queue.
> */
> sctp_skb_for_each(skb, &oldsk->sk_receive_queue, tmp) {
> event = sctp_skb2event(skb);
> ...
> /* Walk through the pd_lobby, looking for skbs that
> * need moved to the new socket.
> */
> sctp_skb_for_each(skb, &oldsp->pd_lobby, tmp) {
> event = sctp_skb2event(skb);
>
> That said, I don't think it's worth this new list.

About this case:
datamsg
->chunk0 chunk1
chunk2
queue ->transmitted ->retransmit
->not in any queue

Also need to maintain a datamsg list to record which datamsg is
processed avoiding repetitive
processing.
So, list it to outq. Maybe it will be used sometime.

>
> Marcelo

\
 
 \ /
  Last update: 2020-03-26 02:31    [W:0.081 / U:4.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site