[PATCH net] net/sched: act_ct: clear post_ct if doing ct_clear

2021-03-22 Thread Marcelo Ricardo Leitner
From: Marcelo Ricardo Leitner Invalid detection works with two distinct moments: act_ct tries to find a conntrack entry and set post_ct true, indicating that that was attempted. Then, when flow dissector tries to dissect CT info and no entry is there, it knows that it was tried and no entry was

Re: [PATCH nf-next] netfilter: flowtable: separate replace, destroy and stats to different workqueues

2021-03-24 Thread Marcelo Ricardo Leitner
On Wed, Mar 24, 2021 at 01:24:53PM +0200, Oz Shlomo wrote: > Hi, Hi, > > On 3/24/2021 3:38 AM, Pablo Neira Ayuso wrote: > > Hi Marcelo, > > > > On Mon, Mar 22, 2021 at 03:09:51PM -0300, Marcelo Ricardo Leitner wrote: > > > On Wed, Mar 03, 2021 at 05:11

Re: general protection fault in sctp_ulpevent_notify_peer_addr_change

2020-08-10 Thread Marcelo Ricardo Leitner
On Mon, Aug 10, 2020 at 08:37:18AM -0700, syzbot wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:fffe3ae0 Merge tag 'for-linus-hmm' of git://git.kernel.org.. > git tree: upstream > console output: https://syzkaller.appspot.com/x/log.txt?x=12f34d3a90 > kernel

Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier

2020-08-12 Thread Marcelo Ricardo Leitner
On Tue, Aug 11, 2020 at 04:25:43PM -0700, Cong Wang wrote: > On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim wrote: > > > > Interesting idea. Note: my experience is that typical setup is > > to have only one of those (from offload perspective). Ariel, > > are your use cases requiring say both fiel

Re: sctp: num_ostreams and max_instreams negotiation

2020-08-17 Thread Marcelo Ricardo Leitner
On Sat, Aug 15, 2020 at 02:49:31PM +, David Laight wrote: > From: David Laight > > Sent: 14 August 2020 17:18 > > > > > > > At some point the negotiation of the number of SCTP streams > > > > > seems to have got broken. > > > > > I've definitely tested it in the past (probably 10 years ago!) >

Re: sctp: num_ostreams and max_instreams negotiation

2020-08-17 Thread Marcelo Ricardo Leitner
On Mon, Aug 17, 2020 at 11:22:23AM -0300, Marcelo Ricardo Leitner wrote: > On Sat, Aug 15, 2020 at 02:49:31PM +, David Laight wrote: > > From: David Laight > > > Sent: 14 August 2020 17:18 > > > > > > > > > At some point the negotiation of the num

Re: Use of genradix in sctp

2020-08-18 Thread 'Marcelo Ricardo Leitner'
On Tue, Aug 18, 2020 at 03:38:09PM +, David Laight wrote: > A few years ago (for 5.1) the 'arrays' that sctp uses for > info about data streams was changed to use the 'genradix' > functions. > > I'm not sure of the reason for the change, but I don't > thing anyone looked at the performance imp

Re: [PATCH] net: sctp: Fix negotiation of the number of data streams.

2020-08-18 Thread 'Marcelo Ricardo Leitner'
On Tue, Aug 18, 2020 at 02:36:58PM +, David Laight wrote: > The number of streams offered by the remote system was being ignored. > Any data sent on those streams would get discarded by the remote system. That's quite brief and not accurate: it was only ignored if 'Xcnt <= stream->Xcnt'. Othe

Re: [PATCH v2] net: sctp: Fix negotiation of the number of data streams.

2020-08-20 Thread &#x27;Marcelo Ricardo Leitner'
(Resend without the RE:) > > Changes since v1: > - Fix 'Fixes' tag. > - Improve description. > "[PATCH net v2] ..." ^^^-- the tree tag I had mentioned :-) Anyhow, the rest looks fine. Acked-by: Marcelo Ricardo Leitner Thanks David. > diff --git a/net

Re: [PATCHv2 net] sctp: not disable bh in the whole sctp_get_port_local()

2020-08-21 Thread Marcelo Ricardo Leitner
ock_bh() instead. > > The same thing was actually done for inet_csk_get_port() in > Commit ea8add2b1903 ("tcp/dccp: better use of ephemeral > ports in bind()"). > > Thanks to Marcelo for pointing the buggy code out. > > v1->v2: > - use cond_resched() to yield cpu to other tasks if needed, > as Eric noticed. Acked-by: Marcelo Ricardo Leitner

Re: Use of genradix in sctp

