Re: [PATCH net] vxlan: update skb dst pmtu on tx path

2017-12-19 Thread Xin Long
On Wed, Dec 20, 2017 at 12:12 AM, David Miller <da...@davemloft.net> wrote: > From: Xin Long <lucien@gmail.com> > Date: Mon, 18 Dec 2017 14:20:56 +0800 > >> Unlike ip tunnels, now vxlan doesn't do any pmtu update for >> upper dst pmtu, even if it doesn't mat

Re: INFO: task hung in bpf_exit_net

2017-12-19 Thread Xin Long
On Tue, Dec 19, 2017 at 8:47 PM, Dmitry Vyukov wrote: > On Tue, Dec 19, 2017 at 1:36 PM, syzbot > > wrote: >> Hello, >> >> syzkaller hit the following crash on >> 7ceb97a071e80f1b5e4cd5a36de135612a836388

Re: [PATCH net] sctp: add SCTP_CID_RECONF conversion in sctp_cname

2017-12-18 Thread Xin Long
On Mon, Dec 18, 2017 at 9:08 PM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Mon, Dec 18, 2017 at 02:13:17PM +0800, Xin Long wrote: >> Whenever a new type of chunk is added, the corresp conversion in >> sctp_cname should be added. Otherwise, in

[PATCH net] ip6_tunnel: get the min mtu properly in ip6_tnl_xmit

2017-12-17 Thread Xin Long
Jianlin Shi <ji...@redhat.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/ipv6/ip6_tunnel.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index db84f52..931c38f 100644 --- a/net/ipv6/ip6_tunnel.c +++

[PATCH net] ip6_gre: remove the incorrect mtu limit for ipgre tap

2017-12-17 Thread Xin Long
The same fix as the patch "ip_gre: remove the incorrect mtu limit for ipgre tap" is also needed for ip6_gre. Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Signed-off-by: Xin Long <lucien@gmail.com> --- net/ipv6/ip6_gre.c | 1 + 1 file cha

[PATCH net] ip_gre: remove the incorrect mtu limit for ipgre tap

2017-12-17 Thread Xin Long
ot correct for ipgre tap device. Besides, it's .change_mtu already does the right check. So this patch is just to set max_mtu as 0, and leave the check to it's .change_mtu. Fixes: 61e84623ace3 ("net: centralize net_device min/max MTU checking") Reported-by: Jianlin Shi <ji...@redhat.

[PATCH net] vxlan: update skb dst pmtu on tx path

2017-12-17 Thread Xin Long
packets process of udp tunnels will also needs this. The same thing will be done for geneve in another patch. Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/vxlan.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c

[PATCH net] sctp: add SCTP_CID_RECONF conversion in sctp_cname

2017-12-17 Thread Xin Long
Whenever a new type of chunk is added, the corresp conversion in sctp_cname should be added. Otherwise, in some places, pr_debug will print it as "unknown chunk". Fixes: cc16f00f6529 ("sctp: add support for generating stream reconf ssn reset request chunk") Signed-off-

[PATCH net] sctp: fix the issue that a __u16 variable may overflow in sctp_ulpq_renege

2017-12-17 Thread Xin Long
, as all renege commands are generated in sctp_eat_data and it can't be NULL. Reported-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/ulpqueue.c | 24 1 file changed, 8 insertions(+), 16 deleti

[PATCHv2 net-next 8/8] sctp: support sysctl to allow users to use stream interleave

2017-12-14 Thread Xin Long
This is the last patch for support of stream interleave, after this patch, users could enable stream interleave by systcl -w net.sctp.intl_enable=1. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/sysctl.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/sctp/sysc

[PATCHv2 net-next 4/8] sctp: implement report_ftsn for sctp_stream_interleave

2017-12-14 Thread Xin Long
. Note that sctp_report_iftsn doesn't do asoc abort_pd, as stream abort_pd will be done when handling ifwdtsn. But when ftsn is equal with ftsn, which means asoc reset, asoc abort_pd has to be done. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 1

[PATCHv2 net-next 6/8] sctp: add stream interleave support in stream scheduler

2017-12-14 Thread Xin Long
to ignore datamsg boundaries when dequeueing. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sctp/stream_sched.c b/net/sctp/stream_sched.c index d8c162a..f5fcd42 100644 --- a/net/sctp/stream_sched.c

[PATCHv2 net-next 7/8] sctp: update mid instead of ssn when doing stream and asoc reset

2017-12-14 Thread Xin Long
-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/net/sctp/stream.c b/net/sctp/stream.c index b3a9f37..06b644d 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@ -

[PATCHv2 net-next 3/8] sctp: implement validate_ftsn for sctp_stream_interleave

