Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1108905pxb; Fri, 6 Nov 2020 00:50:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRH8PlcYhhazcNZMwQGv4N3R3+ncwRwVs5zxi4UtsjTQf0ffVgg+SC12enus/Y2LcRbl+I X-Received: by 2002:aa7:d1d8:: with SMTP id g24mr960363edp.324.1604652630501; Fri, 06 Nov 2020 00:50:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604652630; cv=none; d=google.com; s=arc-20160816; b=GIbWs4J5WNsOVeSVNkEzXDmGUAknsNJ5Jwh6J7NKWVnHxVGz2b2Ry88ssQyuoVR7yO HIj1Zfpft0gJcNmV0QQQw8CPkECLZzqpAxT371trOQ5w25H4fBtmirs8Dq1DyvbSrbxS p9xKoH4S9QMUOZGNLg5lcCwbHyGTghzB+P9Hr6MzbreBdh2L6g2WE1gEf/mVggZNkwcz C8XK+/3QWyQ+w1wMfa+sIESgaKkyo19h3rXo0xoP/QL8TppNKcjG5eQnaRWfeOkpt+v1 YZkyt1CrkVfw2Y0ZABEqErpcgbMQ1/8+Ly3ljgZaWgRRn7zO0EXh+7+64u0gCkbdjgZA dLiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=d3ntAnKa8/mYLGzPmrDnpX+SS9nceIT0yXThvuLk7dA=; b=tdiRJBjz7v9eris7F50KcMZW+pAzWAdm/p6r2oj7d5DgqO+KnJpy+TtkRjhLn3IBrA ZbQnXBoz6NQuMiSrXMl7B1Hoh988n0qyBFCmtxfVhW+DW3BSrm8LZi2NBfP6XHn+FzJm b8c6Dh3hkskG9Sm18rJZv5zGYx+LMLVbT4CE/3UKqjY52js7Xqw4iNDVq4f93K+0xCLE tlBzlKK6iv/tWb8JXdBTqbxSq63bRWQNRDDpleQLPWBXsFP7B31J8qYYbjfd35Tv3kbD Pm5XlGuLpttXK+MLOtiJoDj8lp2iunr+G734PnppzNcfO1FvsGzDtm2oMEIobpT6P7Uz z3sQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PeMII59g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si462101ejm.262.2020.11.06.00.50.07; Fri, 06 Nov 2020 00:50:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PeMII59g; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726523AbgKFIqj (ORCPT + 99 others); Fri, 6 Nov 2020 03:46:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgKFIqj (ORCPT ); Fri, 6 Nov 2020 03:46:39 -0500 Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D85B4C0613CF; Fri, 6 Nov 2020 00:46:38 -0800 (PST) Received: by mail-qk1-x742.google.com with SMTP id c27so407818qko.10; Fri, 06 Nov 2020 00:46:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=d3ntAnKa8/mYLGzPmrDnpX+SS9nceIT0yXThvuLk7dA=; b=PeMII59gOf7WuG2rlMrNUnfKKkKYzZ7Ef8+qFoNOUO1MT13N9+2o8BRfkNPlszNr9Z pUtu9jzfVSLgV9O956BWD4k45Wz8Z2stMnaWCKoL9EdO0aEszica/DCfev6sTb1BAknl pfkRrR6MtV/tYlny/Cy2cujiB6W7qiviGEdZq42BeYry0fGG9FUqjgZaBhZWNZDo0GhR fGbn1lLLCLAWHz9sUD9A3YrCWOsvbc4QziPEbqREM4W3QswdwGk1vtqcMw2TU5LhGbI7 kwEpMh/EzjhIS0R5uJFZ3WTVTja9+7L6htx4c18BL3Znpfu3aGTf3h7FGXLy9VBKnVwE U5RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=d3ntAnKa8/mYLGzPmrDnpX+SS9nceIT0yXThvuLk7dA=; b=loC1CQgHFdATcGwriiIJJLkk4g0KICNBW08Pp74t/fdOcaf7RVV3LVou48dkbWDnzR 2wWfEqZw+TNXJ/mYmkmNrb0QO7dBQ8ZMHd3XiwGAMj8LPBpe64ztgoPY8OdO08Dcf9fx mdv8euzjvqpakR1QBs19xf7TxoDX0pCUt06TgXmHm7BgtWgUe0lCHtzb71RF7eJNaziU 0wtiWzVlOrvJETE6RG1P2rq2m89f98WdVas1qodtW99kznRIdg8DUBteGgxS185ARoNZ 0ilfxp1mzepaaEGZ51BA/2/7ZQGR7ypD2wnpNAUjid81aU1C31FFVl1IrpWrzfHDOcPF D+vg== X-Gm-Message-State: AOAM532qw91QUMMmruwuqGUeUBpkCAxa8y1Q4D+FsoD1UEnx1FtKa7lV fuxnGfi++fBq2Zky9IKSH3AGp6QuExoBrQ== X-Received: by 2002:a37:9b48:: with SMTP id d69mr544640qke.435.1604652397999; Fri, 06 Nov 2020 00:46:37 -0800 (PST) Received: from localhost.localdomain ([177.220.172.74]) by smtp.gmail.com with ESMTPSA id r8sm188681qkm.115.2020.11.06.00.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 00:46:37 -0800 (PST) Received: by localhost.localdomain (Postfix, from userid 1000) id D4BF4C1B80; Fri, 6 Nov 2020 05:46:34 -0300 (-03) Date: Fri, 6 Nov 2020 05:46:34 -0300 From: Marcelo Ricardo Leitner To: Petr Malat Cc: linux-sctp@vger.kernel.org, Vlad Yasevich , Neil Horman , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sctp: Fix sending when PMTU is less than SCTP_DEFAULT_MINSEGMENT Message-ID: <20201106084634.GA3556@localhost.localdomain> References: <20201105103946.18771-1-oss@malat.biz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201105103946.18771-1-oss@malat.biz> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 11:39:47AM +0100, Petr Malat wrote: > Function sctp_dst_mtu() never returns lower MTU than > SCTP_TRUNC4(SCTP_DEFAULT_MINSEGMENT) even when the actual MTU is less, > in which case we rely on the IP fragmentation and must enable it. This should be being handled at sctp_packet_will_fit(): psize = packet->size; if (packet->transport->asoc) pmtu = packet->transport->asoc->pathmtu; else pmtu = packet->transport->pathmtu; /* Decide if we need to fragment or resubmit later. */ if (psize + chunk_len > pmtu) { /* It's OK to fragment at IP level if any one of the following * is true: * 1. The packet is empty (meaning this chunk is greater * the MTU) * 2. The packet doesn't have any data in it yet and data * requires authentication. */ if (sctp_packet_empty(packet) || (!packet->has_data && chunk->auth)) { /* We no longer do re-fragmentation. * Just fragment at the IP layer, if we * actually hit this condition */ packet->ipfragok = 1; goto out; } Why the above doesn't handle it already?