Skip to content
  1. Oct 05, 2017
  2. Oct 04, 2017
    • Ganesh Goudar's avatar
      cxgb4: add new T6 pci device id's · acd669a8
      Ganesh Goudar authored
      
      
      Add 0x6085 T6 device id.
      
      Signed-off-by: default avatarGanesh Goudar <ganeshgr@chelsio.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      acd669a8
    • David S. Miller's avatar
      Merge branch 'sctp-stream-schedulers' · 26873308
      David S. Miller authored
      
      
      Marcelo Ricardo Leitner says:
      
      ====================
      Introduce SCTP Stream Schedulers
      
      This patchset introduces the SCTP Stream Schedulers are defined by
      https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
      
      It provides 3 schedulers at the moment: FCFS, Priority and Round Robin.
      The other 3, Round Robin per packet, Fair Capacity and Weighted Fair
      Capacity will be added later. More specifically, WFQ is required by
      WebRTC Datachannels.
      
      The draft also defines the idata chunk, allowing a usermsg to be
      interrupted by another piece of idata from another stream. This patchset
      *doesn't* include it. It will be posted later by Xin Long.  Its
      integration with this patchset is very simple and it basically only
      requires a tweak in sctp_sched_dequeue_done(), to ignore datamsg
      boundaries.
      
      The first 5 patches are a preparation for the next ones. The most
      relevant patches are the 4th and 6th ones. More details are available on
      each patch.
      
      v2: changelog update on patch 3
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      26873308
    • Marcelo Ricardo Leitner's avatar
      sctp: introduce round robin stream scheduler · ac1ed8b8
      Marcelo Ricardo Leitner authored
      
      
      This patch introduces RFC Draft ndata section 3.2 Priority Based
      Scheduler (SCTP_SS_RR).
      
      Works by maintaining a list of enqueued streams and tracking the last
      one used to send data. When the datamsg is done, it switches to the next
      stream.
      
      See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac1ed8b8
    • Marcelo Ricardo Leitner's avatar
      sctp: introduce priority based stream scheduler · 637784ad
      Marcelo Ricardo Leitner authored
      
      
      This patch introduces RFC Draft ndata section 3.4 Priority Based
      Scheduler (SCTP_SS_PRIO).
      
      It works by having a struct sctp_stream_priority for each priority
      configured. This struct is then enlisted on a queue ordered per priority
      if, and only if, there is a stream with data queued, so that dequeueing
      is very straightforward: either finish current datamsg or simply dequeue
      from the highest priority queued, which is the next stream pointed, and
      that's it.
      
      If there are multiple streams assigned with the same priority and with
      data queued, it will do round robin amongst them while respecting
      datamsgs boundaries (when not using idata chunks), to be reasonably
      fair.
      
      We intentionally don't maintain a list of priorities nor a list of all
      streams with the same priority to save memory. The first would mean at
      least 2 other pointers per priority (which, for 1000 priorities, that
      can mean 16kB) and the second would also mean 2 other pointers but per
      stream. As SCTP supports up to 65535 streams on a given asoc, that's
      1MB. This impacts when giving a priority to some stream, as we have to
      find out if the new priority is already being used and if we can free
      the old one, and also when tearing down.
      
      The new fields in struct sctp_stream_out_ext and sctp_stream are added
      under a union because that memory is to be shared with other schedulers.
      
      See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      637784ad
    • Marcelo Ricardo Leitner's avatar
      sctp: add sockopt to get/set stream scheduler parameters · 0ccdf3c7
      Marcelo Ricardo Leitner authored
      
      
      As defined per RFC Draft ndata Section 4.3.3, named as
      SCTP_STREAM_SCHEDULER_VALUE.
      
      See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ccdf3c7
    • Marcelo Ricardo Leitner's avatar
      sctp: add sockopt to get/set stream scheduler · 13aa8770
      Marcelo Ricardo Leitner authored
      
      
      As defined per RFC Draft ndata Section 4.3.2, named as
      SCTP_STREAM_SCHEDULER.
      
      See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13aa8770
    • Marcelo Ricardo Leitner's avatar
      sctp: introduce stream scheduler foundations · 5bbbbe32
      Marcelo Ricardo Leitner authored
      
      
      This patch introduces the hooks necessary to do stream scheduling, as
      per RFC Draft ndata.  It also introduces the first scheduler, which is
      what we do today but now factored out: first come first served (FCFS).
      
      With stream scheduling now we have to track which chunk was enqueued on
      which stream and be able to select another other than the in front of
      the main outqueue. So we introduce a list on sctp_stream_out_ext
      structure for this purpose.
      
      We reuse sctp_chunk->transmitted_list space for the list above, as the
      chunk cannot belong to the two lists at the same time. By using the
      union in there, we can have distinct names for these moments.
      
      sctp_sched_ops are the operations expected to be implemented by each
      scheduler. The dequeueing is a bit particular to this implementation but
      it is to match how we dequeue packets today. We first dequeue and then
      check if it fits the packet and if not, we requeue it at head. Thus why
      we don't have a peek operation but have dequeue_done instead, which is
      called once the chunk can be safely considered as transmitted.
      
      The check removed from sctp_outq_flush is now performed by
      sctp_stream_outq_migrate, which is only called during assoc setup.
      (sctp_sendmsg() also checks for it)
      
      The only operation that is foreseen but not yet added here is a way to
      signalize that a new packet is starting or that the packet is done, for
      round robin scheduler per packet, but is intentionally left to the
      patch that actually implements it.
      
      Support for I-DATA chunks, also described in this RFC, with user message
      interleaving is straightforward as it just requires the schedulers to
      probe for the feature and ignore datamsg boundaries when dequeueing.
      
      See-also: https://tools.ietf.org/html/draft-ietf-tsvwg-sctp-ndata-13
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5bbbbe32
    • Marcelo Ricardo Leitner's avatar
      sctp: introduce sctp_chunk_stream_no · 2fc019f7
      Marcelo Ricardo Leitner authored
      
      
      Add a helper to fetch the stream number from a given chunk.
      
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2fc019f7
    • Marcelo Ricardo Leitner's avatar
      sctp: introduce struct sctp_stream_out_ext · f952be79
      Marcelo Ricardo Leitner authored
      
      
      With the stream schedulers, sctp_stream_out will become too big to be
      allocated by kmalloc and as we need to allocate with BH disabled, we
      cannot use __vmalloc in sctp_stream_init().
      
      This patch moves out the stats from sctp_stream_out to
      sctp_stream_out_ext, which will be allocated only when the application
      tries to sendmsg something on it.
      
      Just the introduction of sctp_stream_out_ext would already fix the issue
      described above by splitting the allocation in two. Moving the stats
      to it also reduces the pressure on the allocator as we will ask for less
      memory atomically when creating the socket and we will use GFP_KERNEL
      later.
      
      Then, for stream schedulers, we will just use sctp_stream_out_ext.
      
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f952be79
    • Marcelo Ricardo Leitner's avatar
      sctp: factor out stream->in allocation · 1fdb8d8f
      Marcelo Ricardo Leitner authored
      
      
      There is 1 place allocating it and another reallocating. Move such
      procedures to a common function.
      
      v2: updated changelog
      
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1fdb8d8f
    • Marcelo Ricardo Leitner's avatar
      sctp: factor out stream->out allocation · e090abd0
      Marcelo Ricardo Leitner authored
      
      
      There is 1 place allocating it and 2 other reallocating. Move such
      procedures to a common function.
      
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e090abd0
    • Marcelo Ricardo Leitner's avatar
      sctp: silence warns on sctp_stream_init allocations · 1ae2eaaa
      Marcelo Ricardo Leitner authored
      
      
      As SCTP supports up to 65535 streams, that can lead to very large
      allocations in sctp_stream_init(). As Xin Long noticed, systems with
      small amounts of memory are more prone to not have enough memory and
      dump warnings on dmesg initiated by user actions. Thus, silence them.
      
      Also, if the reallocation of stream->out is not necessary, skip it and
      keep the memory we already have.
      
      Reported-by: default avatarXin Long <lucien.xin@gmail.com>
      Tested-by: default avatarXin Long <lucien.xin@gmail.com>
      Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1ae2eaaa
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · af14827f
      David S. Miller authored
      
      
      Jeff Kirsher says:
      
      ====================
      100GbE Intel Wired LAN Driver Updates 2017-10-03
      
      This series contains updates to fm10k only.
      
      Jake provides majority of the changes in this series, starting with using
      fm10k_prepare_for_reset() if we lose PCIe link.  Before we would detach
      the device and close the netdev, which left a lot of items still active,
      such as the Tx/Rx resources.  This could cause problems where register
      reads would return potentially invalid values and would result in unknown
      driver behavior, so call fm10k_prepare_for_reset() much like we do for
      suspend/resume cycles.  This will attempt to shutdown as much as possible
      to prevent possible issues.  Then replaced the PCI specific legacy power
      management hooks with the new generic power management hooks for both
      suspend and hibernate.  Introduced a workqueue item which monitors a
      queue of MAC and VLAN requests since a large number of MAC address or
      VLAN updates at once can overload the mailbox with too many messages at
      once.  Fixed a cppcheck warning by properly declaring the min_rate and
      max_rate variables in the declaration and definition for .ndo_set_vf_bw,
      rather than using "unused" for the minimum rates.
      
      Joe Perches fixes the backward logic when using net_ratelimit().
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af14827f