All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "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+dt@kernel.org" <robh+dt@kernel.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH v3 2/3] net: ethernet: renesas: Add Ethernet Switch driver
Date: Fri, 30 Sep 2022 13:45:52 +0000	[thread overview]
Message-ID: <TYBPR01MB5341F83687A3D3C9E0DA5437D8569@TYBPR01MB5341.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <YzWzDEqCFYqqJcr0@lunn.ch>

Hi Andrew,

> From: Andrew Lunn, Sent: Friday, September 30, 2022 12:00 AM
> 
> On Thu, Sep 29, 2022 at 12:22:15PM +0000, Yoshihiro Shimoda wrote:
> > Hi Andrew,
> >
> > > From: Andrew Lunn, Sent: Wednesday, September 28, 2022 9:01 PM
> > >
> > > > > How do you direct a frame from the
> > > > > CPU out a specific user port? Via the DMA ring you place it into, or
> > > > > do you need a tag on the frame to indicate its egress port?
> > > >
> > > > Via the DMA ring.
> > >
> > > Are there bits in the ring descriptor which indicate the user port?
> > > Can you set these bits to some other value which causes the switch to
> > > use its MAC table to determine the egress interface?
> >
> > I'm sorry, I misunderstood the hardware behaviors.
> >
> > 1) From CPU to user port: CPU sends a frame to all user ports.
> > 2) From user port to CPU: each user port sends a frame to each DMA ring.
> >
> > About the 1) above, the switch can have MAC tables and sends a frame to
> > a specific user port. However, the driver doesn't support it.
> 
> In order to make STP and PTP work, you need to be able to send a frame
> out a specific port. With STP, that port can also be blocked,
> i.e. normal frames are not allowed to be transmitted/received, but
> these STP frames are allowed. You also need to know what port an STP
> frame was received on.

I understood it.

> So the switch probably has a mechanism to send a frame from the CPU
> out one specific port. And frames received from a user port and passed
> to the CPU should also be identifiable. There are different ways of
> doing this. DSA typically has an extra header on the frame, indicating
> where it is from/to. Some switches have extra bits in the DMA buffer
> descriptor indicating the port.

I'll looking for such a feature in the switch.

> > However, if I dropped specific registers setting, it doesn't work correctly.
> > I'll investigate why removing speeds of PHY didn't work.
> 
> It could be the PHY is using SGMII, but your MAC needs 1000BaseX?

Both the PHY and MAC is using SGMII. For now, I didn't find why.
So, I'll continue to investigate this issue too.

Best regards,
Yoshihiro Shimoda

>    Andrew

  reply	other threads:[~2022-09-30 13:45 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  5:28 [PATCH v3 0/3] net: ethernet: renesas: Add Ethernet Switch driver Yoshihiro Shimoda
2022-09-22  5:28 ` [PATCH v3 1/3] dt-bindings: net: renesas: Document Renesas Ethernet Switch Yoshihiro Shimoda
2022-09-22  7:39   ` Krzysztof Kozlowski
2022-09-22  5:28 ` [PATCH v3 2/3] net: ethernet: renesas: Add Ethernet Switch driver Yoshihiro Shimoda
2022-09-23  2:43   ` Jakub Kicinski
2022-09-26  6:30     ` Yoshihiro Shimoda
2022-09-23 13:11   ` Andrew Lunn
2022-09-26  8:12     ` Yoshihiro Shimoda
2022-09-26 19:17       ` Andrew Lunn
2022-09-27  5:59         ` Yoshihiro Shimoda
2022-09-27 12:54           ` Andrew Lunn
2022-09-28  5:53             ` Yoshihiro Shimoda
2022-09-28 12:01               ` Andrew Lunn
2022-09-29 12:22                 ` Yoshihiro Shimoda
2022-09-29 15:00                   ` Andrew Lunn
2022-09-30 13:45                     ` Yoshihiro Shimoda [this message]
2022-09-22  5:28 ` [PATCH v3 3/3] net: ethernet: renesas: rswitch: Add R-Car Gen4 gPTP support Yoshihiro Shimoda

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=TYBPR01MB5341F83687A3D3C9E0DA5437D8569@TYBPR01MB5341.jpnprd01.prod.outlook.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.