From mboxrd@z Thu Jan 1 00:00:00 1970 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 06933C433EF for ; Fri, 21 Jan 2022 02:06:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348350AbiAUCGb (ORCPT ); Thu, 20 Jan 2022 21:06:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244982AbiAUCGb (ORCPT ); Thu, 20 Jan 2022 21:06:31 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD595C061574 for ; Thu, 20 Jan 2022 18:06:30 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id n10so20994194edv.2 for ; Thu, 20 Jan 2022 18:06:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=+jqeMXJnFZ5Ghc7lTOyWNGYnnjG/L6CpPIZyv/Bbj/8=; b=eagGBWnRrTc0L8Qyk790kybCnUKlk72NzBlpxHRNRT+2ydSR6nS6jz6p+14ehVm50c hJ352jlXYyUTGbYntpgPKSz/b53jgDbzI4KtYnBtRBEMmzFb1XeAgc5t0M6wjcGMxcAf rU6bIBAtKZWsPB0IWfXi8xTDVbbsNY68KxrpdnHh07cRmbCCse+PmKL3m4ztBtp7fzkK xdrYF22HuVqj91IT9z7iLZ8ErtNMdCpgh3bn4a0A4xO1n6ZhWfZ8ZddXrhjQTcp5sFw+ dxUO13gadxPfqwSADPzY5zdOZ7G6StA3X9CetjkuTlYVXh+VJpuf7pKLpvuhaninIpsJ V6Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+jqeMXJnFZ5Ghc7lTOyWNGYnnjG/L6CpPIZyv/Bbj/8=; b=Asz4xU8serlF+Vu9XYoZOUfDKHjWRFld5GcMHOpJuEdEUrNQUSgL6XW4hwsdFikz9I /gupskFl1vWaEBzG78Wn3NJMBdOmM9EzejOBPlmRaPOIvkZpN+U//pj1UMskjncxXN85 uvmX/wS+4Z95kdaiDFERQJFFD3ctlZDNYlP8boJcOnhQn8qeYGVzwu7CGWvYV/a0KiEO jbh3DuuclKghxYtpaGr8nMBa41FMbYbYJDkdNop92dls74QmEoNadLewG647sYeAVbbw WTZcZDYNXxKvRdHRjlGYGZkQ+gv7Q/zp9vuIC5GAFalr/6XdvDw8nGStD6rWg9o+t08Z 3tdA== X-Gm-Message-State: AOAM530MgX7VdiSoA8DK+dACZ/PWFbpVHijy/bFFD/QOH4oEt0YZ83Rl LC8wd5oAQ2rdOgPDpF7TpRI= X-Google-Smtp-Source: ABdhPJyRzK/dTaV3aK0FVizw443heRLtQXEb8V3lTs/h6w/VjbQTbah5eDO/2d0UyVngH3NrRW+yIQ== X-Received: by 2002:aa7:ca47:: with SMTP id j7mr2122676edt.102.1642730789078; Thu, 20 Jan 2022 18:06:29 -0800 (PST) Received: from skbuf ([188.25.255.2]) by smtp.gmail.com with ESMTPSA id o13sm2015726edj.58.2022.01.20.18.06.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Jan 2022 18:06:28 -0800 (PST) Date: Fri, 21 Jan 2022 04:06:27 +0200 From: Vladimir Oltean To: Luiz Angelo Daros de Luca Cc: Andrew Lunn , Frank Wunderlich , Alvin =?utf-8?Q?=C5=A0ipraga?= , "netdev@vger.kernel.org" , "linus.walleij@linaro.org" , "vivien.didelot@gmail.com" , "f.fainelli@gmail.com" , "arinc.unal@arinc9.com" Subject: Re: [PATCH net-next v4 11/11] net: dsa: realtek: rtl8365mb: multiple cpu ports, non cpu extint Message-ID: <20220121020627.spli3diixw7uxurr@skbuf> References: <87ee5fd80m.fsf@bang-olufsen.dk> <87r19e5e8w.fsf@bang-olufsen.dk> <87v8ynbylk.fsf@bang-olufsen.dk> <20220120151222.dirhmsfyoumykalk@skbuf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, Jan 20, 2022 at 08:35:54PM -0300, Luiz Angelo Daros de Luca wrote: > > And what is the problem if the hardware cannot calculate the checksum > > with an unknown EtherType? Is it the DSA master that drops the packets > > in hardware? What is the reported error counter? > > No, the issue is with outgoing packets and nothing is dropped inside > the DSA device. Ah, sorry, I missed that. > If the OS is configured to offload (I'm using OpenWrt.), it will send > a packet with the wrong checksum expecting that the HW will fix that. > After DSA is brought up, the OS is still expecting the HW to calculate > the checksums. However, with the EtherType DSA tag from a , it cannot > understand it anymore, leaving the checksum as is. The DSA switch > (Realtek) passes the packet to the network and the other end receives > a broken packet. Maybe if the DSA knew that the CPU Ethernet HW cannot > handle that DSA tag, it could disable checksums by default. But it is > difficult to foresee how each offload HW will digest each type of CPU > tag. > > Is the kernel enabling checksum by default when the driver reports it > is supported? If so, it would be nice to somehow disable offloading > with some kind of device-tree dsa cpu port property. :) device tree properties are not the fix for everything! I think I know what the problem is. But I'd need to know what the driver for the DSA master is, to confirm. To be precise, what I'd like to check is the value of master->vlan_features.