Re: [PATCH] sctp: Fix sending when PMTU is less than SCTP_DEFAULT_MINSEGMENT

2020-11-06 Thread Petr Malat
On Fri, Nov 06, 2020 at 05:46:34AM -0300, Marcelo Ricardo Leitner wrote: > On Thu, Nov 05, 2020 at 11:39:47AM +0100, Petr Malat wrote: > > Function sctp_dst_mtu() never returns lower MTU than > > SCTP_TRUNC4(SCTP_DEFAULT_MINSEGMENT) even when the actual MTU is less, > > in

[PATCH] sctp: Fix sending when PMTU is less than SCTP_DEFAULT_MINSEGMENT

2020-11-05 Thread Petr Malat
Function sctp_dst_mtu() never returns lower MTU than SCTP_TRUNC4(SCTP_DEFAULT_MINSEGMENT) even when the actual MTU is less, in which case we rely on the IP fragmentation and must enable it. Signed-off-by: Petr Malat --- net/sctp/output.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH] sctp: Fix COMM_LOST/CANT_STR_ASSOC err reporting on big-endian platforms

2020-10-30 Thread Petr Malat
, thus the user always gets 0 on big-endian platforms. Fix it by reading the __u16 field of sctp_arg union, as reading err field would produce a sparse warning. Signed-off-by: Petr Malat --- net/sctp/sm_sideeffect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/sctp/sm

Re: [PATCH] sctp: Honour SCTP_PARTIAL_DELIVERY_POINT even under memory pressure

2020-09-03 Thread Petr Malat
Hi! On Wed, Sep 02, 2020 at 11:58:35AM -0300, Marcelo Ricardo Leitner wrote: > On Tue, Sep 01, 2020 at 11:00:07AM +0200, Petr Malat wrote: > > Command SCTP_CMD_PART_DELIVER issued under memory pressure calls > > sctp_ulpq_partial_delivery(), which tries to fetch and partially delive

[PATCH] sctp: Honour SCTP_PARTIAL_DELIVERY_POINT even under memory pressure

2020-09-03 Thread Petr Malat
behavior is invalid. Fix it by returning the first message only if its part currently available is longer than SCTP_PARTIAL_DELIVERY_POINT. Signed-off-by: Petr Malat --- net/sctp/ulpqueue.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/net/sctp/ulpqueue.c b/net

Incorrect behaviour or documentation problem of SO_RXQ_OVFL

2017-11-15 Thread Petr Malat
Hi! Generic SO_RXQ_OVFL helpers sock_skb_set_dropcount() and sock_recv_drops() implements returning of sk->sk_drops (the total number of dropped packets), although the documentation says the number of dropped packets since the last received one should be returned (quoting the current socket.7):