On Mon, Feb 1, 2021 at 1:41 PM Jakub Kicinski <k...@kernel.org> wrote:
> > > The media part is beginning to sound concerning. Every time we > > > under-specify an interface we end up with #vendors different > > > interpretations. And since HW is programmed by FW in most high > > > speed devices we can't even review the right thing is done. > > > > Each link mode implies a very specific media type, the kernel can > > reject illegal combinations based on the supported bitmask before > > calling upon the driver to select it. > > Are you talking about validation against a driver-supplied list of > HW-supported modes, or SFP-supported modes for a currently plugged > in module? Should they not be the same thing? > The concern is around "what happens if user selected nnG-SR4 but user > plugged in nnG-CR4". The MAC/PHY/serdes settings will be identical. Yes, there would be multiple link modes that map to the same speed and lane combination, but that doesn't mean you need to accept them if the media doesn't match what's plugged in also. In the above scenario, the supported mask should not list SR because CR is physically plugged in. That way, the user knows what options are legal and the kernel knows what it can reject. Regards, Edwin Peer
smime.p7s
Description: S/MIME Cryptographic Signature