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=-0.6 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED 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 DBE94C43381 for ; Sun, 24 Feb 2019 21:27:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8C4DA20878 for ; Sun, 24 Feb 2019 21:27:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Gr1Ubi6f" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726447AbfBXV06 (ORCPT ); Sun, 24 Feb 2019 16:26:58 -0500 Received: from mail-ot1-f66.google.com ([209.85.210.66]:33465 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726399AbfBXV06 (ORCPT ); Sun, 24 Feb 2019 16:26:58 -0500 Received: by mail-ot1-f66.google.com with SMTP id q24so6251765otk.0 for ; Sun, 24 Feb 2019 13:26:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:in-reply-to:references:mime-version:content-transfer-encoding :autocrypt:subject:to:cc:from:message-id; bh=RekSIFjWxT2bBOUttlhhah1AsVmESFtsPaeDQ4/WWnM=; b=Gr1Ubi6fikGiz4hP3OJJXhcXy5RCtoqmEptiug9xZF4p0vZ4bOL0kfK7x6QCwxsKtn 2M7J7wtMf4nM0+6kUcgj9ZWRMuPdutvfrH51fgN7VizrX9TF1uIJ+9n+XSV+VLZi/bQi U/ezNKEyQlVnIvUFuLP60hZwD4N1yClC4z7rVlbNl2Vh8IS+XE9r/t2J7TUQt5+l7G+P 6+WKvXx/0pXnsBhlMnt6/UJMhH2fcK+NxMacXZq4BCVTwSZaPBHwwTsFKS9c2JBL6NLq WLz/0k7HzViek0W83poLxw8zoSoMgr+RZa8mED+/lANclR1skATtrnDLGJL2nqWCRSU9 +9AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:references:mime-version :content-transfer-encoding:autocrypt:subject:to:cc:from:message-id; bh=RekSIFjWxT2bBOUttlhhah1AsVmESFtsPaeDQ4/WWnM=; b=igizMWY1wZHgnGe103mv1Qns9KoJiKcJjWkxmgJn0omwGSIrbc1A8jC+a7nuW5mv18 sFpsH4NdjrccB2VZG2IvYcHNR9DWwzPLwtbod2IOjNBqY5qBCGOAGasnxu8JJXPclSr8 gXuFFKhvMbLgl+BTwhf8a/IEgSYwUq5PLE3/+vSsfOpcFnCSf7QIQ1YoO/Qlh8IqE6Iw 3N8f4Us9plXMby3ccdCf3ba5oWzbahDyuNQ6300oohd/j8L27tpfcGWdoYlJ+mKfcZbI tTIC/IVz5uw3ByLbRcz0IVFWfgCQyaDW7FwUwv/ec5Ic3/Bf7Avu0Y9WY6qc32n3yfEo lBRg== X-Gm-Message-State: AHQUAuaw91w6oKhE9ogotUI09EnRhUJOau1TjYOHTIAaVAT+8dAF5dfj ve3IdFG/1oyLfHc8D63bEOE= X-Google-Smtp-Source: AHgI3IYuA3A6o9ei2b/Zwh5z2476kflb6SPOwO0yx2N3xrleTgAqHr6mPHykqA3gFiqrLEznWj+xiQ== X-Received: by 2002:a9d:2269:: with SMTP id o96mr10171033ota.45.1551043617164; Sun, 24 Feb 2019 13:26:57 -0800 (PST) Received: from localhost (ip68-228-73-187.oc.oc.cox.net. [68.228.73.187]) by smtp.gmail.com with ESMTPSA id y37sm3700806ota.17.2019.02.24.13.26.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 24 Feb 2019 13:26:56 -0800 (PST) Date: Sun, 24 Feb 2019 13:26:50 -0800 In-Reply-To: <20190224170455.GH26626@lunn.ch> References: <188fcef7-81fe-cffc-af71-1f37725b8611@gmail.com> <20190223234235.GA26626@lunn.ch> <6dd3f82a-eea0-c9b4-8dd6-f2f313578b1f@gmail.com> <20190224150403.GF26626@lunn.ch> <20190224151555.xsopwkuicsop65rw@shell.armlinux.org.uk> <403607a0-16d8-15b6-f0aa-b8b13793d401@gmail.com> <20190224153449.gg3c3fyryztdj3vm@shell.armlinux.org.uk> <20190224154900.jmjuh4uz2lvtankg@shell.armlinux.org.uk> <7005686d-45cb-a8af-de34-873c9e34a021@gmail.com> <20190224170455.GH26626@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Autocrypt: addr=f.fainelli@gmail.com; keydata= mQGiBEjPuBIRBACW9MxSJU9fvEOCTnRNqG/13rAGsj+vJqontvoDSNxRgmafP8d3nesnqPyRxGlk aOSDuu09rxuW+69Y2f1TzjFuGpBk4ysWOR85O2Nx8AJ6fYGCoeTbovrNlGT1M9obSFGQX3IzRnWo qlfudjTO5TKoqkbOgpYqIo5n1QbEjCCwCwCg3DOH/4ug2AUUlcIT9/l3pGvoRJ0EAICDzi3l7pmC 5IWn2n1mvP5247urtHFs/uusE827DDj3K8Upn2vYiOFMBhGsxAk6YKV6IP0dZdWX6fqkJJlu9cSD vWtO1hXeHIfQIE/xcqvlRH783KrihLcsmnBqOiS6rJDO2x1eAgC8meAXSAgsrBhcgGl2Rl5gh/jk eA5ykwbxA/9u1eEuL70Qzt5APJmqVXR+kWvrqdBVPoUNy/tQ8mYcnzJJ63ng3tHhnwHXZOu8hL4n qwlYHRa9eeglXYhBqja4ZvIvCEqSmEukfivk+Dl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kbZ9BPJPNCbqU6dowLOiy8AuTYQ48mvIyQ4Ijnb6GT rtxIUDQeOBNuQC/gyyx3nbL/lVlHbxr4tb6YkhkO6shjXhQh7nQb33FjGO4PWU11Nr9i/qoV8QCo 12MQEo244RRA6VMud06y/E449rWZFSTwGqb0FS0seTcYNvxt8PB2izX+HZA8SL54j479ubxhfuoT u5nXdtFYFj5Lj5x34LKPx7MpgAmj0H7SDhpFWF2FzcC1bjiW9mjWHaKaX23Awt97AqQZXegbfkJw X2Y53ufq8Np3e1542lh3/mpiGSilCsaTahEGrHK+lIusl6mzJoil+u3k01ofvJMK0ZdzGUZ/aPMZ 16LofjFA+MNxWrZFrkYmiGdv+LG45zSlZyIvzSiG2lKykuVag+IijCIom78P9jRtB1q1Q5lwZp2T LAJlz92DmFwBg1hyFzwDADjZ2nrDxKUiybXIgZp9aU2d++ptEGCVJOfEW4qpWCCLPbOT7XBr+g/4 H3qWbs3j/cDDq7LuVYIe+wchy/iXEJaQVeTCy5arMQorqTFWlEOgRA8OP47L9knl9i4xuR0euV6D ChDrguup2aJVU4hPBBgRAgAPAhsMBQJUX9LxBQkeXB3fAAoJEGFXmRW1Y3YOj4UAn3nrFLPZekMe qX5aD/aq/dsbXSfyAKC45Go0YyxVHGuUuzv+GKZ6nsysJw== Subject: Re: No traffic with Marvell switch and latest linux-next To: Andrew Lunn CC: Russell King - ARM Linux admin , Heiner Kallweit , "netdev@vger.kernel.org" From: Florian Fainelli Message-ID: <2B512084-E971-482D-81FC-B3CEEC1C26C5@gmail.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On February 24, 2019 9:04:55 AM PST, Andrew Lunn wrote: >> The added difficulty here and the reason why Andrew went with the >> approach that is used by the code currently is because neither do the >> CPU or DSA ports are backed by a net_device=2E It is somewhere on my >TODO >> to permit the use of PHYLINK without the need of a net_device to >cover >> those specific DSA cases unless we just brute force the whole thing >and >> allocate a net_device structure but not register that net_device? Yes >in >> fact, why don't we do that? > >Hi Florian > >At the moment, we are using a phydev which is not connected to a >MAC=2E That is rather odd, but the phylib maintainers mostly know about >this, and keep an eye out for changes which might break any >assumptions=2E And the phylib API is quite small=2E I would argue that this very thread is a proof against your argument since= we all failed to predict that Heiner's changes would change those assumpti= ons=2E Having a certain of assumptions is fine but given all the recent PHY= LIB helpers that have been added I am not sure how well that will scale=2E > >How many assumptions are going to break with a netdev which is not >registered? The API is much bigger, more people hack on it, and it is >going to be much harder to review changes to make sure assumptions are >not changed=2E A non registered net_device appears easier to manage and debug since there= is state tracking all over the network stack for those cases=2E > >If we are going to do something odd, we should keep the scope as small >as possible=2E Hence my suggestion to allocate a dummy net_device object just so calls to= netif_carrier_{on,off} (and possibly more in the future) do nothing=2E I d= on't think that teaching either PHYLIB or PHYLINK about a NULL net_device i= s going to scale really well over time nor make it easier for respective m= aintainers=2E If we make the net_device optional, it will be harder to revi= ew changes as well as make sure that we do not create locking/object intera= ctions issues=2E Another approach could be to define a minimal network port object (struct = devlink, maybe?) which could be used independently from a net_device, or a = lightweight net_device with no visibility into existing namespaces=2E None = of these ideas are new though and would probably require several cycles to = get done right=2E Heiner, Russell, which approach would you take? --=20 Florian