On 3/5/2021 4:17 AM, Ajit Khaparde wrote:
Add support for forced ethernet speed setting.
Currently testpmd tries to configure the Ethernet port in autoneg mode.
It is not possible to set the Ethernet port to a specific speed while
starting testpmd. In some cases capability to configure a forced speed
for the Ethernet port during initialization may be necessary. This patch
tries to add this support.

The patch assumes full duplex setting and does not attempt to change that.
So speeds like 10M, 100M are not configurable using this method.

The command line to configure a forced speed of 10G:
dpdk-testpmd -c 0xff  -- -i  --eth-link-speed  10000

The command line to configure a forced speed of 50G:
dpdk-testpmd -c 0xff  -- -i  --eth-link-speed  50000

Signed-off-by: Ajit Khaparde <ajit.khapa...@broadcom.com>

<...>

@@ -536,3 +536,19 @@ The command line options are:
      bit 1 - two hairpin ports paired
      bit 0 - two hairpin ports loop
      The default value is 0. Hairpin will use single port mode and implicit Tx 
flow mode.
+
+*   ``--eth-link-speed``
+
+    Set a forced link speed to the ethernet port.
+    1000 - 1Gbps
+    10000 - 10Gbps
+    25000 - 25Gbps
+    40000 - 40Gbps
+    50000 - 50Gbps
+    100000 - 100Gbps
+    200000 - 200Gbps
+    ...
+

Line breaks are lost when converted to html, it becomes single line, '::' and indentation is required.

Except from documentation, looks good to me.

Reply via email to