Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1738300ybg; Sat, 19 Oct 2019 01:26:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3M7gIbVjzc9OS//YH510wc4kBdeo5HJwYf3JhOGkugEr1BU9/YUEtKk/Ukw+T7PdA4Blt X-Received: by 2002:a50:ef17:: with SMTP id m23mr13782061eds.200.1571473571345; Sat, 19 Oct 2019 01:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571473571; cv=none; d=google.com; s=arc-20160816; b=ls79T+mNTdjhLqZWdLInjUA2YXoHnZ9Wfw2fujLogC/Dr31CqeWd69LORLjnrl3/5J MYHj0OWyK9IjmLqlAm337cIJZhahJBN573tg2PRRa65VhghhqRPmW1j1qOVC7ABZf4Lf A6cMVhniMcXsXrC2NhEW7tk2igHVG1NV7NFxycXoIF9HfLsKUdqM6L8odErPOnndaFDY IQkTlfif6w68WCyNF3wN/QF2kNv6FnaYiBBP9lJxV8hJWgNlR3j3L+hycwVFVI1Dj/pp exXX5pexkXvrRkLnZt1Mmmjsv1Po1iljCJLaJ8uYy/9AW9/X28t/vNeS7lywZpSqBRY5 iaUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c1TiVRDzq/ZhR78AYJMJD0wbL7b8cjQkHmyKijoEJ04=; b=rlkIa3wOsalVn+kR7SA3pkmWtm6ET2KNIH9iIn4Cdeb6Z+KUqWiLClJgkRWeN4susn oZ9k4MKusHT9COUJ0eejyJk0u216mYeTIrVliHNyb4nHcZk5w+onQrnG2MkJ/cPSdTEi cyBfMEH2awWXo+pbP82ExW2y4GWJ1qWsoNS3lo7R+EEFvhfLDQHWrvOxOH5l7tGJVeSJ HslYAxPGhR4LSx0B37BdkVhsLFy3HgX8SPtiGUJvg/BpjPdYRJKPatHnNvtxli1UTdsb eH+V90EXTKSxGxAHRuy1cAePemkB3153b+kzkRyrXTtwZOcAjDwpW6VwQDDodIC0NrJY 7Lxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qhfoQh1m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gw6si4899920ejb.176.2019.10.19.01.25.48; Sat, 19 Oct 2019 01:26:11 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=qhfoQh1m; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439460AbfJRNiK (ORCPT + 99 others); Fri, 18 Oct 2019 09:38:10 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:39219 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728150AbfJRNiJ (ORCPT ); Fri, 18 Oct 2019 09:38:09 -0400 Received: by mail-ed1-f68.google.com with SMTP id a15so4586686edt.6; Fri, 18 Oct 2019 06:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c1TiVRDzq/ZhR78AYJMJD0wbL7b8cjQkHmyKijoEJ04=; b=qhfoQh1m/XU4lEWOsNmjHpHy1uYe+0rA4PrsNdn/oNCZ6WDGmxwfGv8NNC4ggwzDqO IKMos0ZO0K69hcXuXl4Lib5LJUP/fOCfqWf0ACydUVH+ncB/FvMk8IF1ZP2XfB5TXD1B R89kGfrbXjq7LIr/S1IlrlgrdSjCKAmSYLJKG4gMhaCIK6v1SJ8/JGdi5zQabV5bWvmG soVrWYhCwzT5tikUiZnldU2h9Bx6sZcfM4Nz/a6QHos9BSprH2aU6AR/mDljc50PkM9h 6Fehdx3SxB7cUgchFnQ7uSJ9pnFzKWSgXx9iXJnV4MUXexpjL4VlygB/36JiiEN9gQMk pFQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c1TiVRDzq/ZhR78AYJMJD0wbL7b8cjQkHmyKijoEJ04=; b=Y7WeMh76DnvJsJKQnbaWYFn8A5kCsgf0cdzjDD99rJTC7nNElW0J5LiXhiXYxNnRvL 6FJ1+y1BcxTSmJm5bN/YhzaM/Ha2CMjU9CXCG4PdxOpL5NPbeaSQFgsLwTrNRZHtIssH Zb2KpwXj+sYtWxKZ9gRXppBKJT3GnT+/9gebwfOOCaysWw779fYfjfGyR/oAaCH3rSOh kp2o8iMHDm+Oy09t9t50gAJZKZw992qaKOCTLQFHbTqmAyYyoF5dECG73LVqFhAgzatH yPLfmakNdJ2hTnUPqkt+Wb/7EXLON+tA7Ru6mzuRmsZKiWmTj8rrRlEAA+2TihzyR6UT oehg== X-Gm-Message-State: APjAAAWlQhoeYGAQ5ILUxsrZgRQ0dN24a17w4uhGOppVijtBY+RwhYcq 5jZpnnxa4U39NMViEkQUmSdTrI8jffksGj7nuiI= X-Received: by 2002:a17:906:8391:: with SMTP id p17mr8356503ejx.216.1571405887252; Fri, 18 Oct 2019 06:38:07 -0700 (PDT) MIME-Version: 1.0 References: <20191015224953.24199-1-f.fainelli@gmail.com> <20191015224953.24199-3-f.fainelli@gmail.com> <4feb3979-1d59-4ad3-b2f1-90d82cfbdf54@gmail.com> <20191018130121.GK4780@lunn.ch> <20191018132316.GI25745@shell.armlinux.org.uk> In-Reply-To: <20191018132316.GI25745@shell.armlinux.org.uk> From: Vladimir Oltean Date: Fri, 18 Oct 2019 16:37:55 +0300 Message-ID: Subject: Re: [PATCH net-next 2/2] net: phy: Add ability to debug RGMII connections To: Russell King - ARM Linux admin Cc: Andrew Lunn , Florian Fainelli , netdev , "David S. Miller" , open list , Heiner Kallweit , bcm-kernel-feedback-list@broadcom.com, cphealy@gmail.com, Jose Abreu Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 18 Oct 2019 at 16:23, Russell King - ARM Linux admin wrote: > > On Fri, Oct 18, 2019 at 04:09:30PM +0300, Vladimir Oltean wrote: > > Hi Andrew, > > > > On Fri, 18 Oct 2019 at 16:01, Andrew Lunn wrote: > > > > > > > Well, that's the tricky part. You're sending a frame out, with no > > > > guarantee you'll get the same frame back in. So I'm not sure that any > > > > identifiers put inside the frame will survive. > > > > How do the tests pan out for you? Do you actually get to trigger this > > > > check? As I mentioned, my NIC drops the frames with bad FCS. > > > > > > My experience is, the NIC drops the frame and increments some the > > > counter about bad FCS. I do very occasionally see a frame delivered, > > > but i guess that is 1/65536 where the FCS just happens to be good by > > > accident. So i think some other algorithm should be used which is > > > unlikely to be good when the FCS is accidentally good, or just check > > > the contents of the packet, you know what is should contain. > > > > > > Are there any NICs which don't do hardware FCS? Is that something we > > > realistically need to consider? > > > > > > > Yes, but remember, nobody guarantees that a frame with DMAC > > > > ff:ff:ff:ff:ff:ff on egress will still have it on its way back. Again, > > > > this all depends on how you plan to manage the rx-all ethtool feature. > > > > > > Humm. Never heard that before. Are you saying some NICs rewrite the > > > DMAN? > > > > > > > I'm just trying to understand the circumstances under which this > > kernel thread makes sense. > > Checking for FCS validity means that the intention was to enable the > > reception of frames with bad FCS. > > Bad FCS after bad RGMII setup/hold times doesn't mean there's a small > > guy in there who rewrites the checksum. It means that frame octets get > > garbled. All octets are just as likely to get garbled, including the > > SFD, preamble, DMAC, etc. > > All I'm saying is that, if the intention of the patch is to actually > > process the FCS of frames before and after, then it should actually > > put the interface in promiscuous mode, so that frames with a > > non-garbled SFD and preamble can still be received, even though their > > DMAC was the one that got garbled. > > Isn't the point of this to see which RGMII setting results in a working > setup? > > So, is it not true that what we're after is receiving a _correct_ frame > that corresponds to the frame that was sent out? > Only true if the MAC does not drop bad frames by itself. Then the FCS check in the kernel thread is superfluous. > Hence, if the DMAC got changed, it's irrelevent whether we received the > packet or not - since "no packet" || "changed packet" = fail. > > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up > According to speedtest.net: 11.9Mbps down 500kbps up