All of lore.kernel.org
 help / color / mirror / Atom feed
* net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
@ 2021-07-28 20:44 George McCollister
  2021-07-28 21:04 ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: George McCollister @ 2021-07-28 20:44 UTC (permalink / raw)
  To: netdev; +Cc: Richard Cochran, Andrew Lunn

If I do the following on one of my mv88e6390 switch ports I stop
receiving multicast frames.
hwstamp_ctl -i lan0 -t 1 -r 12

Has anyone seen anything like this or have any ideas what might be
going on? Does anyone have PTP working on the mv88e6390?

I tried this but it doesn't help:
ip maddr add 01:xx:xx:xx:xx:xx dev lan0

I've tried sending 01:1B:19:00:00:00, 01:80:C2:00:00:0E as well as
other random ll multicast addresses. Nothing gets through once
hardware timestamping is switched on. The switch counters indicate
they're making it into the outward facing switch port but are not
being sent out the CPU facing switch port. I ran into this while
trying to get ptp4l to work.

I've tried kernels from 5.4 to net-next HEAD and I get the same results.

CONFIG_NET_DSA_MV88E6XXX_PTP is set to y in the kernel config.

Regards,
George McCollister

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
  2021-07-28 20:44 net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping George McCollister
@ 2021-07-28 21:04 ` Andrew Lunn
  2021-07-28 22:24   ` Richard Cochran
  2021-07-29 13:09   ` George McCollister
  0 siblings, 2 replies; 7+ messages in thread
From: Andrew Lunn @ 2021-07-28 21:04 UTC (permalink / raw)
  To: George McCollister; +Cc: netdev, Richard Cochran

On Wed, Jul 28, 2021 at 03:44:24PM -0500, George McCollister wrote:
> If I do the following on one of my mv88e6390 switch ports I stop
> receiving multicast frames.
> hwstamp_ctl -i lan0 -t 1 -r 12
> 
> Has anyone seen anything like this or have any ideas what might be
> going on? Does anyone have PTP working on the mv88e6390?
> 
> I tried this but it doesn't help:
> ip maddr add 01:xx:xx:xx:xx:xx dev lan0
> 
> I've tried sending 01:1B:19:00:00:00, 01:80:C2:00:00:0E as well as
> other random ll multicast addresses. Nothing gets through once
> hardware timestamping is switched on. The switch counters indicate
> they're making it into the outward facing switch port but are not
> being sent out the CPU facing switch port. I ran into this while
> trying to get ptp4l to work.

Hi George

All my testing was i think on 6352.

I assume you get multicast before using hwstamp_ctl?

Maybe use:

https://github.com/lunn/mv88e6xxx_dump

and dump the ATU before and afterwards.

The 6390 family introduced a new way to configured which reserved
management addresses get forwarded to the CPU. Maybe take a look at
mv88e6390_g1_mgmt_rsvd2cpu() and see if you can spot anything odd
going on.

You might also want to check if mv88e6352_port_set_mcast_flood() is
being called.

      Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
  2021-07-28 21:04 ` Andrew Lunn
@ 2021-07-28 22:24   ` Richard Cochran
  2021-07-29 13:22     ` George McCollister
  2021-07-29 13:09   ` George McCollister
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Cochran @ 2021-07-28 22:24 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: George McCollister, netdev

On Wed, Jul 28, 2021 at 11:04:59PM +0200, Andrew Lunn wrote:
> On Wed, Jul 28, 2021 at 03:44:24PM -0500, George McCollister wrote:
> > If I do the following on one of my mv88e6390 switch ports I stop
> > receiving multicast frames.
> > hwstamp_ctl -i lan0 -t 1 -r 12
> > 
> > Has anyone seen anything like this or have any ideas what might be
> > going on? Does anyone have PTP working on the mv88e6390?
> > 
> > I tried this but it doesn't help:
> > ip maddr add 01:xx:xx:xx:xx:xx dev lan0
> > 
> > I've tried sending 01:1B:19:00:00:00, 01:80:C2:00:00:0E as well as
> > other random ll multicast addresses. Nothing gets through once
> > hardware timestamping is switched on. The switch counters indicate
> > they're making it into the outward facing switch port but are not
> > being sent out the CPU facing switch port. I ran into this while
> > trying to get ptp4l to work.
> 
> Hi George
> 
> All my testing was i think on 6352.

Mine, too.  IIRC, the PTP stuff for most (all?) of the other parts was
added "blindly" into the driver, based on similarity in the data
sheets.

So maybe 6390 has never been tried?

Thanks,
Richard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
  2021-07-28 21:04 ` Andrew Lunn
  2021-07-28 22:24   ` Richard Cochran
@ 2021-07-29 13:09   ` George McCollister
  1 sibling, 0 replies; 7+ messages in thread
