On 5/16/2024 1:48 PM, huangdengdui wrote: > Hi, Ferruh > Sorry for replying your email very late. > The answers to your questions are as follows. Please correct me if I am wrong. > > On 2024/4/4 21:58, Ferruh Yigit wrote: >> >> Hi Dengdui, Damodharam, >> >> As details of the implementation under discussion, I have a high level >> question. >> >> Why/when an application need to configure the lanes explicitly? >> >> In above description, it mentions if one port is configured as 4x25G and >> other 2x50G, port can't be up. How do you end up being in this situation? >> > > According to the Ethernet standard document[1], speed and lanes need to be > configured to the PHY together. > Currently, the application just set one speed like 100G to the driver. > And this doesn't matter with lane number. > Currently, the lane number of one NIC for a specified speed depand on their > default behavior. > As a result, this situation will be happened. >
I guess we come to agreement that with three new APIs for lane (get, set, get_capabilities), link speed and lane APIs can be separated, this cause more clear APIs. >> Lets assume first port is configured as 100G, and FW configured it as >> 4x25G, and again user configured second port as 100G, why FW can't >> detect this and configure ports with correct lane configuration? > > When the auto-negotiation is disabled, FW of the local port never know the > configuration of > the peer port. > > After all, not all NICs support auto-negotiation feature. > Ack >> >> In this case, if we push the responsibility to the user, when user is >> configuring the second port how she will know what is the lane >> configuration for first port, and what is the proper lane configuration >> for the second port? > > So we need to support the lane query function for above reason. > Ack >> >> Instead of pushing this configuration to user, why it can't be handled >> internally? >> >> As long as user requested speed configured by device, the lane >> configuration has no impact to the user, right?> Is there a case/reason user >> need to explicitly set, lets say PAM4 >> against NRZ? >> > Sorry, I can not understand what you mean. > Indeed you already answered this one, explicit lane configuration is required two align configuration of both peers when auto-negotiation is off. > [1] > https://lore.kernel.org/netdev/20201010154119.3537085-1-ido...@idosch.org/T/