2020-08-21 Thread &#x27;Marcelo Ricardo Leitner'
On Wed, Aug 19, 2020 at 08:18:50AM +, David Laight wrote: > From:'Marcelo Ricardo Leitner > > Sent: 18 August 2020 22:38 > > > > On Tue, Aug 18, 2020 at 03:38:09PM +, David Laight wrote: > > > A few years ago (for 5.1) the 'arrays' that sc

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread Marcelo Ricardo Leitner
ller Fixes tag would be welcomed as well, so that if someone backports the fix for it will have a hint to backport this patch also. > > Signed-off-by: Neil Horman > CC: Marcelo Ricardo Leitner > CC: Xin Long > CC: "David S. Miller" > CC: netdev@vger.kernel.org >

Re: [PATCH v2] [net] Free cookie before we memdup a new one

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 07:21:28AM -0400, Neil Horman wrote: Btw, I guess DaveM had meant to add "sctp: " in the subject. Marcelo

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-11 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 05:34:50PM +0200, Toke Høiland-Jørgensen wrote: > Paul Blakey writes: > > > On 6/11/2019 4:59 PM, Toke Høiland-Jørgensen wrote: > >> Paul Blakey writes: > >> > >>> Allow sending a packet to conntrack and set conntrack zone, mark, > >>> labels and nat parameters. > >> How

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-06-12 Thread Marcelo Ricardo Leitner
On Tue, May 28, 2019 at 05:03:50PM +, Kevin 'ldir' Darbyshire-Bryant wrote: ... > +static int tcf_ctinfo_init(struct net *net, struct nlattr *nla, > +struct nlattr *est, struct tc_action **a, > +int ovr, int bind, bool rtnl_held, > +

Re: [PATCH net-next 1/3] net: sched: add mpls manipulation actions to TC

2019-06-12 Thread Marcelo Ricardo Leitner
On Wed, Jun 12, 2019 at 01:51:44PM +0100, John Hurley wrote: > Currently, TC offers the ability to match on the MPLS fields of a packet > through the use of the flow_dissector_key_mpls struct. However, as yet, TC > actions do not allow the modification or manipulation of such fields. > > Add a new

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-12 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 04:28:31PM +0300, Paul Blakey wrote: > Allow sending a packet to conntrack and set conntrack zone, mark, > labels and nat parameters. > > Signed-off-by: Paul Blakey > Signed-off-by: Marcelo Ricardo Leitner > Signed-off-by: Yossi Kuperman >

Re: [PATCH v4 net] sctp: Free cookie before we memdup a new one

2019-06-12 Thread Marcelo Ricardo Leitner
r_hmacs (xin) > > v2->v3 > net->sctp > also free peer_chunks > > v3->v4 > fix subject tags > > Signed-off-by: Neil Horman > Reported-by: syzbot+f7e9153b037eac9b1...@syzkaller.appspotmail.com > CC: Marcelo Ricardo Leitner > CC: Xin Long > CC: "

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-06-12 Thread Marcelo Ricardo Leitner
On Wed, Jun 12, 2019 at 11:46:27AM -0700, Jakub Kicinski wrote: > On Wed, 12 Jun 2019 15:02:39 -0300, Marcelo Ricardo Leitner wrote: > > On Tue, May 28, 2019 at 05:03:50PM +, Kevin 'ldir' Darbyshire-Bryant > > wrote: > > ... > > > +static int tcf_ct

Re: [RFC PATCH net-next] sched: act_ctinfo: use extack error reporting

2019-06-13 Thread Marcelo Ricardo Leitner
On Thu, Jun 13, 2019 at 01:18:52PM +0200, Kevin Darbyshire-Bryant wrote: > Use extack error reporting mechanism in addition to returning -EINVAL > > Signed-off-by: Kevin Darbyshire-Bryant Nice. LGTM! > --- > net/sched/act_ctinfo.c | 23 ++- > 1 file changed, 18 insertions(+

Re: [PATCH v5 net] sctp: Free cookie before we memdup a new one

2019-06-13 Thread Marcelo Ricardo Leitner
gt; > v3->v4 > fix subject tags > > v4->v5 > remove cut line > > Signed-off-by: Neil Horman > Reported-by: syzbot+f7e9153b037eac9b1...@syzkaller.appspotmail.com > CC: Marcelo Ricardo Leitner > CC: Xin Long > CC: "David S. Miller" > CC: netdev@vger.k

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-06-13 Thread Marcelo Ricardo Leitner
On Thu, Jun 13, 2019 at 09:09:47AM +, Kevin 'ldir' Darbyshire-Bryant wrote: > > > > On 13 Jun 2019, at 10:33, Simon Horman wrote: > > > > On Wed, Jun 12, 2019 at 11:46:27AM -0700, Jakub Kicinski wrote: > >> On Wed, 12 Jun 2019 15:02:39 -0300,

Re: [PATCH net-next v6] net: sched: Introduce act_ctinfo action

2019-06-13 Thread Marcelo Ricardo Leitner
On Wed, Jun 12, 2019 at 02:34:58PM -0700, Jakub Kicinski wrote: > On Wed, 12 Jun 2019 21:18:59 +0200, Michal Kubecek wrote: > > On Wed, Jun 12, 2019 at 08:56:10PM +0200, Johannes Berg wrote: > > > (switching to my personal email) > > > > > > > > I can't add these actions with current net-next an

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-14 Thread Marcelo Ricardo Leitner
On Fri, Jun 14, 2019 at 11:07:37AM -0700, Cong Wang wrote: > On Tue, Jun 11, 2019 at 9:44 AM Marcelo Ricardo Leitner > wrote: > > I had suggested to let act_ct handle the above as well, as there is a > > big chunk of code on both that is pretty similar. There is quite some &

Re: [PATCH net-next 1/3] net/sched: Introduce action ct

2019-06-19 Thread Marcelo Ricardo Leitner
On Tue, Jun 11, 2019 at 04:28:31PM +0300, Paul Blakey wrote: ... > +static int tcf_ct_fill_params_nat(struct tcf_ct_params *p, > + struct tc_ct *parm, > + struct nlattr **tb, > + struct netlink_ext_ack *extack

Re: [PATCH net-next 03/13] sctp: remove an if() that is always true

2018-04-27 Thread Marcelo Ricardo Leitner
On Fri, Apr 27, 2018 at 06:50:50AM -0400, Neil Horman wrote: > On Thu, Apr 26, 2018 at 04:58:52PM -0300, Marcelo Ricardo Leitner wrote: > > As noticed by Xin Long, the if() here is always true as PMTU can never > > be 0. > > > > Reported-by: Xin Long > > Signe

[PATCH net] MAINTAINERS: add myself as SCTP co-maintainer

2018-04-27 Thread Marcelo Ricardo Leitner
Signed-off-by: Marcelo Ricardo Leitner --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 92be777d060a7df333a17d69e71bfd01760fa8f2..5bac32b545607933ea41fe9a56cc96d57ee7a094 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12507,6 +12507,7 @@ F

Re: [PATCH net-next] net: phy: Fix modular PHYLIB build

2018-04-28 Thread Marcelo Ricardo Leitner
On Fri, Apr 27, 2018 at 12:41:49PM -0700, Florian Fainelli wrote: > After commit c59530d0d5dc ("net: Move PHY statistics code into PHY > library helpers") we made net/core/ethtool.c reference symbols which are > part of the library which can be modular. David introduced a temporary > fix with 1ecd6

[PATCH net-next 2/2] sctp: add sctp_make_op_error_limited and reuse inner functions

2018-04-29 Thread Marcelo Ricardo Leitner
The idea is quite similar to the old functions, but note that the _fixed function wasn't "fixed" as in that it would generate a packet with a fixed size, but rather limited/bounded to PMTU. Also, now with sctp_mtu_payload(), we have a more accurate limit. Signed-off-by: Marcelo

[PATCH net-next 1/2] sctp: allow sctp_init_cause to return errors

2018-04-29 Thread Marcelo Ricardo Leitner
And do so if the skb doesn't have enough space for the payload. This is a preparation for the next patch. Signed-off-by: Marcelo Ricardo Leitner --- include/net/sctp/sm.h| 2 +- net/sctp/sm_make_chunk.c | 12 +--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --

[PATCH net-next 0/2] sctp: unify sctp_make_op_error_fixed and sctp_make_op_error_space

2018-04-29 Thread Marcelo Ricardo Leitner
These two variants are very close to each other and can be merged to avoid code duplication. That's what this patchset does. First, we allow sctp_init_cause to return errors, which then allow us to add sctp_make_op_error_limited that handles both situations. Marcelo Ricardo Leitner (2):

Re: [PATCH net-next 2/2] sctp: add sctp_make_op_error_limited and reuse inner functions

2018-04-29 Thread Marcelo Ricardo Leitner
On Mon, Apr 30, 2018 at 10:14:06AM +0800, kbuild test robot wrote: > Hi Marcelo, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Marcelo-Ricardo-Leitner/sctp-

Re: [PATCH net-next 0/2] sctp: unify sctp_make_op_error_fixed and sctp_make_op_error_space

2018-05-01 Thread Marcelo Ricardo Leitner
On Tue, May 01, 2018 at 12:13:53PM -0400, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Sun, 29 Apr 2018 12:56:30 -0300 > > > These two variants are very close to each other and can be merged > > to avoid code duplication. That's what this patchset doe

Re: [PATCH net] sctp: init active key for the new asoc in dupcook_a and dupcook_b

2018-05-02 Thread Marcelo Ricardo Leitner
e0bc99474 ("sctp: add refcnt support for sh_key") > Reported-by: Jianwen Ji > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/sm_statefuns.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/net/sctp/sm_statefuns.c b/net/

Re: [PATCH net] sctp: use the old asoc when making the cookie-ack chunk in dupcook_d

2018-05-02 Thread Marcelo Ricardo Leitner
by using the > old asoc instead. > > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/sm_statefuns.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c > inde

Re: [PATCH net] sctp: fix the issue that the cookie-ack with auth can't get processed

2018-05-02 Thread Marcelo Ricardo Leitner
_end + chunk_hdr > size <= skb_tail_pointer(). > > Fixes: 26b87c788100 ("net: sctp: fix remote memory pressure from excessive > queueing") > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/inqueue.c | 2 +- > 1 file changed, 1 inse

Re: non-blocking connect for kernel SCTP sockets

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 02:32:28PM +0200, Michal Kubecek wrote: > On Wed, May 02, 2018 at 05:46:23PM +0800, Xin Long wrote: ... > > It is a bug, https://bugzilla.redhat.com/show_bug.cgi?id=1251530 > > Not authorized. :-) Oups! I just made it public. Marcelo

Re: [PATCH V2 net-next 1/6] virtio: Add support for SCTP checksum offloading

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 06:16:45AM +0300, Michael S. Tsirkin wrote: > On Tue, May 01, 2018 at 10:07:34PM -0400, Vladislav Yasevich wrote: > > To support SCTP checksum offloading, we need to add a new feature > > to virtio_net, so we can negotiate support between the hypervisor > > and the guest. >

Re: [PATCH V2 net-next 1/6] virtio: Add support for SCTP checksum offloading

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 05:21:38PM +0300, Michael S. Tsirkin wrote: > On Wed, May 02, 2018 at 11:14:13AM -0300, Marcelo Ricardo Leitner wrote: > > On Wed, May 02, 2018 at 06:16:45AM +0300, Michael S. Tsirkin wrote: > > > On Tue, May 01, 2018 at 10:07:34PM -0400, Vladis

Re: [PATCH V2 net-next 2/6] sctp: Handle sctp packets with CHECKSUM_PARTIAL

2018-05-02 Thread Marcelo Ricardo Leitner
On Tue, May 01, 2018 at 10:07:35PM -0400, Vladislav Yasevich wrote: > With SCTP checksum offload available in virtio, it is now > possible for virtio to receive a sctp packet with CHECKSUM_PARTIAL > set (guest-to-guest traffic). SCTP doesn't really have a > partial checksum like TCP does, because

Re: [PATCH V2 net-next 4/6] tun: Add support for SCTP checksum offload

2018-05-02 Thread Marcelo Ricardo Leitner
On Tue, May 01, 2018 at 10:07:37PM -0400, Vladislav Yasevich wrote: > Adds a new tun offload flag to allow for SCTP checksum offload. > The flag has to be set by the user and defaults to "no offload". I'm confused here: > +++ b/drivers/net/tun.c > @@ -216,7 +216,7 @@ struct tun_struct { > s

Re: [PATCH V2 net-next 4/6] tun: Add support for SCTP checksum offload

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 11:53:47AM -0300, Marcelo Ricardo Leitner wrote: > On Tue, May 01, 2018 at 10:07:37PM -0400, Vladislav Yasevich wrote: > > Adds a new tun offload flag to allow for SCTP checksum offload. > > The flag has to be set by the user and defaults to "no offloa

Re: [PATCH V2 net-next 0/6] virtio-net: Add SCTP checksum offload support

2018-05-02 Thread Marcelo Ricardo Leitner
On Tue, May 01, 2018 at 10:07:33PM -0400, Vladislav Yasevich wrote: > Now that we have SCTP offload capabilities in the kernel, we can add > them to virtio as well. First step is SCTP checksum. SCTP-wise, LGTM: Acked-by: Marcelo Ricardo Leitner

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Marcelo Ricardo Leitner
Hi Wenwen, On Wed, May 02, 2018 at 05:12:45PM -0500, Wenwen Wang wrote: > In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len > and max_len to check whether it is in the appropriate range. If it is not, > an error code -EINVAL will be returned. This is enforced by a security

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 08:15:45PM -0500, Wenwen Wang wrote: > In sctp_setsockopt_maxseg(), the integer 'val' is compared against min_len > and max_len to check whether it is in the appropriate range. If it is not, > an error code -EINVAL will be returned. This is enforced by a security > check. Bu

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-02 Thread Marcelo Ricardo Leitner
On Wed, May 02, 2018 at 08:27:05PM -0500, Wenwen Wang wrote: > On Wed, May 2, 2018 at 8:24 PM, Marcelo Ricardo Leitner > wrote: > > On Wed, May 02, 2018 at 08:15:45PM -0500, Wenwen Wang wrote: > >> In sctp_setsockopt_maxseg(), the integer 'val' is compared agai

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Marcelo Ricardo Leitner
On Thu, May 03, 2018 at 07:01:51AM -0500, Wenwen Wang wrote: > On Wed, May 2, 2018 at 8:48 PM, Marcelo Ricardo Leitner > wrote: > > On Wed, May 02, 2018 at 08:27:05PM -0500, Wenwen Wang wrote: > >> On Wed, May 2, 2018 at 8:24 PM, Marcelo Ricardo Leitner > >> wrote:

Re: [PATCH] sctp: fix a potential missing-check bug

2018-05-03 Thread Marcelo Ricardo Leitner
On Thu, May 03, 2018 at 08:31:28AM -0500, Wenwen Wang wrote: > On Thu, May 3, 2018 at 7:46 AM, Marcelo Ricardo Leitner > wrote: > > On Thu, May 03, 2018 at 07:01:51AM -0500, Wenwen Wang wrote: > >> On Wed, May 2, 2018 at 8:48 PM, Marcelo Ricardo Leitner > >> wrote:

Re: [PATCH net] sctp: delay the authentication for the duplicated cookie-echo chunk

2018-05-04 Thread Marcelo Ricardo Leitner
On Fri, May 04, 2018 at 05:05:10PM +0800, Xin Long wrote: > Now sctp only delays the authentication for the normal cookie-echo > chunk by setting chunk->auth_chunk in sctp_endpoint_bh_rcv(). But > for the duplicated one with auth, in sctp_assoc_bh_rcv(), it does > authentication first based on the

Re: INFO: rcu detected stall in sctp_generate_heartbeat_event

2018-05-08 Thread Marcelo Ricardo Leitner
On Tue, May 08, 2018 at 12:35:02AM -0700, syzbot wrote: > Hello, > > syzbot found the following crash on: > > HEAD commit:90278871d4b0 Merge git://git.kernel.org/pub/scm/linux/kern.. > git tree: net-next > console output: https://syzkaller.appspot.com/x/log.txt?x=119a723780 > kernel c

Re: KASAN: use-after-free Read in sctp_do_sm

2018-05-08 Thread Marcelo Ricardo Leitner
On Wed, May 09, 2018 at 01:41:03AM +0800, Xin Long wrote: ... > > sctp_chunk_destroy net/sctp/sm_make_chunk.c:1481 [inline] > > sctp_chunk_put+0x321/0x440 net/sctp/sm_make_chunk.c:1504 > > sctp_ulpevent_make_rcvmsg+0x955/0xd40 net/sctp/ulpevent.c:718 > There's no reason to put the chunk in sctp_

Re: [PATCH net] sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg

2018-05-10 Thread Marcelo Ricardo Leitner
frags to access the chunk too") > Reported-by: syzbot+141d898c5f24489db...@syzkaller.appspotmail.com > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/ulpevent.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/net/sctp/ulpevent.c b/net/sctp/ulp

Re: INFO: rcu detected stall in kfree_skbmem

2018-05-11 Thread Marcelo Ricardo Leitner
On Fri, May 11, 2018 at 12:00:38PM +0200, Dmitry Vyukov wrote: > On Mon, Apr 30, 2018 at 8:09 PM, syzbot > wrote: > > Hello, > > > > syzbot found the following crash on: > > > > HEAD commit:5d1365940a68 Merge > > git://git.kernel.org/pub/scm/linux/kerne... > > git tree: net-next > > cons

Re: INFO: rcu detected stall in kfree_skbmem

2018-05-11 Thread Marcelo Ricardo Leitner
On Fri, May 11, 2018 at 12:08:33PM -0700, Eric Dumazet wrote: > > > On 05/11/2018 11:41 AM, Marcelo Ricardo Leitner wrote: > > > But calling ip6_xmit with rcu_read_lock is expected. tcp stack also > > does it. > > Thus I think this is more of an issue with IP

[PATCH net-next 0/8] sctp: refactor sctp_outq_flush

2018-05-11 Thread Marcelo Ricardo Leitner
. Marcelo Ricardo Leitner (8): sctp: add sctp_packet_singleton sctp: factor out sctp_outq_select_transport sctp: move the flush of ctrl chunks into its own function sctp: move outq data rtx code out of sctp_outq_flush sctp: move flushing of data chunks out of sctp_outq_flush sctp: move

[PATCH net-next 1/8] sctp: add sctp_packet_singleton

2018-05-11 Thread Marcelo Ricardo Leitner
Factor out the code for generating singletons. It's used only once, but helps to keep the context contained. The const variables are to ease the reading of subsequent calls in there. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 22 +++--- 1 file change

[PATCH net-next 6/8] sctp: move transport flush code out of sctp_outq_flush

2018-05-11 Thread Marcelo Ricardo Leitner
go through all enlisted transports. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 56 + 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index

[PATCH net-next 7/8] sctp: make use of gfp on retransmissions

2018-05-11 Thread Marcelo Ricardo Leitner
Retransmissions may be triggered when in user context, so lets make use of gfp. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index

[PATCH net-next 3/8] sctp: move the flush of ctrl chunks into its own function

2018-05-11 Thread Marcelo Ricardo Leitner
behavior. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 89 - 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index bda50596d4bfebeac03966c5a161473df1c1986a

[PATCH net-next 5/8] sctp: move flushing of data chunks out of sctp_outq_flush

2018-05-11 Thread Marcelo Ricardo Leitner
To the new sctp_outq_flush_data. Again, smaller functions and with well defined objectives. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 144 ++-- 1 file changed, 73 insertions(+), 71 deletions(-) diff --git a/net/sctp

[PATCH net-next 4/8] sctp: move outq data rtx code out of sctp_outq_flush

2018-05-11 Thread Marcelo Ricardo Leitner
sctp_outq_flush_rtx. That is kept as is for now because it may be very different when we implement retransmission path selection algorithms for CMT-SCTP. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 101 ++-- 1 file changed, 58 insertions(+), 43

[PATCH net-next 2/8] sctp: factor out sctp_outq_select_transport

2018-05-11 Thread Marcelo Ricardo Leitner
). Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 187 +--- 1 file changed, 90 insertions(+), 97 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 300bd0dfc7c14c9df579dbe2f9e78dd8356ae1a3

[PATCH net-next 8/8] sctp: rework switch cases in sctp_outq_flush_data

2018-05-11 Thread Marcelo Ricardo Leitner
Long Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 191 +--- 1 file changed, 93 insertions(+), 98 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 388e0665057be6ca7864b8bfdc0925e95e8b2858

[PATCH net-next 2/3] sctp: add asoc and packet to sctp_flush_ctx

2018-05-11 Thread Marcelo Ricardo Leitner
Pre-compute these so the compiler won't reload them (due to no-strict-aliasing). Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 99 - 1 file changed, 45 insertions(+), 54 deletions(-) diff --git a/net/sctp/outqueue.c

[PATCH net-next 1/3] sctp: add sctp_flush_ctx, a context struct on outq_flush routines

2018-05-11 Thread Marcelo Ricardo Leitner
With this struct we avoid passing lots of variables around and taking care of updating the current transport/packet. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 182 +--- 1 file changed, 88 insertions(+), 94 deletions(-) diff

[PATCH net-next 3/3] sctp: checkpatch fixups

2018-05-11 Thread Marcelo Ricardo Leitner
A collection of fixups from previous patches, left for later to not introduce unnecessary changes while moving code around. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/net/sctp

[PATCH net-next 0/3] sctp: Introduce sctp_flush_ctx

2018-05-11 Thread Marcelo Ricardo Leitner
This struct will hold all the context used during the outq flush, so we don't have to pass lots of pointers all around. Checked on x86_64, the compiler inlines all these functions and there is no derreference added because of the struct. Marcelo Ricardo Leitner (3): sctp: add sctp_flush_c

Re: [PATCH net-next 3/8] sctp: move the flush of ctrl chunks into its own function

2018-05-12 Thread Marcelo Ricardo Leitner
On Fri, May 11, 2018 at 08:28:45PM -0300, Marcelo Ricardo Leitner wrote: > Named sctp_outq_flush_ctrl and, with that, keep the contexts contained. kbuild bot spotted some issues with this patch. They were corrected later on on the series, but I should fix them here. Will post a v2 later today.

[PATCH net-next v2 0/8] sctp: refactor sctp_outq_flush

2018-05-12 Thread Marcelo Ricardo Leitner
. Changes since v1: - fix build issues on patches 3 and 4, and updated 5 and 8 because of it. Marcelo Ricardo Leitner (8): sctp: add sctp_packet_singleton sctp: factor out sctp_outq_select_transport sctp: move the flush of ctrl chunks into its own function sctp: move outq data rtx code out

[PATCH net-next v2 2/8] sctp: factor out sctp_outq_select_transport

2018-05-12 Thread Marcelo Ricardo Leitner
). Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 187 +--- 1 file changed, 90 insertions(+), 97 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 300bd0dfc7c14c9df579dbe2f9e78dd8356ae1a3

[PATCH net-next v2 5/8] sctp: move flushing of data chunks out of sctp_outq_flush

2018-05-12 Thread Marcelo Ricardo Leitner
To the new sctp_outq_flush_data. Again, smaller functions and with well defined objectives. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 148 ++-- 1 file changed, 75 insertions(+), 73 deletions(-) diff --git a/net/sctp

[PATCH net-next v2 3/8] sctp: move the flush of ctrl chunks into its own function

2018-05-12 Thread Marcelo Ricardo Leitner
behavior. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 89 - 1 file changed, 54 insertions(+), 35 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index bda50596d4bfebeac03966c5a161473df1c1986a

[PATCH net-next v2 6/8] sctp: move transport flush code out of sctp_outq_flush

2018-05-12 Thread Marcelo Ricardo Leitner
go through all enlisted transports. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 56 + 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index

[PATCH net-next v2 1/8] sctp: add sctp_packet_singleton

2018-05-12 Thread Marcelo Ricardo Leitner
Factor out the code for generating singletons. It's used only once, but helps to keep the context contained. The const variables are to ease the reading of subsequent calls in there. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 22 +++--- 1 file change

[PATCH net-next v2 7/8] sctp: make use of gfp on retransmissions

2018-05-12 Thread Marcelo Ricardo Leitner
Retransmissions may be triggered when in user context, so lets make use of gfp. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index

[PATCH net-next v2 4/8] sctp: move outq data rtx code out of sctp_outq_flush

2018-05-12 Thread Marcelo Ricardo Leitner
sctp_outq_flush_rtx. That is kept as is for now because it may be very different when we implement retransmission path selection algorithms for CMT-SCTP. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 101 ++-- 1 file changed, 58 insertions(+), 43

[PATCH net-next v2 8/8] sctp: rework switch cases in sctp_outq_flush_data

2018-05-12 Thread Marcelo Ricardo Leitner
Long Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 191 +--- 1 file changed, 93 insertions(+), 98 deletions(-) diff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c index 8173dd26f5878cbf67dd7e162ac5e6b18d9a3332

[PATCH net-next v2 1/3] sctp: add sctp_flush_ctx, a context struct on outq_flush routines

2018-05-12 Thread Marcelo Ricardo Leitner
With this struct we avoid passing lots of variables around and taking care of updating the current transport/packet. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 182 +--- 1 file changed, 88 insertions(+), 94 deletions(-) diff

[PATCH net-next v2 0/3] sctp: Introduce sctp_flush_ctx

2018-05-12 Thread Marcelo Ricardo Leitner
outq_flush' Changes since v1: - updated to build on top of v2 of 'sctp: refactor sctp_outq_flush' Marcelo Ricardo Leitner (3): sctp: add sctp_flush_ctx, a context struct on outq_flush routines sctp: add asoc and packet to sctp_flush_ctx sctp: checkpatch fixups

[PATCH net-next v2 3/3] sctp: checkpatch fixups

2018-05-12 Thread Marcelo Ricardo Leitner
A collection of fixups from previous patches, left for later to not introduce unnecessary changes while moving code around. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/net/sctp

[PATCH net-next v2 2/3] sctp: add asoc and packet to sctp_flush_ctx

2018-05-12 Thread Marcelo Ricardo Leitner
Pre-compute these so the compiler won't reload them (due to no-strict-aliasing). Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/outqueue.c | 99 - 1 file changed, 45 insertions(+), 54 deletions(-) diff --git a/net/sctp/outqueue.c

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-17 Thread Marcelo Ricardo Leitner
On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: > On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: > > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: > >> Now that we have SCTP offload capabilities in the kernel, we can add > >

Re: [PATCH net-next 1/5] tcp: fix SO_RCVLOWAT and RCVBUF autotuning

2018-04-19 Thread Marcelo Ricardo Leitner
On Mon, Apr 16, 2018 at 10:33:35AM -0700, Eric Dumazet wrote: > Applications might use SO_RCVLOWAT on TCP socket hoping to receive > one [E]POLLIN event only when a given amount of bytes are ready in socket > receive queue. > > Problem is that receive autotuning is not aware of this constraint, > m

Re: [PATCH net-next 1/5] tcp: fix SO_RCVLOWAT and RCVBUF autotuning

2018-04-19 Thread Marcelo Ricardo Leitner
On Fri, Apr 20, 2018 at 02:36:52AM +, Eric Dumazet wrote: > On Thu, Apr 19, 2018 at 7:02 PM Marcelo Ricardo Leitner < > marcelo.leit...@gmail.com> wrote: > > > Hi Eric, > > > As val may be changed to a smaller value by the line above, shouldn't > > it

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-20 Thread Marcelo Ricardo Leitner
On Wed, Apr 18, 2018 at 05:06:46PM +0300, Michael S. Tsirkin wrote: > On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: > > On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: > > > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: > >

Re: [PATCH net-next 1/2] net/sctp: Make wrappers for accessing in/out streams

2018-04-23 Thread Marcelo Ricardo Leitner
On Mon, Apr 23, 2018 at 09:41:05PM +0300, Oleg Babin wrote: > This patch introduces wrappers for accessing in/out streams indirectly. > This will enable to replace physically contiguous memory arrays > of streams with flexible arrays (or maybe any other appropriate > mechanism) which do memory allo

Re: [PATCH net-next 0/2] net/sctp: Avoid allocating high order memory with kmalloc()

2018-04-23 Thread Marcelo Ricardo Leitner
Hi, On Mon, Apr 23, 2018 at 09:41:04PM +0300, Oleg Babin wrote: > Each SCTP association can have up to 65535 input and output streams. > For each stream type an array of sctp_stream_in or sctp_stream_out > structures is allocated using kmalloc_array() function. This function > allocates physically

[PATCH net-next] sctp: fix identification of new acks for SFR-CACC

2018-04-24 Thread Marcelo Ricardo Leitner
er transmitted list on transport delete") Signed-off-by: Marcelo Ricardo Leitner --- Even though this is a -stable candidate, please apply it to net-next to avoid conflicts with subsequent patches in my queue. Thanks. net/sctp/outqueue.c | 48 +++--

[PATCH net-next] sctp: fix const parameter violation in sctp_make_sack

2018-04-24 Thread Marcelo Ricardo Leitner
sctp_make_sack() make changes to the asoc and this cast is just bypassing the const attribute. As there is no need to have the const there, just remove it and fix the violation. Signed-off-by: Marcelo Ricardo Leitner --- This one can go to net or net-next, but targetting net-next here just to

Re: [PATCH net-next] sctp: remove the unused sctp_assoc_is_match function

2018-04-25 Thread Marcelo Ricardo Leitner
On Wed, Apr 25, 2018 at 05:46:47PM +0800, Xin Long wrote: > After Commit 4f0087812648 ("sctp: apply rhashtable api to send/recv > path"), there's no place using sctp_assoc_is_match, so remove it. > > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner > ---

Re: [PATCH net-next] sctp: fix identification of new acks for SFR-CACC

2018-04-25 Thread Marcelo Ricardo Leitner
On Wed, Apr 25, 2018 at 01:22:39PM -0400, David Miller wrote: > From: Marcelo Ricardo Leitner > Date: Tue, 24 Apr 2018 18:17:35 -0300 > > > It's currently written as: > > > > if (!tchunk->tsn_gap_acked) { [1] > > tchunk->tsn_gap_acked =

Re: [PATCH net] sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr

2018-04-26 Thread Marcelo Ricardo Leitner
t; > This patch fixes it by adding the process for two v4 addrs in > sctp_inet6_cmp_addr. > > Fixes: 1071ec9d453a ("sctp: do not check port in sctp_inet6_cmp_addr") > Reported-by: syzbot+cd494c1dd681d4d93...@syzkaller.appspotmail.com > Signed-off-by: Xin Long Acked-b

Re: [PATCH net] sctp: clear the new asoc's stream outcnt in sctp_stream_update

2018-04-26 Thread Marcelo Ricardo Leitner
update. > > Fixes: f952be79cebd ("sctp: introduce struct sctp_stream_out_ext") > Reported-by: Jianwen Ji > Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner > --- > net/sctp/stream.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/sctp/stream.c b

[PATCH net-next 06/13] sctp: introduce sctp_assoc_update_frag_point

2018-04-26 Thread Marcelo Ricardo Leitner
and avoid the open-coded versions of it. Now sctp_datamsg_from_user can just re-use asoc->frag_point as it will always be updated. Signed-off-by: Marcelo Ricardo Leitner --- include/net/sctp/sctp.h| 20 include/net/sctp/structs.h | 1 + net/sctp/associola.c |

[PATCH net-next 12/13] sctp: consider idata chunks when setting SCTP_MAXSEG

2018-04-26 Thread Marcelo Ricardo Leitner
When setting SCTP_MAXSEG sock option, it should consider which kind of data chunk is being used if the asoc is already available, so that the limit better reflect reality. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/socket.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions

[PATCH net-next 05/13] sctp: introduce sctp_mtu_payload

2018-04-26 Thread Marcelo Ricardo Leitner
When given a MTU, this function calculates how much payload we can carry on it. Without a MTU, it calculates the amount of header overhead we have. So that when we have extra overhead, like the one added for IP options on SELinux patches, it is easier to handle it. Signed-off-by: Marcelo Ricardo

[PATCH net-next 11/13] sctp: honor PMTU_DISABLED when handling icmp

2018-04-26 Thread Marcelo Ricardo Leitner
Ricardo Leitner --- net/sctp/socket.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index bb08d44b8380ffbf80b194a1291fed4069e4..ad8965835d8d51d4eda857b91dfca140710bf7da 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c

[PATCH net-next 10/13] sctp: re-use sctp_transport_pmtu in sctp_transport_route

2018-04-26 Thread Marcelo Ricardo Leitner
just include such release too. Signed-off-by: Marcelo Ricardo Leitner --- net/sctp/socket.c| 6 ++ net/sctp/transport.c | 35 +-- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c

[PATCH net-next 09/13] sctp: remove sctp_transport_pmtu_check

2018-04-26 Thread Marcelo Ricardo Leitner
We are now keeping the MTU information synced between asoc, transport and dst, which makes the check at sctp_packet_config() not needed anymore. As it was the sole caller to this function, lets remove it. Signed-off-by: Marcelo Ricardo Leitner --- include/net/sctp/sctp.h | 12 net

[PATCH net-next 07/13] sctp: remove sctp_assoc_pending_pmtu

2018-04-26 Thread Marcelo Ricardo Leitner
No need for this helper. Signed-off-by: Marcelo Ricardo Leitner --- include/net/sctp/sctp.h | 6 -- net/sctp/socket.c | 6 -- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h index

<    1   2   3   4   5   6   7   8   9   10   >