From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Wei Fang <wei.fang@nxp.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"robh@kernel.org" <robh@kernel.org>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Clark Wang <xiaoning.wang@nxp.com>, Frank Li <frank.li@nxp.com>,
"christophe.leroy@csgroup.eu" <christophe.leroy@csgroup.eu>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"bhelgaas@google.com" <bhelgaas@google.com>,
"horms@kernel.org" <horms@kernel.org>,
"imx@lists.linux.dev" <imx@lists.linux.dev>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"alexander.stein@ew.tq-group.com"
<alexander.stein@ew.tq-group.com>
Subject: Re: [PATCH v4 net-next 03/13] dt-bindings: net: add bindings for NETC blocks control
Date: Fri, 1 Nov 2024 12:34:27 +0200 [thread overview]
Message-ID: <20241101103427.b2a7ir57tigwghcu@skbuf> (raw)
In-Reply-To: <PAXPR04MB851041AFADEE8FC8790E90FF88562@PAXPR04MB8510.eurprd04.prod.outlook.com> <PAXPR04MB851041AFADEE8FC8790E90FF88562@PAXPR04MB8510.eurprd04.prod.outlook.com>
On Fri, Nov 01, 2024 at 04:18:55AM +0200, Wei Fang wrote:
> > On Sat, Oct 26, 2024 at 06:01:37AM +0300, Wei Fang wrote:
> > > system-controller not only configure the endpoints of the NETC, but also
> > > can configure the ECAM space, such as the vendor ID, device ID, the RID
> > > of endpoint, VF stride and so on. For this perspective, I don't think the
> > > ECAM space should placed at the same hierarchical level with system-controller.
> > >
> > > If they are placed at the same level, then before pci_host_common_probe() is
> > > called, we need to ensure that IERB completes probe(), which means we need
> > > to modify the PCI host common driver, component API or add a callback function
> > > or something else, which I don't think is a good idea.
> >
> > Ok, that does sound important. If the NETCMIX block were to actually
> > modify the ECAM space, what would be the primary source of information
> > for how the ECAM device descriptions should look like?
> >
>
> I think the related info should be provided by DTS, but currently, we do not
> have such requirement that needs Linux to change the ECAM space, this may
> be supported in the future if we have the requirement.
>
> > I remember a use case being discussed internally a while ago was that
> > where the Cortex-A cores are only guests which only have ownership of
> > some Ethernet ports discovered through the ECAM, but not of the entire
> > NETCMIX block and not of physical Ethernet ports. How would that be
> > described in the device tree? The ECAM node would no longer be placed
> > under system-controller?
>
> Yes, we indeed have this use case on i.MX95, only the VFs of 10G ENETC
> are owned by Cortex-A, the entire ECAM space and other NETC devices
> are all owned by Cortex-M. In this case, the system-controller is no needed
> in DTS, because Linux have no permission to access these resources.
>
> >
> > At what point does it simply just make more sense to have a different
> > PCIe ECAM driver than pcie-host-ecam-generic, which just handles
> > internally the entire NETCMIX?
>
> Currently, I have not idea in what use case we need a different ECAM driver
> to handle internally the entire system-controller.
>
> For the use case I mentioned above, we use a different ECAM driver, which
> is implemented by RPMSG, because the entire ECAM space is owned by
> Cortex-M. So we use the ECAM driver to notify the Cortex-M to enable/disable
> VFs or do FLR for VFs and so on. But this ECAM driver does not need to
> configure the system-controller.
Ok, I was actually wondering if it makes sense for the the parent bus of
the NETC PCIe functions to be described through a unified binding that
covers all of the above use cases, so that major device tree modifications
aren't necessary to adapt between the 'Linux as host' and 'Linux as guest'
use cases. But you're saying it doesn't make much sense, because the
device tree in the guest case would contain descriptions of inaccessible
resources (the NETCMIX block). Oh well, this is just another case where
"device tree should describe hardware" actually means "device tree describes
what software wants to know about the hardware".
Anyway, I am now convinced by your design choices at least to the extent
that they appear self-consistent to me (I still don't really have an
independent opinion). If somebody has a different idea on how the PCIe
bus should be described, feel free to chime in.
next prev parent reply other threads:[~2024-11-01 10:34 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-22 5:52 [PATCH v4 net-next 00/13] add basic support for i.MX95 NETC Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 01/13] dt-bindings: net: add compatible string for i.MX95 EMDIO Wei Fang
2024-10-24 14:06 ` Vladimir Oltean
2024-10-24 14:16 ` Vladimir Oltean
2024-10-22 5:52 ` [PATCH v4 net-next 02/13] dt-bindings: net: add i.MX95 ENETC support Wei Fang
2024-10-22 16:13 ` Frank Li
2024-10-23 1:40 ` Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 03/13] dt-bindings: net: add bindings for NETC blocks control Wei Fang
2024-10-22 16:17 ` Frank Li
2024-10-23 1:46 ` Wei Fang
2024-10-23 6:56 ` Krzysztof Kozlowski
2024-10-23 8:18 ` Wei Fang
2024-10-23 8:55 ` Krzysztof Kozlowski
2024-10-23 10:03 ` Wei Fang
2024-10-24 13:27 ` Krzysztof Kozlowski
2024-10-25 7:15 ` Wei Fang
2024-10-24 14:32 ` Vladimir Oltean
2024-10-25 8:22 ` Wei Fang
2024-10-25 8:48 ` Wei Fang
2024-10-25 13:06 ` Vladimir Oltean
2024-10-26 3:01 ` Wei Fang
2024-10-31 12:45 ` Vladimir Oltean
2024-11-01 2:18 ` Wei Fang
2024-11-01 10:34 ` Vladimir Oltean [this message]
2024-10-22 5:52 ` [PATCH v4 net-next 04/13] net: enetc: add initial netc-blk-ctrl driver support Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 05/13] net: enetc: extract common ENETC PF parts for LS1028A and i.MX95 platforms Wei Fang
2024-10-23 6:38 ` Claudiu Manoil
2024-10-22 5:52 ` [PATCH v4 net-next 06/13] net: enetc: build enetc_pf_common.c as a separate module Wei Fang
2024-10-22 16:20 ` Frank Li
2024-10-23 6:38 ` Claudiu Manoil
2024-10-22 5:52 ` [PATCH v4 net-next 07/13] net: enetc: remove ERR050089 workaround for i.MX95 Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 08/13] PCI: Add NXP NETC vendor ID and device IDs Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 09/13] net: enetc: add i.MX95 EMDIO support Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 10/13] net: enetc: extract enetc_int_vector_init/destroy() from enetc_alloc_msix() Wei Fang
2024-10-23 6:37 ` Claudiu Manoil
2024-10-22 5:52 ` [PATCH v4 net-next 11/13] net: enetc: optimize the allocation of tx_bdr Wei Fang
2024-10-22 5:52 ` [PATCH v4 net-next 12/13] net: enetc: add preliminary support for i.MX95 ENETC PF Wei Fang
2024-10-22 19:27 ` Frank Li
2024-10-23 1:57 ` Wei Fang
2024-10-23 2:16 ` Wei Fang
2024-10-23 6:15 ` Claudiu Manoil
2024-10-22 5:52 ` [PATCH v4 net-next 13/13] MAINTAINERS: update ENETC driver files and maintainers Wei Fang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241101103427.b2a7ir57tigwghcu@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=bhelgaas@google.com \
--cc=christophe.leroy@csgroup.eu \
--cc=claudiu.manoil@nxp.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=frank.li@nxp.com \
--cc=horms@kernel.org \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=wei.fang@nxp.com \
--cc=xiaoning.wang@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox