Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3725465ybg; Sun, 20 Oct 2019 20:27:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAytIhLL1qBX+hP/SMt517jGEUQgtoTCr0P53DoW8Vtw0CnVRHnkpF6CTcLrhlWrP+zNKB X-Received: by 2002:a17:906:6d89:: with SMTP id h9mr19524474ejt.169.1571628459080; Sun, 20 Oct 2019 20:27:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571628459; cv=none; d=google.com; s=arc-20160816; b=AX7Vmk3+kXcEDQ/07KN7C0SM4dUs1QCuPOYm4GjrwlU5cqMCLpat+I+vRjNLnMUkxG PZeke1nZ3W9xgqNYmJP9C5/xwhqiG229ogQyXJprFErWB6LLLkdoZ/+fs2p5AMWd0HlB ecVa8Y3q0/RVP9S3y8s0NC0/Grk69OxGRr0ZPXItZbuOc/24Gnl4NSxrCk9qY+wCLXrK yvBTWmtjTedZoS8HhBlpcOoJGiMGD6HvBj+faoX7Q22bXMwpfMZDVgzcVRU0i293jVJT v7A/HjvIBsMvsKWotKzje14uyCmsU01E5un3Ad7edCnG/MGiQF/5WYudS/mq656dqlNX 8fsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=dFT6X4RJWtF4NqVQ+ccDRinbt+tr0iYqrJDoOSTLH0I=; b=s4dzL1duvEeaB0SZo1BgThwqNGakEl0tAGgvu8yPZMvmZKwXI6xze4VyrD4wK5XiO5 OZtPe1HjAp+OaLRS6HKbVyNYQn22auhyu9R82grfpqtetWqHQ3D+XSLAZV013VDeO3PZ VCNRtdznGFBOjJD/K6GeFHK/HfP4+zI1JsL+27LLWrJ7UU4lBpqw1YGZAmynMJ4whAEZ HGfSWISVKiDCHYeQ8ipnLFQnXYKIkkR7DezNTS/N6yebW5YsaF3hZOu9knQaJdESlwLv RoveIyGdzyFdgO70YDmGndRSwc01uKGaFedgODob+2ez6bblE2U/qhRLUlT1jyV5cS+6 k1CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r8si1840579eju.426.2019.10.20.20.27.14; Sun, 20 Oct 2019 20:27:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726913AbfJUD1J (ORCPT + 99 others); Sun, 20 Oct 2019 23:27:09 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:50310 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726778AbfJUD1I (ORCPT ); Sun, 20 Oct 2019 23:27:08 -0400 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id A9459FE1304850AFE75A; Mon, 21 Oct 2019 11:27:06 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.439.0; Mon, 21 Oct 2019 11:26:58 +0800 From: Shaokun Zhang To: , , , CC: yuqi jin , Eric Dumazet , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Maxime Coquelin , Shaokun Zhang Subject: [PATCH v2] net: stmmac: Fix the problem of tso_xmit Date: Mon, 21 Oct 2019 11:27:34 +0800 Message-ID: <1571628454-29550-1-git-send-email-zhangshaokun@hisilicon.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <0b6b3394-f9f0-2804-0665-fe914ad2cdea@gmail.com> References: <0b6b3394-f9f0-2804-0665-fe914ad2cdea@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: yuqi jin When the address width of DMA is greater than 32, the packet header occupies a BD descriptor. The starting address of the data should be added to the header length. Fixes: a993db88d17d ("net: stmmac: Enable support for > 32 Bits addressing in XGMAC") Cc: Eric Dumazet Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Cc: Jose Abreu Cc: "David S. Miller" Cc: Maxime Coquelin Signed-off-by: yuqi jin Signed-off-by: Shaokun Zhang --- Changes in v2: -- Address Eric's comment: add the Fixes tag drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 3dfd04e0506a..4e9c848c67cc 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -2995,6 +2995,7 @@ static netdev_tx_t stmmac_tso_xmit(struct sk_buff *skb, struct net_device *dev) } else { stmmac_set_desc_addr(priv, first, des); tmp_pay_len = pay_len; + des += proto_hdr_len; } stmmac_tso_allocator(priv, des, tmp_pay_len, (nfrags == 0), queue); -- 2.7.4