2017-12-14 Thread Xin Long
the sctp.intl_enable check for idata chunks in sctp_chunk_event_lookup, as it will do this check in validate_data later. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 2 ++ include/net/sctp/structs.h | 10 net/sctp/sm_state

[PATCHv2 net-next 5/8] sctp: implement handle_ftsn for sctp_stream_interleave

2017-12-14 Thread Xin Long
stream abort pd. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 2 ++ net/sctp/sm_sideeffect.c | 15 ++- net/sctp/stream_interleave.c | 49 3 files changed, 53 insertions(+), 13 del

[PATCHv2 net-next 2/8] sctp: implement generate_ftsn for sctp_stream_interleave

2017-12-14 Thread Xin Long
generate_ftsn is added as a member of sctp_stream_interleave, used to create fwdtsn or ifwdtsn chunk according to abandoned chunks, called in sctp_retransmit and sctp_outq_sack. sctp_generate_iftsn works for ifwdtsn, and sctp_generate_fwdtsn is still used for making fwdtsn. Signed-off-by: Xin

[PATCHv2 net-next 1/8] sctp: add basic structures and make chunk function for ifwdtsn

2017-12-14 Thread Xin Long
sctp_ifwdtsn_skip, sctp_ifwdtsn_hdr and sctp_ifwdtsn_chunk are used to define and parse I-FWD TSN chunk format, and sctp_make_ifwdtsn is a function to build the chunk. The I-FORWARD-TSN Chunk Format is defined in section 2.3.1 of RFC8260. Signed-off-by: Xin Long <lucien@gmail.

[PATCHv2 net-next 0/8] sctp: Implement Stream Interleave: Interaction with Other SCTP Extensions

2017-12-14 Thread Xin Long
-> v2: - removed the intl_enable check from sctp_chunk_event_lookup, as Marcelo's suggestion. - fixed a typo in changelog. Xin Long (8): sctp: add basic structures and make chunk function for ifwdtsn sctp: implement generate_ftsn for sctp_stream_interleave sctp: implement validate_f

Re: [PATCH net-next 4/8] sctp: implement report_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
On Tue, Dec 12, 2017 at 9:25 PM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Tue, Dec 12, 2017 at 05:25:55PM +0800, Xin Long wrote: >> report_ftsn is added as a member of sctp_stream_interleave, used to >> skip tsn from tsnmap, remove old events from

Re: [PATCH net-next 3/8] sctp: implement validate_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
On Tue, Dec 12, 2017 at 9:37 PM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Tue, Dec 12, 2017 at 09:31:36PM +0800, Xin Long wrote: >> On Tue, Dec 12, 2017 at 9:18 PM, Marcelo Ricardo Leitner >> <marcelo.leit...@gmail.com> wrote: >> > On T

Re: [PATCH net-next 3/8] sctp: implement validate_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
On Tue, Dec 12, 2017 at 9:18 PM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Tue, Dec 12, 2017 at 05:25:54PM +0800, Xin Long wrote: > ... >> --- a/net/sctp/sm_statetable.c >> +++ b/net/sctp/sm_statetable.c >> @@ -992,7 +992,8 @@ static co

Re: [PATCH net] ipv6: mcast: better catch silly mtu values

2017-12-12 Thread Xin Long
On Mon, Dec 11, 2017 at 11:03 PM, Eric Dumazet <eric.duma...@gmail.com> wrote: > From: Eric Dumazet <eduma...@google.com> > > syzkaller reported crashes in IPv6 stack [1] > > Xin Long found that lo MTU was set to silly values. > > IPv6 stack reacts to changes

[PATCH net-next 1/8] sctp: add basic structures and make chunk function for ifwdtsn

2017-12-12 Thread Xin Long
sctp_ifwdtsn_skip, sctp_ifwdtsn_hdr and sctp_ifwdtsn_chunk are used to define and parse I-FWD TSN chunk format, and sctp_make_ifwdtsn is a function to build the chunk. The I-FORWARD-TSN Chunk Format is defined in section 2.3.1 of RFC8260. Signed-off-by: Xin Long <lucien@gmail.

[PATCH net-next 7/8] sctp: update mid instead of ssn when doing stream and asoc reset

2017-12-12 Thread Xin Long
-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 40 +--- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/net/sctp/stream.c b/net/sctp/stream.c index b3a9f37..06b644d 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@ -

[PATCH net-next 8/8] sctp: support sysctl to allow users to use stream interleave

2017-12-12 Thread Xin Long
This is the last patch for support of stream interleave, after this patch, users could enable stream interleave by systcl -w net.sctp.intl_enable=1. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/sysctl.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/net/sctp/sysc

[PATCH net-next 6/8] sctp: add stream interleave support in stream scheduler

2017-12-12 Thread Xin Long
to ignore datamsg boundaries when dequeueing. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream_sched.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/sctp/stream_sched.c b/net/sctp/stream_sched.c index d8c162a..f5fcd42 100644 --- a/net/sctp/stream_sched.c

[PATCH net-next 5/8] sctp: implement handle_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
stream abort pd. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 2 ++ net/sctp/sm_sideeffect.c | 15 ++- net/sctp/stream_interleave.c | 49 3 files changed, 53 insertions(+), 13 del

[PATCH net-next 4/8] sctp: implement report_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
. Note that sctp_report_iftsn doesn't do asoc abort_pd, as stream abort_pd will be done when handling ifwdtsn. But when ftsn is equal with ftsn, which means asoc reset, asoc abot_pd has to be done. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 1

[PATCH net-next 3/8] sctp: implement validate_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
to add event table for ifwdtsn, but just share prsctp_chunk_event_table with fwdtsn's. It would drop fwdtsn chunk for ifwdtsn and drop ifwdtsn chunk for fwdtsn by calling validate_ftsn in sctp_sf_eat_fwd_tsn. After this patch, the ifwdtsn can be accepted. Signed-off-by: Xin Long <luc

[PATCH net-next 2/8] sctp: implement generate_ftsn for sctp_stream_interleave

2017-12-12 Thread Xin Long
generate_ftsn is added as a member of sctp_stream_interleave, used to create fwdtsn or ifwdtsn chunk according to abandoned chunks, called in sctp_retransmit and sctp_outq_sack. sctp_generate_iftsn works for ifwdtsn, and sctp_generate_fwdtsn is still used for making fwdtsn. Signed-off-by: Xin

[PATCH net-next 0/8] sctp: Implement Stream Interleave: Interaction with Other SCTP Extensions

2017-12-12 Thread Xin Long
adds the support for SCTP Partial Reliability Extension with I-FORWARD-TSN chunk. Then adjusts stream scheduler and stream reconfig to make them work properly with I-DATA chunks. In the last patch, all stream interleave codes will be enabled by adding sysctl to allow users to use this feature. Xin

[PATCH net] fou: fix some member types in guehdr

2017-12-10 Thread Xin Long
funcions. This patch could fix a bunch of sparse warnings from fou. Fixes: 5024c33ac354 ("gue: Add infrastructure for flags and options") Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/gue.h | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[PATCH net] sctp: make sure stream nums can match optlen in sctp_setsockopt_reset_streams

2017-12-09 Thread Xin Long
ement sender-side procedures for SSN Reset Request Parameter") Reported-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/socket.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/sctp/socket.c b/net/sc

Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2017-12-09 Thread Xin Long
On Sun, Dec 10, 2017 at 3:36 AM, Cong Wang <xiyou.wangc...@gmail.com> wrote: > On Fri, Dec 8, 2017 at 12:45 AM, Xin Long <lucien@gmail.com> wrote: >> This isn't a sctp problem, but mld's, seems when lo's mtu became 0, >> it allocs a skb without enough space in add_gr

Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2017-12-09 Thread Xin Long
On Sun, Dec 10, 2017 at 12:59 AM, Eric Dumazet <eric.duma...@gmail.com> wrote: > On Sat, 2017-12-09 at 19:23 +0800, Xin Long wrote: >> On Fri, Dec 8, 2017 at 4:45 PM, Xin Long <lucien@gmail.com> >> wrote: >> > On Fri, Dec

Re: KASAN: slab-out-of-bounds Read in sctp_send_reset_streams

2017-12-09 Thread Xin Long
On Sat, Dec 9, 2017 at 7:35 PM, Xin Long <lucien@gmail.com> wrote: > On Sat, Dec 9, 2017 at 6:40 PM, syzbot > <bot+0665d43fa62276c7a5e3372929aa0bab96260...@syzkaller.appspotmail.com> > wrote: >> Hello, >> >> syzkaller hit the following crash on >

Re: KASAN: slab-out-of-bounds Read in sctp_send_reset_streams

2017-12-09 Thread Xin Long
On Sat, Dec 9, 2017 at 6:40 PM, syzbot wrote: > Hello, > > syzkaller hit the following crash on > 328b4ed93b69a6f2083d52f31a240a09e5de386a > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/master > compiler:

Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2017-12-09 Thread Xin Long
On Fri, Dec 8, 2017 at 4:45 PM, Xin Long <lucien@gmail.com> wrote: > On Fri, Dec 8, 2017 at 4:16 PM, syzbot > <bot+ed0838d0fa4c4f2b528e20286e6dc63effc7c...@syzkaller.appspotmail.com> > wrote: >> syzkaller has found reprodu