From: George McCollister @ 2021-07-29 13:09 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: netdev, Richard Cochran

Ugh, I replied to this last night from gmail on my phone and it seems
to have sent it in HTML as well as plain text. Let's try this again...

On Wed, Jul 28, 2021 at 4:05 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Wed, Jul 28, 2021 at 03:44:24PM -0500, George McCollister wrote:
> > If I do the following on one of my mv88e6390 switch ports I stop
> > receiving multicast frames.
> > hwstamp_ctl -i lan0 -t 1 -r 12
> >
> > Has anyone seen anything like this or have any ideas what might be
> > going on? Does anyone have PTP working on the mv88e6390?
> >
> > I tried this but it doesn't help:
> > ip maddr add 01:xx:xx:xx:xx:xx dev lan0
> >
> > I've tried sending 01:1B:19:00:00:00, 01:80:C2:00:00:0E as well as
> > other random ll multicast addresses. Nothing gets through once
> > hardware timestamping is switched on. The switch counters indicate
> > they're making it into the outward facing switch port but are not
> > being sent out the CPU facing switch port. I ran into this while
> > trying to get ptp4l to work.
>
> Hi George
>
> All my testing was i think on 6352.
>
> I assume you get multicast before using hwstamp_ctl?

Yup.

>
> Maybe use:
>
> https://github.com/lunn/mv88e6xxx_dump
>
> and dump the ATU before and afterwards.

Ooh. Thanks, this will probably help!

>
> The 6390 family introduced a new way to configured which reserved
> management addresses get forwarded to the CPU. Maybe take a look at
> mv88e6390_g1_mgmt_rsvd2cpu() and see if you can spot anything odd
> going on.

Yes I looked at this and spent a lot of time reading the datasheet but
maybe I've still missed something.

>
> You might also want to check if mv88e6352_port_set_mcast_flood() is
> being called.

I'm pretty sure I did at one point but I'll double check, thanks.

>
>       Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
  2021-07-28 22:24   ` Richard Cochran
@ 2021-07-29 13:22     ` George McCollister
  2021-07-29 13:42       ` Andrew Lunn
  0 siblings, 1 reply; 7+ messages in thread
From: George McCollister @ 2021-07-29 13:22 UTC (permalink / raw)
  To: Richard Cochran; +Cc: Andrew Lunn, netdev

On Wed, Jul 28, 2021 at 5:25 PM Richard Cochran
<richardcochran@gmail.com> wrote:
>
> On Wed, Jul 28, 2021 at 11:04:59PM +0200, Andrew Lunn wrote:
> > On Wed, Jul 28, 2021 at 03:44:24PM -0500, George McCollister wrote:
> > > If I do the following on one of my mv88e6390 switch ports I stop
> > > receiving multicast frames.
> > > hwstamp_ctl -i lan0 -t 1 -r 12
> > >
> > > Has anyone seen anything like this or have any ideas what might be
> > > going on? Does anyone have PTP working on the mv88e6390?
> > >
> > > I tried this but it doesn't help:
> > > ip maddr add 01:xx:xx:xx:xx:xx dev lan0
> > >
> > > I've tried sending 01:1B:19:00:00:00, 01:80:C2:00:00:0E as well as
> > > other random ll multicast addresses. Nothing gets through once
> > > hardware timestamping is switched on. The switch counters indicate
> > > they're making it into the outward facing switch port but are not
> > > being sent out the CPU facing switch port. I ran into this while
> > > trying to get ptp4l to work.
> >
> > Hi George
> >
> > All my testing was i think on 6352.
>
> Mine, too.  IIRC, the PTP stuff for most (all?) of the other parts was
> added "blindly" into the driver, based on similarity in the data
> sheets.
>
> So maybe 6390 has never been tried?

Thanks for the feedback. The datasheet covers the 88E6390X, 88E6390,
88E6290, 88E6190X, 88E6190 so I expect those work similarly but if
only the 6352 has been tested that could explain it. It certainly
helps to know that I'm working with something that may have never
worked rather than I'm just doing something dumb.

>
> Thanks,
> Richard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
  2021-07-29 13:22     ` George McCollister
