From patchwork Mon Mar 13 22:42:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Serge Semin X-Patchwork-Id: 13173401 X-Patchwork-Delegate: kuba@kernel.org 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5AE8BC6FD19 for ; Mon, 13 Mar 2023 22:43:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbjCMWm6 (ORCPT ); Mon, 13 Mar 2023 18:42:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229801AbjCMWmz (ORCPT ); Mon, 13 Mar 2023 18:42:55 -0400 Received: from post.baikalelectronics.com (post.baikalelectronics.com [213.79.110.86]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B15D7907BB; Mon, 13 Mar 2023 15:42:45 -0700 (PDT) Received: from post.baikalelectronics.com (localhost.localdomain [127.0.0.1]) by post.baikalelectronics.com (Proxmox) with ESMTP id C7A5BE0EB3; Tue, 14 Mar 2023 01:42:44 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= baikalelectronics.ru; h=cc:cc:content-transfer-encoding :content-type:content-type:date:from:from:in-reply-to:message-id :mime-version:references:reply-to:subject:subject:to:to; s=post; bh=E+SweRvzgDjVFlkaravB0VQvVr+lr/xjXdJLlqkPtRU=; b=Wr1rvYXKZAuE j6DQqmf5SLfAA2Pc3RJbB+0xULqdMJ7qZ7uqLZYKwuh3IYjonb6V7PfWMi+mph90 wn1IdTZJHuaLYnG3D0fOMNiOGTBININL2TO/dcHkciSX15ERP9hOeTlhfvK67DAs jRLKtLkfGEhjQTi3Dv40RVUkkdZb12U= Received: from mail.baikal.int (mail.baikal.int [192.168.51.25]) by post.baikalelectronics.com (Proxmox) with ESMTP id A57FAE0E6A; Tue, 14 Mar 2023 01:42:44 +0300 (MSK) Received: from localhost (10.8.30.10) by mail (192.168.51.25) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 14 Mar 2023 01:42:44 +0300 From: Serge Semin To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Russell King , Andrew Lunn , Heiner Kallweit , Aaro Koskinen CC: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Biao Huang , Yang Yingliang , , , , Subject: [PATCH net 02/13] net: stmmac: Omit last desc flag for non-linear jumbos in chain-mode Date: Tue, 14 Mar 2023 01:42:26 +0300 Message-ID: <20230313224237.28757-3-Sergey.Semin@baikalelectronics.ru> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313224237.28757-1-Sergey.Semin@baikalelectronics.ru> References: <20230313224237.28757-1-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 X-Originating-IP: [10.8.30.10] X-ClientProxiedBy: MAIL.baikal.int (192.168.51.25) To mail (192.168.51.25) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Indeed similar to the ring mode we need not to set the LS flag in a Tx DMA descriptor of the last chunk of the linear jumbo-SKB data if it's supposed to have additional fragments attached. That buffers will be used to initialized further Tx DMA descriptors later in the common stmmac_rx() code. The LS flag will be set for the last of them then. A similar fix has been introduced for the ring-mode in the commit 58f2ce6f6161 ("net: stmmac: fix jumbo frame sending with non-linear skbs"). But for some reason it hasn't been done for the chained descriptors. Fixes: 58f2ce6f6161 ("net: stmmac: fix jumbo frame sending with non-linear skbs") Signed-off-by: Serge Semin --- drivers/net/ethernet/stmicro/stmmac/chain_mode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c b/drivers/net/ethernet/stmicro/stmmac/chain_mode.c index 2e8744ac6b91..60e4fa5060ce 100644 --- a/drivers/net/ethernet/stmicro/stmmac/chain_mode.c +++ b/drivers/net/ethernet/stmicro/stmmac/chain_mode.c @@ -73,7 +73,8 @@ static int jumbo_frm(void *p, struct sk_buff *skb, int csum) tx_q->tx_skbuff_dma[entry].len = len; /* last descriptor can be set now */ stmmac_prepare_tx_desc(priv, desc, 0, len, csum, - STMMAC_CHAIN_MODE, 1, true, skb->len); + STMMAC_CHAIN_MODE, 1, + !skb_is_nonlinear(skb), skb->len); len = 0; } }