Re: [PATCHv2 net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave

2017-12-08 Thread Xin Long
On Sat, Dec 9, 2017 at 1:29 AM, David Laight <david.lai...@aculab.com> wrote: > From: Xin Long ... >> Hi, David, Sorry, I'm not sure we're worrying about the cpu cost or >> codes style now ? >> >> For cpu cost, I think 0x848(%r13) operation must be better than

Re: [PATCHv2 net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave

2017-12-08 Thread Xin Long
On Sat, Dec 9, 2017 at 12:22 AM, David Laight <david.lai...@aculab.com> wrote: > From: Xin Long >> Sent: 08 December 2017 16:18 >> > ... >> >> Alternatively you could preform the dereference in two steps (i.e. >> >> declare an si >> >&

Re: [PATCHv2 net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave

2017-12-08 Thread Xin Long
, David Laight wrote: >> > > From: Xin Long >> > > > Sent: 08 December 2017 13:04 >> > > ... >> > > > @@ -264,8 +264,8 @@ struct sctp_datamsg *sctp_datamsg_from_user(struct >> > > >

[PATCHv2 net-next 11/12] sctp: implement abort_pd for sctp_stream_interleave

2017-12-08 Thread Xin Long
function sctp_ulpq_abort_pd for data. Note that sctp_ulpevent_make_pdapi will support per stream in this patch by adding pdapi_stream and pdapi_seq in sctp_pdapi_event, as described in section 6.1.7 of RFC6458. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo L

[PATCHv2 net-next 12/12] sctp: add support for the process of unordered idata

2017-12-08 Thread Xin Long
. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Acked-by: Neil Horman <nhor...@tuxdriver.com> --- include/net/sctp/structs.h | 14 +- include/net/sctp/ulpqueue.h | 1 + net/sctp/socket.c|

[PATCHv2 net-next 07/12] sctp: implement ulpevent_data for sctp_stream_interleave

2017-12-08 Thread Xin Long
t/sctp/stream_interleave.c b/net/sctp/stream_interleave.c index 3d8733b..8238311 100644 --- a/net/sctp/stream_interleave.c +++ b/net/sctp/stream_interleave.c @@ -29,8 +29,10 @@ *Xin Long <lucien@gmail.com> */ +#include #include #include +#include #include static str

[PATCHv2 net-next 09/12] sctp: implement renege_events for sctp_stream_interleave

2017-12-08 Thread Xin Long
-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Acked-by: Neil Horman <nhor...@tuxdriver.com> --- include/net/sctp/stream_interleave.h | 2 + include/net/sctp/ulpqueue.h | 9 +-- net/sctp/sm_sideeffect.c

[PATCHv2 net-next 10/12] sctp: implement start_pd for sctp_stream_interleave

2017-12-08 Thread Xin Long
s well. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Acked-by: Neil Horman <nhor...@tuxdriver.com> --- include/net/sctp/stream_interleave.h | 1 + net/sctp/sm_sideeffect.c | 2 +- net/sctp/stream_interl

[PATCHv2 net-next 02/12] sctp: add asoc intl_enable negotiation during 4 shakehands

2017-12-08 Thread Xin Long
asoc intl_enable will be set when local sp strm_interleave is set and there's I-DATA chunk in init and init_ack extensions, as said in section 2.2.1 of RFC8260. asoc intl_enable indicates all data will be sent as I-DATA chunks. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: M

[PATCHv2 net-next 06/12] sctp: implement validate_data for sctp_stream_interleave

2017-12-08 Thread Xin Long
) with sctp_datachk_len for rx path. After this patch, the idata can be accepted and delivered to ulp layer. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Acked-by: Neil Horman <nhor...@tuxdriver.com> --- inc

[PATCHv2 net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave

2017-12-08 Thread Xin Long
efines data_chunk_len for sctp_stream_interleave to describe the chunk size. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Acked-by: Neil Horman <nhor...@tuxdriver.com> --- include/net/sctp/sm.h|

[PATCHv2 net-next 05/12] sctp: implement assign_number for sctp_stream_interleave

2017-12-08 Thread Xin Long
, it has to wait_connect in sctp_sendmsg, as asoc intl_enable need to be known after 4 shake- hands, to decide if it should use data or idata later. data and idata can't be mixed to send in one asoc. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <mar

[PATCHv2 net-next 03/12] sctp: add basic structures and make chunk function for idata

2017-12-08 Thread Xin Long
sctp_idatahdr and sctp_idata_chunk are used to define and parse I-DATA chunk format, and sctp_make_idata is a function to build the chunk. The I-DATA Chunk Format is defined in section 2.1 of RFC8260. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <mar

[PATCHv2 net-next 00/12] sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving

2017-12-08 Thread Xin Long
stream interleave codes are completely accomplished. v1 -> v2: - fixed a checkpatch warning that a blank line was missed. - avoided a kbuild warning reported from gcc-4.9. Xin Long (12): sctp: add stream interleave enable members and sockopt sctp: add asoc intl_enable negotiation durin

[PATCHv2 net-next 01/12] sctp: add stream interleave enable members and sockopt

2017-12-08 Thread Xin Long
are set. Signed-off-by: Xin Long <lucien@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Acked-by: Neil Horman <nhor...@tuxdriver.com> --- include/net/netns/sctp.h | 5 ++- include/net/sctp/structs.h | 2 ++ include/uapi/linux/sctp.h | 1 +

Re: kernel BUG at net/core/skbuff.c:LINE! (2)

2017-12-08 Thread Xin Long
On Fri, Dec 8, 2017 at 4:16 PM, syzbot wrote: > syzkaller has found reproducer for the following crash on > 82bcf1def3b5f1251177ad47c44f7e17af039b4b > git://git.cmpxchg.org/linux-mmots.git/master > compiler: gcc (GCC) 7.1.1

Re: [PATCH net-next 09/12] sctp: implement renege_events for sctp_stream_interleave

2017-12-07 Thread Xin Long
On Fri, Dec 8, 2017 at 11:45 AM, kbuild test robot <l...@intel.com> wrote: > Hi Xin, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on net-next/master] > > url: > https://github.com/0day-ci/linux/commits/Xin-Long/sctp-Imp

Re: [PATCH net-next 00/12] sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving

2017-12-05 Thread Xin Long
On Wed, Dec 6, 2017 at 1:30 AM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Tue, Dec 05, 2017 at 11:15:57PM +0800, Xin Long wrote: >> Stream Interleave would be Implemented in two Parts: >>1. The I-DATA Chunk Supporting User Message Interleaving

[PATCH net-next 12/12] sctp: add support for the process of unordered idata

2017-12-05 Thread Xin Long
. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/structs.h | 14 +- include/net/sctp/ulpqueue.h | 1 + net/sctp/socket.c| 23 ++- net/sctp/stream_interleave.c | 377 --- net/sctp/ulpqueue.c | 5 + 5 files c

[PATCH net-next 11/12] sctp: implement abort_pd for sctp_stream_interleave

2017-12-05 Thread Xin Long
function sctp_ulpq_abort_pd for data. Note that sctp_ulpevent_make_pdapi will support per stream in this patch by adding pdapi_stream and pdapi_seq in sctp_pdapi_event, as described in section 6.1.7 of RFC6458. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interl

[PATCH net-next 10/12] sctp: implement start_pd for sctp_stream_interleave

2017-12-05 Thread Xin Long
s well. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 1 + net/sctp/sm_sideeffect.c | 2 +- net/sctp/stream_interleave.c | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/include/net/sctp/stream_interleave.

[PATCH net-next 09/12] sctp: implement renege_events for sctp_stream_interleave

2017-12-05 Thread Xin Long
-by: Xin Long <lucien@gmail.com> --- include/net/sctp/stream_interleave.h | 2 + include/net/sctp/ulpqueue.h | 9 +-- net/sctp/sm_sideeffect.c | 5 +- net/sctp/stream_interleave.c | 109 +++ net/sctp/ulpq

[PATCH net-next 08/12] sctp: implement enqueue_event for sctp_stream_interleave

2017-12-05 Thread Xin Long
enqueue_event is added as a member of sctp_stream_interleave, used to enqueue either data, idata or notification events into user socket rx queue. It replaces sctp_ulpq_tail_event used in the other places with enqueue_event. Signed-off-by: Xin Long <lucien@gmail.com> --- include/ne

[PATCH net-next 07/12] sctp: implement ulpevent_data for sctp_stream_interleave

2017-12-05 Thread Xin Long
rleave.c +++ b/net/sctp/stream_interleave.c @@ -29,8 +29,10 @@ *Xin Long <lucien@gmail.com> */ +#include #include #include +#include #include static struct sctp_chunk *sctp_make_idatafrag_empty( @@ -129,12 +131,427 @@ static bool sctp_validate_idata(struct sctp_chunk

[PATCH net-next 06/12] sctp: implement validate_data for sctp_stream_interleave

2017-12-05 Thread Xin Long
) with sctp_datachk_len for rx path. After this patch, the idata can be accepted and delivered to ulp layer. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sm.h| 6 ++ include/net/sctp/stream_interleave.h | 1 + include/net/sctp/structs.h

[PATCH net-next 00/12] sctp: Implement Stream Interleave: The I-DATA Chunk Supporting User Message Interleaving

2017-12-05 Thread Xin Long
all stream interleave codes are completely accomplished. Xin Long (12): sctp: add stream interleave enable members and sockopt sctp: add asoc intl_enable negotiation during 4 shakehands sctp: add basic structures and make chunk function for idata sctp: implement make_datafrag

[PATCH net-next 04/12] sctp: implement make_datafrag for sctp_stream_interleave

2017-12-05 Thread Xin Long
efines data_chunk_len for sctp_stream_interleave to describe the chunk size. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sm.h| 5 +-- include/net/sctp/stream_interleave.h | 44 include/net/sctp/structs.h | 11 + net/s

[PATCH net-next 05/12] sctp: implement assign_number for sctp_stream_interleave

2017-12-05 Thread Xin Long
, it has to wait_connect in sctp_sendmsg, as asoc intl_enable need to be known after 4 shake- hands, to decide if it should use data or idata later. data and idata can't be mixed to send in one asoc. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/constants.h

[PATCH net-next 01/12] sctp: add stream interleave enable members and sockopt

2017-12-05 Thread Xin Long
are set. Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/netns/sctp.h | 5 ++- include/net/sctp/structs.h | 2 ++ include/uapi/linux/sctp.h | 1 + net/sctp/socket.c | 88 +- 4 files changed, 94 insertions(+), 2 del

[PATCH net-next 02/12] sctp: add asoc intl_enable negotiation during 4 shakehands

2017-12-05 Thread Xin Long
asoc intl_enable will be set when local sp strm_interleave is set and there's I-DATA chunk in init and init_ack extensions, as says in section 2.2.1 of RFC8260. asoc intl_enable indicates all data will be sent as I-DATA chunks. Signed-off-by: Xin Long <lucien@gmail.com> --- include

[PATCH net-next 03/12] sctp: add basic structures and make chunk function for idata

2017-12-05 Thread Xin Long
sctp_idatahdr and sctp_idata_chunk are used to define and parse I-DATA chunk format, and sctp_make_idata is a function to build the chunk. The I-DATA Chunk Format is defined in section 2.1 of RFC8260. Signed-off-by: Xin Long <lucien@gmail.com> --- include/linux/sctp.h

Re: [PATCH net 3/5] sctp: only allow the asoc reset when the asoc outq is empty

2017-11-27 Thread Xin Long
On Mon, Nov 27, 2017 at 6:06 PM, David Laight <david.lai...@aculab.com> wrote: > From: Xin Long >> Sent: 25 November 2017 13:06 >> >> As it says in rfc6525#section5.1.4, before sending the request, >> >>C2: The sender has either no outstanding TSNs or co

[PATCH net] vxlan: use __be32 type for the param vni in __vxlan_fdb_delete

2017-11-26 Thread Xin Long
All callers of __vxlan_fdb_delete pass vni with __be32 type, and this param should be declared as __be32 type. Fixes: 3ad7a4b141eb ("vxlan: support fdb and learning in COLLECT_METADATA mode") Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/vxlan.c | 4 ++-- 1

[PATCH net] bonding: use nla_get_u64 to extract the value for IFLA_BOND_AD_ACTOR_SYSTEM

2017-11-26 Thread Xin Long
bond_opt_initval expects a u64 type param, it's better to use nla_get_u64 to extract the value here, to eliminate a sparse endianness mismatch warning. Fixes: 171a42c38c6e ("bonding: add netlink support for sys prio, actor sys mac, and port key") Signed-off-by: Xin Long <lucien.

[PATCH net] sctp: use right member as the param of list_for_each_entry

2017-11-26 Thread Xin Long
ese queues. It could cause NULL dereference panic if there are chunks in any of these queues when peeling off one asoc. So use the chunk member 'transmitted_list' instead in this patch. Fixes: d04adf1b3551 ("sctp: reset owner sk for data chunks on out queues when migrating a sock") Signed-off-

[PATCH net 2/3] sctp: force the params with right types for sctp csum apis

2017-11-26 Thread Xin Long
with the right types. Fixes: e6d8b64b34aa ("net: sctp: fix and consolidate SCTP checksumming code") Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/checksum.h | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/include/net/s

[PATCH net 3/3] sctp: remove extern from stream sched

2017-11-26 Thread Xin Long
sched ops in their .c file, then get them into the global ops by calling them when initializing sctp module. Fixes: 637784ade221 ("sctp: introduce priority based stream scheduler") Fixes: ac1ed8b82cd6 ("sctp: introduce round robin stream scheduler") Signed-off-by: Xin Long &

[PATCH net 1/3] sctp: force SCTP_ERROR_INV_STRM with __u32 when calling sctp_chunk_fail

2017-11-26 Thread Xin Long
This patch is to force SCTP_ERROR_INV_STRM with right type to fit in sctp_chunk_fail to avoid the sparse error. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/stream.c b/net/sctp/stream.c

[PATCH net 0/3] sctp: fix some other sparse errors

2017-11-26 Thread Xin Long
After the last fixes for sparse errors, there are still three sparse errors in sctp codes, two of them are type cast, and the other one is using extern. Xin Long (3): sctp: force SCTP_ERROR_INV_STRM with __u32 when calling sctp_chunk_fail sctp: force the params with right types for sctp

[PATCH net 3/3] sctp: do not abandon the other frags in unsent outq if one msg has outstanding frags

2017-11-25 Thread Xin Long
outq, if they are abandoned/dropped, the peer would never get this msg reassembled. So these frags in unsent outq can't be dropped if this msg already has outstanding frags. This patch does the check in sctp_chunk_abandoned and sctp_prsctp_prune_unsent. Signed-off-by: Xin Long <lucien@gmail.

[PATCH net 2/3] sctp: abandon the whole msg if one part of a fragmented message is abandoned

2017-11-25 Thread Xin Long
peer side. This patch supports it by adding abandoned flag in sctp_datamsg, when one chunk is being abandoned, set chunk->msg->abandoned as well. Next time when checking for abandoned, go checking chunk->msg->abandoned first. Signed-off-by: Xin Long <lucien@gmail.com> --- inc

[PATCH net 1/3] sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune

2017-11-25 Thread Xin Long
it by only updating outstanding_bytes for transmitted queue when pruning queues for prsctp prio policy, the same fix is also needed in sctp_check_transmitted. Fixes: 8dbdf1f5b09c ("sctp: implement prsctp PRIO policy") Signed-off-by: Xin Long <lucien@gmail.com> --- net/sct

[PATCH net 0/3] a couple of fixes for chunks abandoned in prsctp

2017-11-25 Thread Xin Long
is to fix them in patch 2 and 3, and also fix another issue for prsctp in patch 1. Xin Long (3): sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune sctp: abandon the whole msg if one part of a fragmented message is abandoned sctp: do not abandon the other

[PATCH net 4/5] sctp: avoid flushing unsent queue when doing asoc reset

2017-11-25 Thread Xin Long
comments in sctp_process_strreset_tsnreq. Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/net/sctp/stream.c b/net/sctp/stream.c index f3b7d27..9dd5bfe 100644 --- a/net/sctp/stream.c

[PATCH net 5/5] sctp: set sender next_tsn for the old result with ctsn_ack_point plus 1

2017-11-25 Thread Xin Long
der next_tsn value peer gets will be always right. Fixes: 692787cef651 ("sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter") Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

[PATCH net 3/5] sctp: only allow the asoc reset when the asoc outq is empty

2017-11-25 Thread Xin Long
with sctp_outq_is_empty before sending and processing the request. Fixes: 692787cef651 ("sctp: implement receiver-side procedures for the SSN/TSN Reset Request Parameter") Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 9 + 1 file changed, 9 insertions(+) diff --git a/n

[PATCH net 2/5] sctp: only allow the out stream reset when the stream outq is empty

2017-11-25 Thread Xin Long
Reset Request Parameter") Suggested-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/net/sctp/stream.c b/net/sctp/

[PATCH net 0/5] sctp: a bunch of fixes for stream reconfig

2017-11-25 Thread Xin Long
This patchset is to make stream reset and asoc reset work more correctly for stream reconfig. Thank to Marcelo making them very clear. Xin Long (5): sctp: use sizeof(__u16) for each stream number length instead of magic number sctp: only allow the out stream reset when the stream outq

[PATCH net 1/5] sctp: use sizeof(__u16) for each stream number length instead of magic number

2017-11-25 Thread Xin Long
Now in stream reconf part there are still some places using magic number 2 for each stream number length. To make it more readable, this patch is to replace them with sizeof(__u16). Reported-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Signed-off-by: Xin Long <lucien@

[PATCH net] tun: fix rcu_read_lock imbalance in tun_build_skb

2017-11-19 Thread Xin Long
ULL in if (xdp_xmit) chunk. So fix both in this patch. Fixes: 761876c857cb ("tap: XDP support") Signed-off-by: Xin Long <lucien@gmail.com> --- drivers/net/tun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 6bb1

Re: [PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian

2017-11-18 Thread Xin Long
On Fri, Nov 17, 2017 at 11:04 PM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Fri, Nov 17, 2017 at 02:15:02PM +0800, Xin Long wrote: >> rfc6458 demands the send_error in SCTP_SEND_FAILED_EVENT should >> be in cpu endian, while SCTP_ERROR_INV_

[PATCH net] route: also update fnhe_genid when updating a route cache

2017-11-16 Thread Xin Long
induktion.org> Signed-off-by: Xin Long <lucien@gmail.com> --- net/ipv4/route.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 11cf2fe..43b69af 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c @@ -651,9

[PATCH net] route: update fnhe_expires for redirect when the fnhe exists

2017-11-16 Thread Xin Long
tions") Reported-by: Jianlin Shi <ji...@redhat.com> Acked-by: Hannes Frederic Sowa <han...@stressinduktion.org> Signed-off-by: Xin Long <lucien@gmail.com> --- net/ipv4/route.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/ipv4/route.c b/ne

[PATCH net] sctp: report SCTP_ERROR_INV_STRM as cpu endian

2017-11-16 Thread Xin Long
<eric.duma...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/stream.c b/net/sctp/stream.c index a11db21..f86ceee 100644 --- a/net/sctp/stream.c +++ b/net/sctp/stream.c @@

[PATCH net] sctp: set frag_point in sctp_setsockopt_maxseg correctly

2017-11-16 Thread Xin Long
n setting frag_point via sockopt. It also improves sctp_setsockopt_maxseg codes. Suggested-by: Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> Reported-by: Hangbin Liu <liuhang...@gmail.com> Signed-off-by: Xin Long <lucien@gmail.com> --- include/net/sctp/sctp.h | 3 ++- n

[PATCHv2 net] sctp: check stream reset info len before making reconf chunk

2017-11-15 Thread Xin Long
for making this clear. v1->v2: - move the check into sctp_send_reset_streams instead. Fixes: cc16f00f6529 ("sctp: add support for generating stream reconf ssn reset request chunk") Reported-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Xin Long <lucien@gm

[PATCHv2 net] sctp: use the right sk after waking up from wait_buf sleep

2017-11-15 Thread Xin Long
-by: Neil Horman <nhor...@tuxdriver.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/socket.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index e62251f..14c28fb 100644 --- a/net/sct

[PATCHv2 net] sctp: do not free asoc when it is already dead in sctp_sendmsg

2017-11-15 Thread Xin Long
ead of sctp_wait_for_sndbuf. Suggested-by: Neil Horman <nhor...@tuxdriver.com> Reported-by: Dmitry Vyukov <dvyu...@google.com> Signed-off-by: Xin Long <lucien@gmail.com> --- net/sctp/socket.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/net/sctp/socket.

Re: [PATCH net] sctp: add wait_buf flag in asoc to avoid the peeloff and wait sndbuf race

2017-11-14 Thread Xin Long
On Tue, Nov 14, 2017 at 10:31 PM, Neil Horman <nhor...@tuxdriver.com> wrote: > On Mon, Nov 13, 2017 at 11:49:28PM +0800, Xin Long wrote: >> On Mon, Nov 13, 2017 at 11:40 PM, Xin Long <lucien@gmail.com> wrote: >> > On Mon, Nov 13, 2017 at 11:23 PM, Neil

Re: [PATCH net] sctp: check stream reset info len before making reconf chunk

2017-11-14 Thread Xin Long
On Tue, Nov 14, 2017 at 8:46 PM, Neil Horman <nhor...@tuxdriver.com> wrote: > On Mon, Nov 13, 2017 at 11:15:40PM +0800, Xin Long wrote: >> On Mon, Nov 13, 2017 at 11:09 PM, Neil Horman <nhor...@tuxdriver.com> wrote: >> > On Mon, Nov 13, 2017 at 01:39:27PM +0800,

Re: [PATCH net] sctp: do not free asoc when it is already dead in sctp_sendmsg

2017-11-14 Thread Xin Long
On Tue, Nov 14, 2017 at 8:43 PM, Neil Horman <nhor...@tuxdriver.com> wrote: > On Mon, Nov 13, 2017 at 11:29:49PM +0800, Xin Long wrote: >> On Mon, Nov 13, 2017 at 10:46 PM, Neil Horman <nhor...@tuxdriver.com> wrote: >> > On Mon, Nov 13, 2017 at 12:43:50PM +0

Re: [PATCH net] sctp: check stream reset info len before making reconf chunk

2017-11-14 Thread Xin Long
On Tue, Nov 14, 2017 at 3:54 AM, Marcelo Ricardo Leitner <marcelo.leit...@gmail.com> wrote: > On Mon, Nov 13, 2017 at 11:15:40PM +0800, Xin Long wrote: >> On Mon, Nov 13, 2017 at 11:09 PM, Neil Horman <nhor...@tuxdriver.com> wrote: >> > On Mon, Nov 13, 2017 at 01

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