[PATCH v6 1/2] ethdev: Add link_speed lanes support
Ferruh Yigit
ferruh.yigit at amd.com
Fri Sep 27 02:39:41 CEST 2024
On 9/26/2024 10:43 PM, Damodharam Ammepalli wrote:
> Update the eth_dev_ops structure with new function vectors
> to get, get capabilities and set ethernet link speed lanes.
> Update the testpmd to provide required config and information
> display infrastructure.
>
> The supporting ethernet controller driver will register callbacks
> to avail link speed lanes config and get services. This lanes
> configuration is applicable only when the nic is forced to fixed
> speeds. In Autonegiation mode, the hardware automatically
> negotiates the number of lanes.
>
> These are the new commands.
>
> testpmd> show port 0 speed_lanes capabilities
>
> Supported speeds Valid lanes
> -----------------------------------
> 10 Gbps 1
> 25 Gbps 1
> 40 Gbps 4
> 50 Gbps 1 2
> 100 Gbps 1 2 4
> 200 Gbps 2 4
> 400 Gbps 4 8
> testpmd>
>
> testpmd>
> testpmd> port stop 0
> testpmd> port config 0 speed_lanes 4
> testpmd> port config 0 speed 200000 duplex full
> testpmd> port start 0
> testpmd>
> testpmd> show port info 0
>
> ********************* Infos for port 0 *********************
> MAC address: 14:23:F2:C3:BA:D2
> Device name: 0000:b1:00.0
> Driver name: net_bnxt
> Firmware-version: 228.9.115.0
> Connect to socket: 2
> memory allocation on the socket: 2
> Link status: up
> Link speed: 200 Gbps
> Active Lanes: 4
> Link duplex: full-duplex
> Autoneg status: Off
>
> Signed-off-by: Damodharam Ammepalli <damodharam.ammepalli at broadcom.com>
>
Reviewed-by: Ferruh Yigit <ferruh.yigit at amd.com>
Suggested patch title:
ethdev: support link speed lanes
<...>
> +/**
> + * @warning
> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice
> + *
> + * Get Active lanes.
> + *
> + * @param port_id
> + * The port identifier of the Ethernet device.
> + * @param lanes
> + * Driver updates lanes with the number of active lanes.
> + * On a supported NIC on link up, lanes will be a non-zero value irrespective whether the
> + * link is Autonegotiated or Fixed speed. No information is dispalyed for error.
>
s/dispalyed/displayed/
I can fix while merging
More information about the dev
mailing list