Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp690111pxv; Wed, 14 Jul 2021 13:09:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUocQm2XTGU8432ZKOcVLvyG0iSkiko9b4l9TIcg+y0ZhQpMKu79tkPsGARFf57jpxl3cU X-Received: by 2002:a5d:8453:: with SMTP id w19mr8207338ior.105.1626293358909; Wed, 14 Jul 2021 13:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626293358; cv=none; d=google.com; s=arc-20160816; b=m+tAT8XomdrzOBG99ry6Dxc7EFTnNVjSwq8WiVWg2QijkDMJLYhD24wuALYb6OjQUl 6f+FDAfY8+9FV5IbHJGJvajVnQSinbvrSChwTcsiYkfLSCA4ilpqP0GhBf8RlBJihJLE MiRPvVPX3//VVK8w3CkH5q8z1mfOyixJU3YuZ9JyyEn2gj8zOlrRojqXnVOdgmVwcyAf j08iAV/y0RkAqTW90Gy5tErrXHWbGPAYuPGkPPft8MjyF4vWF5HLsDMYogVbnL9faApw eb7Kj81Qi7D/UsVZp7sCaiY5f6rRzpgIuTD7fknuaPlibgA2z953z+IWHNHrJXbPcNM6 D/vg== 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=aUBnfseT0Zje0G2mRhBHziBu0gGM/po1m8DQFWGOJ/o=; b=r4Xw2D+IXOFnVcrdiXPRE5OCv1pdsIy1JXLPf41fJ/IMSaBAOW8I68jFRpKBtlO180 zc1vhHBYlCdqD0fe8Jb1JGZZ9RkUFiJXxxtVVPI/rY6sojlPz0PDkjb98E9tJxBUaOYC lNDM8w2Kf7oAn1p7JKj5nQjNBSpXyJymA7l8wqqv41Gb3Dnzdm+4ZQaCmkC5h/9eo1LX JSyDR9fpc/A9w2f6WEZbKNJxAVoA+C6c1eG6MsfbGpMCqQpB095aApX3eXOzXB1j33qJ +Fe0B9IHv26NnyFDKXRuAhF2e7ESXL4pSnt3refr9/rUMQldMEz8CYXTovUMdDVshDiJ +aOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=CX7Piuv6; 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 m4si3346601iln.52.2021.07.14.13.09.06; Wed, 14 Jul 2021 13:09:18 -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=CX7Piuv6; 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 S239619AbhGNUHK (ORCPT + 99 others); Wed, 14 Jul 2021 16:07:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241185AbhGNT54 (ORCPT ); Wed, 14 Jul 2021 15:57:56 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 656A1C06175F; Wed, 14 Jul 2021 12:48:15 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id f9so4631540wrq.11; Wed, 14 Jul 2021 12:48:15 -0700 (PDT) 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=aUBnfseT0Zje0G2mRhBHziBu0gGM/po1m8DQFWGOJ/o=; b=CX7Piuv6Dln3mJRSNmkklr+7tIkBfgYYnqF318JjM167vyqBwl/JhQSSwm9ZJ/rIIB 9BGMH+PwEceWIalwFeLIw8Ds5AAoq8TUPfIQRCyK11XUjiR5+0jBk+szZ1jUCIELEnzD ZTg5k5Ra6b1tS2wSOTnYejPIad1KFpQRPGY389qYT0AmKhy8yJY9ANeeEKqFMBtzaxOw iuXC38wiVwk8b4gyOZzZD1UG3e+BV1NeuZjBZI0H8cWwyfrG7ZG8npdqYkckjcfZRb9j f7+e2js04X67g/ydqsIX8VuoaOk/CYnxPeCgRVq97VxSVQ97lsgsiJwwgi18PpoOf9GM 8xkg== 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=aUBnfseT0Zje0G2mRhBHziBu0gGM/po1m8DQFWGOJ/o=; b=hd/SyXgROU6V6yFpPKsbRaADORL+BGe1sZu19ZCMGiaMIfQA6uC4fksF2RMt1Pn4mh oP29KIyFdFDZd4D6lcSl5kpGHuholOQUGiBU1TCC2byyZ9PBCYrdK607WnwKNHUmlgrD L7RVBjLzasKj4jb/binuFkn9UGwrhGSYFz0wLAtyGt8PrFbALKTDnfs4oh1sXeFYABkZ a6eTStci0/ypyKdjor9kBcLLKPNmzxgHwODR/jjKhB+zWGZ/SSWhn2Mi7X6QBCWdc2Zp xy7nT42y4VRYOXtExczHYDsvkx2ZE9bxfha8tedLbDDeayDVNb5cWUn0qCZTDrhttlyR Z52Q== X-Gm-Message-State: AOAM531711Zdy76OzAqXxh/XDsPSBytZATp2o2/pzCQkZ907S6W2itZM CdFnarZwM0GJIk8N+uHgrOg= X-Received: by 2002:adf:e7cc:: with SMTP id e12mr15444294wrn.51.1626292094018; Wed, 14 Jul 2021 12:48:14 -0700 (PDT) Received: from skbuf ([82.76.66.29]) by smtp.gmail.com with ESMTPSA id o5sm2004382wms.43.2021.07.14.12.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 12:48:13 -0700 (PDT) Date: Wed, 14 Jul 2021 22:48:12 +0300 From: Vladimir Oltean To: Lino Sanfilippo Cc: woojung.huh@microchip.com, UNGLinuxDriver@microchip.com, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum Message-ID: <20210714194812.stay3oqyw3ogshhj@skbuf> References: <20210714191723.31294-1-LinoSanfilippo@gmx.de> <20210714191723.31294-3-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210714191723.31294-3-LinoSanfilippo@gmx.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lino, On Wed, Jul 14, 2021 at 09:17:23PM +0200, 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 seen as a part of the data portion and thus > errorneously included into the checksum calculation. > To avoid this, always calculate the layer 4 checksum in software. > > Signed-off-by: Lino Sanfilippo > --- This needs to be solved more generically for all tail taggers. Let me try out a few things tomorrow and come with a proposal.