@ 2021-07-29 13:42       ` Andrew Lunn
  2021-08-11 15:49         ` George McCollister
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Lunn @ 2021-07-29 13:42 UTC (permalink / raw)
  To: George McCollister; +Cc: Richard Cochran, netdev

> Thanks for the feedback. The datasheet covers the 88E6390X, 88E6390,
> 88E6290, 88E6190X, 88E6190 so I expect those work similarly but if
> only the 6352 has been tested that could explain it. It certainly
> helps to know that I'm working with something that may have never
> worked rather than I'm just doing something dumb.

I don't think you are doing something dumb.

What i find interesting is that multicast works, until it does not
work. I would try to find out what call into the driver causes that
change.

Also, general multicast traffic should not really be involved
here. The switch should be identifying PTP packets as management, and
sending them to the CPU port, independent of whatever multicast rules
are set, flooding of unknown multicast etc. This is needed so that PTP
frames get through a bridge which is in STP blocking mode. Do you see
any other problems with management traffic? Do bridge PDUs also not
work?

	Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping
  2021-07-29 13:42       ` Andrew Lunn
@ 2021-08-11 15:49         ` George McCollister
  0 siblings, 0 replies; 7+ messages in thread
From: George McCollister @ 2021-08-11 15:49 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: Richard Cochran, netdev

On Thu, Jul 29, 2021 at 8:42 AM Andrew Lunn <andrew@lunn.ch> wrote:
>
> > Thanks for the feedback. The datasheet covers the 88E6390X, 88E6390,
> > 88E6290, 88E6190X, 88E6190 so I expect those work similarly but if
> > only the 6352 has been tested that could explain it. It certainly
> > helps to know that I'm working with something that may have never
> > worked rather than I'm just doing something dumb.
>
> I don't think you are doing something dumb.
>
> What i find interesting is that multicast works, until it does not
> work. I would try to find out what call into the driver causes that
> change.
>
> Also, general multicast traffic should not really be involved
> here. The switch should be identifying PTP packets as management, and
> sending them to the CPU port, independent of whatever multicast rules
> are set, flooding of unknown multicast etc. This is needed so that PTP
> frames get through a bridge which is in STP blocking mode. Do you see
> any other problems with management traffic? Do bridge PDUs also not
> work?

Sorry for the huge delay, I had to deal with some other things before
I could get back to this.
When the hardware timestamping is on I don't see packets of type
0x88f7 regardless of multicast destination address. If I change the
packet to 0x88f8 I see it. So, it looks like you are right. Before I
had just tried changing the multicast destination address. I'm still
following up on the other suggestions you've made and hopefully that
will lead to something.

Thanks,
George

>
>         Andrew

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-08-11 15:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-28 20:44 net: dsa: mv88e6xxx: no multicasts rx'd after enabling hw time stamping George McCollister
2021-07-28 21:04 ` Andrew Lunn
2021-07-28 22:24   ` Richard Cochran
2021-07-29 13:22     ` George McCollister
2021-07-29 13:42       ` Andrew Lunn
2021-08-11 15:49         ` George McCollister
2021-07-29 13:09   ` George McCollister

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.