net/hns3: obtain supported speed for fiber port
authorHuisong Li <lihuisong@huawei.com>
Tue, 13 Apr 2021 13:47:15 +0000 (21:47 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 15 Apr 2021 00:55:04 +0000 (02:55 +0200)
commitca0388782ca234db5658eba7d4ae2d2291aaade2
tree6e5f8e5513c4e1d6756403a6c3de74d35ebf431c
parent2192c428f9a6a92a8d8913fd9cf727ffa5810245
net/hns3: obtain supported speed for fiber port

Currently, the speed of fiber port is obtained by using the default
query type of HNS3_OPC_GET_SFP_INFO opcode. In this way, only
the speed of the optical module can be obtained. In fact, the opcode
also supports an active query type, which is a channel for obtaining
information such as the speed, the supported speed, auto-negotiation
capability, and FEC mode. This patch changes the query type of the
opcode from the default query type to the active query type to obtain
the supported speed of fiber port.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
drivers/net/hns3/hns3_cmd.h
drivers/net/hns3/hns3_ethdev.c
drivers/net/hns3/hns3_ethdev.h