From patchwork Wed Jul 21 21:56:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lino Sanfilippo X-Patchwork-Id: 483703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MIME_BASE64_TEXT, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90569C6377B for ; Wed, 21 Jul 2021 23:57:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7059561177 for ; Wed, 21 Jul 2021 23:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbhGUXQg (ORCPT ); Wed, 21 Jul 2021 19:16:36 -0400 Received: from mout.gmx.net ([212.227.17.22]:38379 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbhGUXQf (ORCPT ); Wed, 21 Jul 2021 19:16:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1626911827; bh=TUgnLmRkp0LP6RB5mhH4ikN8orhgOMwAhKdeGxyPRqY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=bi83QHyi0IJ2+l66HemlLBVXJM5aLtPOEQv/zv7NCSlObcVtj+oDxTX3xZoxFrLiB wl/vjxVysaKtdgvult4n7yKy2rdD8sY0dwVS/hjEPh9fL2vnze0QuvkvcF36U2DNJ7 p8w3XKyEES19NU6ZxPAkw0KWYlyKfoa3F9hT3oEU= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([149.172.237.67]) by mail.gmx.net (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MGQnF-1lsJZv3EPF-00GtgN; Wed, 21 Jul 2021 23:56:50 +0200 From: Lino Sanfilippo To: woojung.huh@microchip.com, olteanv@gmail.com Cc: 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, Lino Sanfilippo Subject: [PATCH v2 0/2] Fixes for KSZ DSA switch Date: Wed, 21 Jul 2021 23:56:40 +0200 Message-Id: <20210721215642.19866-1-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:1rUgA+nhdaunIILTNb6XeAJBKlhljr/xcF3daK0td9u6FueZkqn jOMUVdDyW2LmNYeMb7lP8BOxAyjBBOI9Ux0a+WbczXs1JVT8qdRB05qxpGvlg9hInWqko+C 7/tk9dYSOIfDIicIsRJxBztvUgQgwsi6OPIQffzXySoiSqUw+6LYN9aHkimBvPH4049CIS1 nXwu9W8m/n663cXtc92Eg== X-UI-Out-Filterresults: notjunk:1; V03:K0:XqdvfWyP0/8=:V4ZM4H4KaAIb/krYlbVcs6 QiLeHHv39gFQDRvIMtjB9MoGUtXGLmJL8Maa30LsgAZK0EN5Ytp0t6XnzVVdACGkxqTp/EUSE aRGpHcZsd7djwpx1HFbPmUncG+slT36qDps7QP3hbBugJCRXn5hctLgA7i1m1GRRvXVeHqthF JQ2btQljEzEFbXMcofqZvYbvHC4xPLzo2RKmHrson091ienoNDDja6otFdZYpJkE8d9kdSqtI 2YGG7bHvfLiEK1G/0+3Evurfk9sQp3Wsuz29QZXS90fb+qAdDSqsTYgisb3JS+H8y1r4P6+to mAnJSSuAQStr7e1ZTWBirx5eU0RgaAKU4KBX8gTf8Pq/SXkRgsas4dqOcARYfpLZzS9AQLMS+ tzFErSwrUeOGaq+SpL+cIZYv/AOo4gmg1FYXU+kYbRwl028MRJ+lHi/KelYl4VNlUUcw19Pgv ByjSDjJDrHsCBGNCKruefBn4771YNcbpvj9PjJ0eNtxDZWgm6oBYqsgS/oOzRzcufLTETQia4 jTmRW/gMzsSfmi5KnD+UVhRO+FUJNU2ljvv9TiQcl4Fx/QaL0BN3fxPNg4fWKoU6wZd8JqWz1 GGLv9k054AToUQ6sIpOvULLP2YIZknD+4gkHLZouylQRoviUEBtR0BfDmDo4WuXy8h+N/Jy1g EGqHujhtx2daUgGvJ3YsBrGaWkO+WGw6gHdNpROH3Bg9VRBxLyH0RzQtuYFO2fyfSDMEVMdM2 9QBTYTcEUtPaR4DCfXZKzq0dSISNVL5UvPC6qizRGJ4K6AJl7K6TEj6IjVRJnJMGnzkRwzpfs Qmoxq2GXyGoFUaxaPo04eGDr6rxlbeuHPCEnbcogFlMMqgpK53XlTWt+gxMxuI8QYOeKlenFI Nyy/8693BILUjJH1lYGi2Q3h97Cr8Tc2Dcu7LaIPCN9qBWxM+lsKCO+0zEhWGykR3QunEolKK DUI6pvqmPavp1IGmwo4hjEIoP8z8dI7Ef++X5YqT3Vb0pxn2celeOokmapJ77jI3TtagGR3wp Aoyf9cV6XvI2h3MA6f58g526WolpzP4YdiGLOXZgFZbXJIJpttrjlpb6YJs6FpkqNGVkuIAqw RkdGMDJ1+WFV5ZW+Q6y1nzNhWnVgL6oVKoEqU2qbMU9NXn9d6/ncPduwg== Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org These patches fix issues I encountered while using a KSZ9897 as a DSA switch with a broadcom GENET network device as the DSA master device. PATCH 1 fixes an invalid access to an SKB in case it is scattered. PATCH 2 fixes incorrect hardware checksum calculation caused by the DSA tag. Changes in v2: - instead of linearizing the SKBs only for KSZ switches ensure linearized SKBs for all tail taggers by clearing the feature flags NETIF_F_HW_SG and NETIF_F_FRAGLIST (suggested by Vladimir Oltean) The patches have been tested with a KSZ9897 and apply against net-next. Lino Sanfilippo (2): net: dsa: ensure linearized SKBs in case of tail taggers net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum net/dsa/slave.c | 14 +++++++++----- net/dsa/tag_ksz.c | 9 +++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) base-commit: 54cb43199e14c1181ddcd4a3782f1f7eb56bdab8 Reviewed-by: Florian Fainelli