From patchwork Thu Apr 26 19:58:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Ricardo Leitner X-Patchwork-Id: 905366 Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@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; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="EMOvfHPf"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 40X7Mw11K4z9s02 for ; Fri, 27 Apr 2018 06:05:16 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756732AbeDZUFO (ORCPT ); Thu, 26 Apr 2018 16:05:14 -0400 Received: from mail-qt0-f179.google.com ([209.85.216.179]:43479 "EHLO mail-qt0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755248AbeDZT7X (ORCPT ); Thu, 26 Apr 2018 15:59:23 -0400 Received: by mail-qt0-f179.google.com with SMTP id l11-v6so33188276qtj.10; Thu, 26 Apr 2018 12:59:23 -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=u4ylF2qijTc554rMLQJwbAnqdTBo+3oqL01OUst9V90=; b=EMOvfHPf3V1QSQPTj96t+P5NjQl0z7lXoJUnr1J17pBeuCWdVCMGVWXrM/+ELvWmV7 PWBwoYG+Sce0HRzGiGQY/M3XvR+vl+5UteQSTNaeQMRTGDMxlF7RzUZH6b8jJ+JDeuUo 2DDuE4BTJO0iOrRN7nUARaLlFXn3lJ1lydLwi5csqLmPjMNaH/C696LNnROvtNkAqx11 h0JNjhaVjro9drP3H76fZI8DYNDggPPo8fGkk3R6nHeY0wJL/c9GS6iCR1Z7RzNnwSUV Q+HISzp4HpJzPojCdutBBbphZcM1Q+iYf4NzhKgsN8kluz1TuC/sHVY6Npnmhw111bCv kUCQ== 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=u4ylF2qijTc554rMLQJwbAnqdTBo+3oqL01OUst9V90=; b=HHHyPvO21LagYIXq0vAOQK1t2+BDEe4i+CGgQt0YNgklH8N7xCYnmY1+yM2gIl68ma EWfcK2dry6iQm6y1dJh8ztAR5/ADBgFA+BRyXD19mSJ3ITsVMmJSSe0nTwJPEO8vWGD4 iBAA3Ky6HIH5ckOVKjF0j/cEj8lTguQsIkRVgn8VxMU5NOw2gIAyNWJdc7zLmj0oUhi1 I9t/RGAx6Z4LOf2Sz0BOHUrRpt3BzcBEBLUSkJ3Z10faZoKD0suup+m9ExIi3aRihxMP /XMjShDDgnB7KeCA5mv3NWJLPAZRZMIcRPRMRlwduolbwj6stG+otKImv5GBZRKL8WZd zo6w== X-Gm-Message-State: ALQs6tAkga8ymlPSF2TeZ8IYS8QWLZyKv+V6JkPJ01tMi+cwQZIa9RmD F3b72wtAV/IeRx9V0hE9kpR+W4ia X-Google-Smtp-Source: AB8JxZrcOPbAPMPRPSJqcHaMn0bJty5P2xnhE+4/oIX9OdJSh60sTTOy1HHGvB6OY0BGAkufipEd6w== X-Received: by 2002:ac8:2b50:: with SMTP id 16-v6mr2867742qtv.260.1524772763099; Thu, 26 Apr 2018 12:59:23 -0700 (PDT) Received: from localhost.localdomain ([177.10.56.95]) by smtp.gmail.com with ESMTPSA id p63sm3399689qkd.92.2018.04.26.12.59.21 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Apr 2018 12:59:22 -0700 (PDT) Received: by localhost.localdomain (Postfix, from userid 1000) id 8B144180FA8; Thu, 26 Apr 2018 16:59:18 -0300 (-03) From: Marcelo Ricardo Leitner To: netdev@vger.kernel.org Cc: linux-sctp@vger.kernel.org, Vlad Yasevich , Neil Horman , Xin Long Subject: [PATCH net-next 00/13] sctp: refactor MTU handling Date: Thu, 26 Apr 2018 16:58:49 -0300 Message-Id: X-Mailer: git-send-email 2.14.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently MTU handling is spread over SCTP stack. There are multiple places doing same/similar calculations and updating them is error prone as one spot can easily be left out. This patchset converges it into a more concise and consistent code. In general, it moves MTU handling from functions with bigger objectives, such as sctp_assoc_add_peer(), to specific functions. It's also a preparation for the next patchset, which removes the duplication between sctp_make_op_error_space and sctp_make_op_error_fixed and relies on sctp_mtu_payload introduced here. More details on each patch. Marcelo Ricardo Leitner (13): sctp: remove old and unused SCTP_MIN_PMTU sctp: move transport pathmtu calc away of sctp_assoc_add_peer sctp: remove an if() that is always true sctp: introduce sctp_assoc_set_pmtu sctp: introduce sctp_mtu_payload sctp: introduce sctp_assoc_update_frag_point sctp: remove sctp_assoc_pending_pmtu sctp: introduce sctp_dst_mtu sctp: remove sctp_transport_pmtu_check sctp: re-use sctp_transport_pmtu in sctp_transport_route sctp: honor PMTU_DISABLED when handling icmp sctp: consider idata chunks when setting SCTP_MAXSEG sctp: allow unsetting sockopt MAXSEG include/net/sctp/constants.h | 5 ++-- include/net/sctp/sctp.h | 52 ++++++++++++++------------------------ include/net/sctp/structs.h | 2 ++ net/sctp/associola.c | 60 +++++++++++++++++++++++--------------------- net/sctp/chunk.c | 12 +-------- net/sctp/output.c | 28 ++++++++------------- net/sctp/socket.c | 43 ++++++++++++++----------------- net/sctp/transport.c | 37 ++++++++++++++------------- 8 files changed, 105 insertions(+), 134 deletions(-) Reviewed-by: Xin Long --- 2.14.3