From patchwork Tue Oct 3 22:20:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Ricardo Leitner X-Patchwork-Id: 821033 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="i2Jofdn7"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y6D4g28wTz9sRW for ; Wed, 4 Oct 2017 09:20:35 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbdJCWUc (ORCPT ); Tue, 3 Oct 2017 18:20:32 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:50385 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbdJCWUb (ORCPT ); Tue, 3 Oct 2017 18:20:31 -0400 Received: by mail-qt0-f195.google.com with SMTP id f15so15915311qtf.7; Tue, 03 Oct 2017 15:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Gfx8OvjWpqrClZ2A7rgt+D44CjCTKcq6NU00hANNn6A=; b=i2Jofdn78U2Xs1bWaSuHSjoeepudHxpB0riSuvmPFdu7PmlMTAtJd06rmJ3hs9+Wxz sasYe+isjyBVeE8Bc7w7mlqLonLHOh58OFytmL7iqOk9Umwf5b7rPW+B0sRLrvmFKyJG VIbyVQy3KSDwiFfrPWRZ7+gYe1YecJReA/PXoQtjjlbeB89Wu5vb8ynSOGScKOT9jXUn u6sowy0vkYVGRHSqZy93CTDipjWlqRasKtNJcut7iVePG4Gs5ve4mzoYdQCBGv9SpcGz fmbuiBFr8VhARDPpgi1Qq2HIzasOSX6MFY9Qk0Sbaqxb3xbvob3AIqrkiP0RAVFwPzAF InLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Gfx8OvjWpqrClZ2A7rgt+D44CjCTKcq6NU00hANNn6A=; b=KUuV2N05/ncmTNOSmFvv6ELfBDYnftSOtsqYsu6rLUNWPbrKk12z9jRuxZ2VAfYNRz +ZtJkKsrUY1fkP7H93ViaUYunOZjEJfnooU3LUoUL264KNsjTtNyvb2pAp8fbqLPk8MC jv/sAJPER35g413NB9YWvkd4Lws67aMTHDC5bSGndoBRGZRq6Lvn44IFZsaUuJ4yrvNp SFhArIiUYjQq+/m+jL3aSX+hG90erayuHmrCOFUZE9UF+3+kZZtVlCiQN2GTsUfTP6yt XnPVX0K8dT5DVavvIfF3/Rw5NBQWW6T++C4Zlff5HhxD2JAXgPCcJUfYhSudFe45wK56 t0Xw== X-Gm-Message-State: AMCzsaVIU2ft+tPZT9X1+M1PUtqYSTcNxg0mxeiICBwzhTGDv9l566/C 7sgb7R0rFn3atEwopbWjn80kMmud X-Google-Smtp-Source: AOwi7QAgSA80+2mCKspnKdMoAqOMC1E+RANtLvGFuCUxclSb5WHIxy9j1tqk3jyUefYvIp2TPOTPKQ== X-Received: by 10.200.12.69 with SMTP id l5mr26552064qti.268.1507069229961; Tue, 03 Oct 2017 15:20:29 -0700 (PDT) Received: from localhost.localdomain.com ([2001:1284:f013:2f91:ff99:4075:72f0:1535]) by smtp.gmail.com with ESMTPSA id 39sm4328568qkw.63.2017.10.03.15.20.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2017 15:20:29 -0700 (PDT) From: Marcelo Ricardo Leitner To: netdev@vger.kernel.org Cc: linux-sctp@vger.kernel.org, Neil Horman , Vlad Yasevich , Xin Long , David Laight Subject: [PATCH net-next v2 00/10] Introduce SCTP Stream Schedulers Date: Tue, 3 Oct 2017 19:20:07 -0300 Message-Id: X-Mailer: git-send-email 2.13.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 Marcelo Ricardo Leitner (10): sctp: silence warns on sctp_stream_init allocations sctp: factor out stream->out allocation sctp: factor out stream->in allocation sctp: introduce struct sctp_stream_out_ext sctp: introduce sctp_chunk_stream_no sctp: introduce stream scheduler foundations sctp: add sockopt to get/set stream scheduler sctp: add sockopt to get/set stream scheduler parameters sctp: introduce priority based stream scheduler sctp: introduce round robin stream scheduler include/net/sctp/stream_sched.h | 72 +++++++++ include/net/sctp/structs.h | 63 +++++++- include/uapi/linux/sctp.h | 16 ++ net/sctp/Makefile | 3 +- net/sctp/chunk.c | 6 +- net/sctp/outqueue.c | 63 ++++---- net/sctp/sm_sideeffect.c | 3 + net/sctp/socket.c | 179 ++++++++++++++++++++- net/sctp/stream.c | 196 +++++++++++++++++++---- net/sctp/stream_sched.c | 275 +++++++++++++++++++++++++++++++ net/sctp/stream_sched_prio.c | 347 ++++++++++++++++++++++++++++++++++++++++ net/sctp/stream_sched_rr.c | 201 +++++++++++++++++++++++ 12 files changed, 1347 insertions(+), 77 deletions(-) create mode 100644 include/net/sctp/stream_sched.h create mode 100644 net/sctp/stream_sched.c create mode 100644 net/sctp/stream_sched_prio.c create mode 100644 net/sctp/stream_sched_rr.c