From patchwork Thu Sep 28 20:25:13 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: 819729 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="qWTPN0sf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y35mP3448z9sNV for ; Fri, 29 Sep 2017 06:25:41 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751467AbdI1UZi (ORCPT ); Thu, 28 Sep 2017 16:25:38 -0400 Received: from mail-qk0-f174.google.com ([209.85.220.174]:48729 "EHLO mail-qk0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750880AbdI1UZh (ORCPT ); Thu, 28 Sep 2017 16:25:37 -0400 Received: by mail-qk0-f174.google.com with SMTP id a128so2641695qkc.5; Thu, 28 Sep 2017 13:25:36 -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=mwXTcUHe2LqJm1GWgfFjvJTefIXiwaHFSvdeEjxg4Mo=; b=qWTPN0sfm37Vk1xirS8lmRVMf2ntybqbGjB+ltSEQWj9/bclDFyJL0QlssDJW6PnUw vVrFa6TudXJKFkvRFWMR5wgNim0ildS/jp08rXi/8+PCPuZ6i7ZcQMYStqtG/0BEbhWf SfvfDuapjM9v4wIDpsMsZFq+r+c54u4WQGjVbu5KX0C+DJys4IG3M/lI2A74xGM3cXvg nXG3KM/jLoGzId10u4t5oZAoM6CWOtv76GP4QwwLwCOzjK11MiXp/40Nzp+ryGnYHvDc Mz+GCl6dP2IPkFFyNe2w8A51jYc8q82cC+Xg9O17sW87wVZ0L8zToIKCXiWOliV+21gQ 1TRw== 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=mwXTcUHe2LqJm1GWgfFjvJTefIXiwaHFSvdeEjxg4Mo=; b=WgLHAnnSotEvegybHUYTgI2J6mBO2ig3iLnD0Su0QN2fTnfu7Ri7zRKUDcBP7ohyjB 9LYqoG/a2OYpxveWsu7Pg5mbXq0kz9fJO3c1wQBZHzy5YNVqHdjN2aa1L898ESe3kcXp QTAR5Gh+hAvDXTFCSlqOL9Ct16QYrpBPU5Bt4SxeH+cGd/nPEgq92hsiTt093ZCz/UkD xcz9NyqIi35qjKQ0LS8+kbF5F1B6G79F27856ogY5ruH+f/PSx+YrwQQyDNj4JYN1Pz6 DqcmdgsxKRSnnoVkIBvZMOZBpBa+upDp7lPZsP1Sr7ZxSzOYIVGSSCNA3Grtuz+DUg6v Qv/g== X-Gm-Message-State: AMCzsaX8r8CQjQPr8uqDxoEZMs/AFkCpYjwUp5BpS7HwFDwUNFd8ap1Y L6tzxC5qyEVIr6nPNtztBwF6qz9+ X-Google-Smtp-Source: AOwi7QAuGTYaf/kNJEr7wjFPi1lbLjOLCUHI+NC2UkWvUVmswNf9hd8ti7D6wztI1om07hAsOK3r4g== X-Received: by 10.55.16.87 with SMTP id a84mr262249qkh.170.1506630335964; Thu, 28 Sep 2017 13:25:35 -0700 (PDT) Received: from localhost.localdomain.com ([2001:1284:f019:d59e:a58:6656:fe6b:aeea]) by smtp.gmail.com with ESMTPSA id 16sm1661745qtw.38.2017.09.28.13.25.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 28 Sep 2017 13:25:34 -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 00/10] Introduce SCTP Stream Schedulers Date: Thu, 28 Sep 2017 17:25:13 -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. 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 Tested-by: Xin Long