1. 15 3月, 2018 1 次提交
  2. 03 1月, 2018 1 次提交
    • M
      net: sctp: Add SCTP ACK tracking trace event · 103d750c
      Masami Hiramatsu 提交于
      Add SCTP ACK tracking trace event to trace the changes of SCTP
      association state in response to incoming packets.
      It is used for debugging SCTP congestion control algorithms,
      and will replace sctp_probe module.
      
      Note that this event a bit tricky. Since this consists of 2
      events (sctp_probe and sctp_probe_path) so you have to enable
      both events as below.
      
        # cd /sys/kernel/debug/tracing
        # echo 1 > events/sctp/sctp_probe/enable
        # echo 1 > events/sctp/sctp_probe_path/enable
      
      Or, you can enable all the events under sctp.
      
        # echo 1 > events/sctp/enable
      
      Since sctp_probe_path event is always invoked from sctp_probe
      event, you can not see any output if you only enable
      sctp_probe_path.
      Signed-off-by: NMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      103d750c
  3. 16 12月, 2017 1 次提交
    • X
      sctp: implement validate_ftsn for sctp_stream_interleave · 0fc2ea92
      Xin Long 提交于
      validate_ftsn is added as a member of sctp_stream_interleave, used to
      validate ssn/chunk type for fwdtsn or mid (message id)/chunk type for
      ifwdtsn, called in sctp_sf_eat_fwd_tsn, just as validate_data.
      
      If this check fails, an abort packet will be sent, as said in section
      2.3.1 of RFC8260.
      
      As ifwdtsn and fwdtsn chunks have different length, it also defines
      ftsn_chunk_len for sctp_stream_interleave to describe the chunk size.
      Then it replaces all sizeof(struct sctp_fwdtsn_chunk) with
      sctp_ftsnchk_len.
      
      It also adds the process for ifwdtsn in rx path. As Marcelo pointed
      out, there's no need 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.
      
      Note that this patch also removes 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: NXin Long <lucien.xin@gmail.com>
      Acked-by: NMarcelo R. Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0fc2ea92
  4. 12 12月, 2017 1 次提交
  5. 12 8月, 2017 5 次提交
  6. 07 8月, 2017 2 次提交
  7. 04 8月, 2017 11 次提交
  8. 25 7月, 2017 7 次提交
  9. 17 7月, 2017 1 次提交
  10. 02 7月, 2017 6 次提交
  11. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  12. 03 6月, 2017 1 次提交
  13. 25 5月, 2017 1 次提交
    • X
      sctp: set new_asoc temp when processing dupcookie · 7e062977
      Xin Long 提交于
      After sctp changed to use transport hashtable, a transport would be
      added into global hashtable when adding the peer to an asoc, then
      the asoc can be got by searching the transport in the hashtbale.
      
      The problem is when processing dupcookie in sctp_sf_do_5_2_4_dupcook,
      a new asoc would be created. A peer with the same addr and port as
      the one in the old asoc might be added into the new asoc, but fail
      to be added into the hashtable, as they also belong to the same sk.
      
      It causes that sctp's dupcookie processing can not really work.
      
      Since the new asoc will be freed after copying it's information to
      the old asoc, it's more like a temp asoc. So this patch is to fix
      it by setting it as a temp asoc to avoid adding it's any transport
      into the hashtable and also avoid allocing assoc_id.
      
      An extra thing it has to do is to also alloc stream info for any
      temp asoc, as sctp dupcookie process needs it to update old asoc.
      But I don't think it would hurt something, as a temp asoc would
      always be freed after finishing processing cookie echo packet.
      Reported-by: NJianwen Ji <jiji@redhat.com>
      Signed-off-by: NXin Long <lucien.xin@gmail.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7e062977
  14. 02 4月, 2017 1 次提交