On Sun, Nov 01, 2020 at 02:06:44PM +0200, Vladimir Oltean wrote:
> On Sun, Nov 01, 2020 at 01:27:31PM +0200, Ido Schimmel wrote:
> > IIRC, getting PTP to work on bridged interfaces is tricky and this is
> > something that is not currently supported by mlxsw or Cumulus:
> > https://github.com/Mellanox/mlxsw/wiki/Precision-Time-Protocol#configuring-ptp
> > https://docs.cumulusnetworks.com/cumulus-linux-42/System-Configuration/Setting-Date-and-Time/#configure-the-ptp-boundary-clock
> > 
> > If the purpose of this discussion is to get PTP working in this
> > scenario, then lets have a separate discussion about that. This is
> > something we looked at in the past, but didn't make any progress (mainly
> > because we only got requirements for PTP over routed ports).
> > 
> > Anyway, opening packet sockets on interfaces (bridged or not) that pass
> > offloaded traffic will not get you this traffic to the packet sockets.
> 
> I don't think it's a different discussion, I think my issues with what
> you're proposing are coming exactly from there. I think that user space
> today is expecting that when it uses the *_ADD_MEMBERSHIP API, it is
> sufficient in order to see that traffic over a socket. Switchdev and DSA
> are kernel-only concepts, they have no user-facing API. I am not sure
> that it is desirable to change that. I hope you aren't telling me that
> we should add a --please argument to the PACKET_ADD_MEMBERSHIP /
> IP_ADD_MEMBERSHIP UAPI just in case the network interface is a switchdev
> port...

If the goal of this thread is to get packet sockets to work with
offloaded traffic, then I think you need to teach these sockets to
instruct the bound device to trap / mirror incoming traffic to the CPU.
Maybe via a new ndo.

Reply via email to