From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCC88C43334 for ; Sat, 16 Jul 2022 23:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=7t+VoGkBTC7+HMuEdGBzARSxT9citQkPj0H8p2V9UMA=; b=Oj597YU7qrw9w8 zSUwZRosWQWnEKiw08mwoycLi9rSLVj9TIP53thvO5fZH08GG1bOhXNnJzi/6mRfniCvlcE5hxUNX 5xIs0YOnxfNB4Gr4P/Gx8sojWS94bkQYZ4UqeHz1fl+KYqW8XVZhduFIwS/d0Umb6gQ/VoSIae9oJ J+EuUlYSaOFiYGTNzJT5cHFhZGeWoffskqVPah0ymcKnBQUhSDI1kDwG/k2+8mlbxdJ9vpixqljX/ YWhr/Zjo71mqTcpkQqPZSfIlaZGrjEWhDcX9ACcXerw8S56FOxQQTP1vZG6RAAdhW9KAfPfJg8Wuv gzC3vAREylM74Zkm1lqg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCqtR-001B9N-V0; Sat, 16 Jul 2022 23:08:14 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oCqtP-001B7w-0T for linux-arm-kernel@lists.infradead.org; Sat, 16 Jul 2022 23:08:12 +0000 Received: by mail-wm1-x32a.google.com with SMTP id ay11-20020a05600c1e0b00b003a3013da120so5386179wmb.5 for ; Sat, 16 Jul 2022 16:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zH/D31uMSDW0xhMnNPteLenGrNsKNhRXe32KFuNIx54=; b=iZCU+4efLqXnq7Fn8jro1X0cVxj0VBLooeeeXriBNAUQRJ5KyBA2M97X91wmiG/oaL 6Ut21qKdcF3a0p5Uqc/UVkYgeS84GcfXye5rZeyGzGjuWg+wVDoXmyI4Meotz/12EfN8 GzJRq8QRMMDyKmALey0oX7mGQO9SMu7tXjAKYhrF8mms5VwoKIQv2DjxGzJ7nIS/veSX m3QDvSsBYTncKjN0+v4DFsUW87Wds72GcdkSnDxH5+/EPVj+smJYjvecznd+ogMch6fQ Zfro105mmvsVXvpD9sVKJ9dMJvydQ4Prar2hUcpy6PL4PGgwpuyCN2FEPEqinp0I0lQy iRpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=zH/D31uMSDW0xhMnNPteLenGrNsKNhRXe32KFuNIx54=; b=PtbCKdk75gyaZiuhNEuLSAVNUi+lRrQHTjmFDzq6hbCXyFn9UqOnQ8uoLHCGjId4qM USx7hzS0mwlpBBzCJEmqv+K5sqFXYlRINN1sYKp769wZQ0OS2h51pqpmirAcC7Gun9cO bBullaUFDCF8Wrw90mmX7h0rorDUnSJcBDQ5LggIvjxjVSgZLHqIKa6cmhtSZx/Hx3bz uEmERnyaP1Uo63fLSJjafT4EZUEMSfUuw38EKmTM4ONZTmRwJUiigNXlAlX95+F7iPN/ H7R0m/gXXvoySnHzvkupCU3Imhrc9zCY623b/sUZGrsHHo8FIcKxO3CGhy3vOiBrf9fZ N/7A== X-Gm-Message-State: AJIora8SwO2Rq+TI32gmDY90MuUEnNem3XnKv+rQ/j8f+Rk4VK1gMGZf BB4ADBRLkxF44lYZhYwExC8= X-Google-Smtp-Source: AGRyM1tX5E+vmOz3erLPVIca2091fu8LsjFwOgXT2gVUO09ywIM7eSr9s3eFBZFtgcMVYQtNmeF5UA== X-Received: by 2002:a1c:4b09:0:b0:3a2:ff2a:e543 with SMTP id y9-20020a1c4b09000000b003a2ff2ae543mr16170708wma.93.1658012889078; Sat, 16 Jul 2022 16:08:09 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id l13-20020a05600c2ccd00b003a2f2bb72d5sm15150755wmc.45.2022.07.16.16.08.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Jul 2022 16:08:08 -0700 (PDT) From: Christian Marangi To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Russell King , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Christian Marangi Subject: [net-next PATCH v3 0/5] Add MTU change with stmmac interface running Date: Sun, 17 Jul 2022 01:07:57 +0200 Message-Id: <20220716230802.20788-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220716_160811_113020_4687769A X-CRM114-Status: GOOD ( 16.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This series is to permit MTU change while the interface is running. Major rework are needed to permit to allocate a new dma conf based on the new MTU before applying it. This is to make sure there is enough space to allocate all the DMA queue before releasing the stmmac driver. This was tested with a simple way to stress the network while the interface is running. 2 ssh connection to the device: - One generating simple traffic with while true; do free; done - The other making the mtu change with a delay of 1 second The connection is correctly stopped and recovered after the MTU is changed. The first 2 patch of this series are minor fixup that fix problems presented while testing this. One fix a problem when we renable a queue while we are generating a new dma conf. The other is a corner case that was notice while stressing the driver and turning down the interface while there was some traffic. (this is a follow-up of a simpler patch that wanted to add the same feature. It was suggested to first try to check if it was possible to apply the new configuration. Posting as RFC as it does major rework for the new concept of DMA conf) v3: - Fix compilation error reported by kernel test bot (missing dma_confg changes to tc and selftest source) v2: - Put it out of RFC Christian Marangi (5): net: ethernet: stmicro: stmmac: move queue reset to dedicated functions net: ethernet: stmicro: stmmac: first disable all queues in release net: ethernet: stmicro: stmmac: move dma conf to dedicated struct net: ethernet: stmicro: stmmac: generate stmmac dma conf before open net: ethernet: stmicro: stmmac: permit MTU change with interface up .../net/ethernet/stmicro/stmmac/chain_mode.c | 6 +- .../net/ethernet/stmicro/stmmac/ring_mode.c | 4 +- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 21 +- .../ethernet/stmicro/stmmac/stmmac_ethtool.c | 4 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 722 +++++++++++------- .../stmicro/stmmac/stmmac_selftests.c | 8 +- .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 6 +- 7 files changed, 457 insertions(+), 314 deletions(-) -- 2.36.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel