Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp220175pxv; Wed, 21 Jul 2021 20:59:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJylGZv2+lb2MG7zWMu05/VfOBk+nmh5ynYrFmMDzMgiq6w3lSsQH/+vfQeuwlh/xMICKZfD X-Received: by 2002:aa7:cb9a:: with SMTP id r26mr52733903edt.78.1626926389273; Wed, 21 Jul 2021 20:59:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626926389; cv=none; d=google.com; s=arc-20160816; b=Z93edbQlMQgKleMTiCBtMJEwWk9IlE8b9rAgud7q2wbT8T4kToN/2v+KaQg2kI3gHz Y/m5c1uQCwrsuahSF+nH+llNjnSvSL2/zHjRFHXwu0K3MJAtc1uS1/g66GHCme0ymtHN LUnle/MSYVoo7Wyuz4w1Ng/O76zYwcYt2NnOeYlDltDz22ky+82wOGaUoKKKyQsQCyFp k5vny0nBe1UKttnasMr0ilyZsWsFzloSc6sxhMygkuG8r0WPp/BYQy6H5m9zeOYer7hN jTf9Oaceth2uJMbI+S2OM1CXpCfN2x3H9FTiAnl9ZgeX4PFwbe/abaMcv1LJsVf8M8Fo N+BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=osmz6EY8uXQ1knNao0xDpmsxbyJi+Dvgv0W3ozo2sXQ=; b=qk7TmmeEQJ7nmWmdrRcLO+Qu73gQH3FyfTnalEcRASrb+jsRMjlR+QGblxltel8oJ8 FTFy8EFl3q43p2rhjpX1rVemtp5JojZKvwbWWN2A1TIflg475WBcLU/bF786CiX3hLev bQsw/mIiA/nqMhMLASh4yf4nq7uUYLqB4B5rqlZvxc+YBLic4lp0zO5WhOH66ZBOa6Hq I0iUan8FF4wJaPb0igJPxEg3bMAznZwDTRBQd3WwzFZN119eSYELk/dHTwNFIK+DY8iv zdCiVgaz6uFcivEFvIU0/jXw1tQPD7XDSwfCrxb57+q2IWPodiSvVUmM9hUjXYcbprhe Frxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="mju5I/Qj"; 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 ho35si1694767ejc.607.2021.07.21.20.59.26; Wed, 21 Jul 2021 20:59:49 -0700 (PDT) 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="mju5I/Qj"; 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 S230411AbhGVDPf (ORCPT + 99 others); Wed, 21 Jul 2021 23:15:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbhGVDPd (ORCPT ); Wed, 21 Jul 2021 23:15:33 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 359D4C061575; Wed, 21 Jul 2021 20:56:07 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id gx2so4325785pjb.5; Wed, 21 Jul 2021 20:56:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=osmz6EY8uXQ1knNao0xDpmsxbyJi+Dvgv0W3ozo2sXQ=; b=mju5I/Qjw+NtbeIcS7Y38iQgQAq8F6E/DcavUTSClL9h0pMOejTBqRkiLuF2WCw2Wg OL5gruZ1m+ipN3l3tBlmoKwXhJx4epyrBvOzfnBwan20+YwOIz6jCalqqK14fXvZEx4t kr6FA42G96kBJYDzKaeUvV/8UDeZX6Gyr3r3JGkjn14xnEvG+amDZP784M9pbZ72ATqF Ffk4h+OBiSTk+z7Z5+R4U6Z0TrGWLXPl48VXajCrxkCQ5i2F5T7pvQZ0Jbrosg5JbaSF T7ST1tMakpTX7axUk4uid+bQ97/Lb0EooS1QLe0cvUT4FVoKB+C7uK+XRLIovdDpFkqw WxIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=osmz6EY8uXQ1knNao0xDpmsxbyJi+Dvgv0W3ozo2sXQ=; b=X6BtenehT6+LefNgnmOQ8n9M3E+W08m581Jot8yTD7MGc8BHw0/vOMnW5xMuKF5UHZ aDiVHJN1Tzuq9DajYc+sTUGou6GD4LU3KQPOHHfmUldadreIo5Y4iIr/nSEovSzBv61y UQuUvVJXEO8F4bWkjHRMuwdIdmZJvuM/RG0l4oJ37dDSuHkKBAEHlRZs1MHtZ470FU4f 7U+aA5dikZW7iW3llfpLRMrMzYn+GoRvPQG1ELmMcT1Ck18EJyVDAv2f+P3ZVGZn9Ybi sUAkbYFXwJEd9KNQqrwtzN4GKZ2qoDUKXZ3yEZ+m9lVUmEmTDpVD28HgiG1qjysi89Bi Csag== X-Gm-Message-State: AOAM530CT3076/1wgsY7YDjzyh0XBqpnIzgYArhaLLCOvyWanx+JLPoT QKQjig8A8PtLtHtwy+9frhp3RttoCVU= X-Received: by 2002:a17:90a:c89:: with SMTP id v9mr39147840pja.175.1626926166241; Wed, 21 Jul 2021 20:56:06 -0700 (PDT) Received: from [10.230.31.46] ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id f18sm1295868pjq.48.2021.07.21.20.56.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 21 Jul 2021 20:56:05 -0700 (PDT) Subject: Re: [PATCH v2 2/2] net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum To: Lino Sanfilippo , woojung.huh@microchip.com, olteanv@gmail.com Cc: UNGLinuxDriver@microchip.com, andrew@lunn.ch, vivien.didelot@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210721215642.19866-1-LinoSanfilippo@gmx.de> <20210721215642.19866-3-LinoSanfilippo@gmx.de> From: Florian Fainelli Message-ID: <06583db0-ac0e-8e9d-324c-faf3f8b38ac0@gmail.com> Date: Wed, 21 Jul 2021 20:55:57 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: <20210721215642.19866-3-LinoSanfilippo@gmx.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/21/2021 2:56 PM, Lino Sanfilippo wrote: > If the checksum calculation is offloaded to the network device (e.g due to > NETIF_F_HW_CSUM inherited from the DSA master device), the calculated > layer 4 checksum is incorrect. This is since the DSA tag which is placed > after the layer 4 data is considered as being part of the daa and thus > errorneously included into the checksum calculation. > To avoid this, always calculate the layer 4 checksum in software. > > Signed-off-by: Lino Sanfilippo Reviewed-by: Florian Fainelli -- Florian