1. 20 Feb, 2017 30 commits
  2. 19 Feb, 2017 10 commits
    • Xin Long's avatar
      sctp: check duplicate node before inserting a new transport · cd2b7087
      Xin Long authored
      sctp has changed to use rhlist for transport rhashtable since commit
      7fda702f ("sctp: use new rhlist interface on sctp transport
      rhashtable").
      
      But rhltable_insert_key doesn't check the duplicate node when inserting
      a node, unlike rhashtable_lookup_insert_key. It may cause duplicate
      assoc/transport in rhashtable. like:
      
       client (addr A, B)                 server (addr X, Y)
          connect to X           INIT (1)
                              ------------>
          connect to Y           INIT (2)
                              ------------>
                               INIT_ACK (1)
                              <------------
                               INIT_ACK (2)
                              <------------
      
      After sending INIT (2), one transport will be created and hashed into
      rhashtable. But when receiving INIT_ACK (1) and processing the address
      params, another transport will be created and hashed into rhashtable
      with the same addr Y and EP as the last transport. This will confuse
      the assoc/transport's lookup.
      
      This patch is to fix it by returning err if any duplicate node exists
      before inserting it.
      
      Fixes: 7fda702f ("sctp: use new rhlist interface on sctp transport rhashtable")
      Reported-by: default avatarFabio M. Di Nitto <fdinitto@redhat.com>
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cd2b7087
    • David Daney's avatar
      of_mdio: Add "broadcom,bcm5241" to the whitelist. · 7e1392fb
      David Daney authored
      Some Cavium dev boards have firmware which doesn't supply a proper
      ethernet-phy-ieee802.3-c22" compatible property.  Restore these boards
      to working order by whitelisting this compatible value.
      Signed-off-by: default avatarDavid Daney <david.daney@cavium.com>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7e1392fb
    • david.wu's avatar
      net: ethernet: stmmac: dwmac-rk: Add RK3328 gmac support · d4ff816e
      david.wu authored
      Add constants and callback functions for the dwmac on rk3328 socs.
      As can be seen, the base structure is the same, only registers and the
      bits in them moved slightly.
      Signed-off-by: default avatardavid.wu <david.wu@rock-chips.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4ff816e
    • Xin Long's avatar
      sctp: sctp_transport_dst_check should check if transport pmtu is dst mtu · a4d69a4c
      Xin Long authored
      Now when sending a packet, sctp_transport_dst_check will check if dst
      is obsolete by calling ipv4/ip6_dst_check. But they return obsolete
      only when adding a new cache, after that when the cache's pmtu is
      updated again, it will not trigger transport->dst/pmtu's update.
      
      It can be reproduced by reducing route's pmtu twice. At the 1st time
      client will add a new cache, and transport->pathmtu gets updated as
      sctp_transport_dst_check finds it's obsolete. But at the 2nd time,
      cache's mtu is updated, sctp client will never send out any packet,
      because transport->pmtu has no chance to update.
      
      This patch is to fix this by also checking if transport pmtu is dst
      mtu in sctp_transport_dst_check, so that transport->pmtu can be
      updated on time.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a4d69a4c
    • David S. Miller's avatar
      Merge branch 'sctp-rcv-side-stream-reconf-ssn-reset-req-chunk' · 585396bc
      David S. Miller authored
      Xin Long says:
      
      ====================
      sctp: add receiver-side procedures for stream reconf ssn reset request chunk
      
      Patch 3/7 and 4/7 are to implement receiver-side procedures for the
      Outgoing and Incoming SSN Reset Request Parameter described in rfc6525
      section 5.2.2 and 5.2.3
      
      Patch 1/7 and 2/7 are ahead of them to define some apis.
      
      Patch 5/7-7/7 are to add the process of reconf chunk event in rx path.
      
      Note that with this patchset, asoc->reconf_enable has no chance yet to
      be set, until the patch "sctp: add get and set sockopt for reconf_enable"
      is applied in the future. As we can not just enable it when sctp is not
      capable of processing reconf chunk yet.
      
      v1->v2:
        - re-split the patchset and make sure it has no dead codes for review.
        - rename the titles of the commits and improve some changelogs.
        - drop __packed from some structures in patch 1/7.
        - fix some kbuild warnings in patch 3/7 by initializing str_p = NULL.
        - sctp_chunk_lookup_strreset_param changes to return sctp_paramhdr_t *
          and uses sctp_strreset_tsnreq to access request_seq in patch 3/7.
        - use __u<size> in uapi sctp.h in patch 1/7.
        - do str_list endian conversion when generating stream_reset_event in patch
          2/7.
        - remove str_list endian conversion, pass resp_seq param with network endian
          to lookup_strreset_param in 3/7.
        - move str_list endian conversion out of sctp_make_strreset_req, so that
          sctp_make_strreset_req can be used more conveniently to process inreq in
          patch 4/7.
        - remove sctp_merge_reconf_chunk and not support response with multiparam
          in patch 6/7.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      585396bc
    • Xin Long's avatar
      sctp: add reconf chunk event · d884aa63
      Xin Long authored
      This patch is to add reconf chunk event based on the sctp event
      frame in rx path, it will call sctp_sf_do_reconf to process the
      reconf chunk.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d884aa63
    • Xin Long's avatar
      sctp: add reconf chunk process · 2040d3d7
      Xin Long authored
      This patch is to add a function to process the incoming reconf chunk,
      in which it verifies the chunk, and traverses the param and process
      it with the right function one by one.
      
      sctp_sf_do_reconf would be the process function of reconf chunk event.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2040d3d7
    • Xin Long's avatar
      sctp: add a function to verify the sctp reconf chunk · ea625043
      Xin Long authored
      This patch is to add a function sctp_verify_reconf to do some length
      check and multi-params check for sctp stream reconf according to rfc6525
      section 3.1.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ea625043
    • Xin Long's avatar
      sctp: implement receiver-side procedures for the Incoming SSN Reset Request Parameter · 16e1a919
      Xin Long authored
      This patch is to implement Receiver-Side Procedures for the Incoming
      SSN Reset Request Parameter described in rfc6525 section 5.2.3.
      
      It's also to move str_list endian conversion out of sctp_make_strreset_req,
      so that sctp_make_strreset_req can be used more conveniently to process
      inreq.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16e1a919
    • Xin Long's avatar
      sctp: implement receiver-side procedures for the Outgoing SSN Reset Request Parameter · 81054476
      Xin Long authored
      This patch is to implement Receiver-Side Procedures for the Outgoing
      SSN Reset Request Parameter described in rfc6525 section 5.2.2.
      
      Note that some checks must be after request_seq check, as even those
      checks fail, strreset_inseq still has to be increase by 1.
      Signed-off-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81054476