OSDN Git Service

net: ena: Change ENI stats support check to use capabilities field
authorArthur Kiyanovski <akiyano@amazon.com>
Fri, 7 Jan 2022 20:23:39 +0000 (20:23 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 8 Jan 2022 03:25:50 +0000 (19:25 -0800)
commit394c48e08bbcbf4c235cd667adb8a826a49d3fd4
tree6cb0f7723eb486b1b2f33fc78e39c1d0a680bf23
parenta2d5d6a70fa5211e071747876fa6a7621c7257fd
net: ena: Change ENI stats support check to use capabilities field

Use the capabilities field to query the device for ENI stats
support.

This replaces the previous method that tried to get the ENI stats
during ena_probe() and used the success or failure as an indication
for support by the device.

Remove eni_stats_supported field from struct ena_adapter. This field
was used for the previous method of queriying for ENI stats support.

Change the severity level of the print in case of
ena_com_get_eni_stats() failure from info to error.
With the previous method of querying form ENI stats support, failure
to get ENI stats was normal for devices that don't support it.
With the use of the capabilities field such a failure is unexpected,
as it is called only if the device reported that it supports ENI
stats.

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/amazon/ena/ena_ethtool.c
drivers/net/ethernet/amazon/ena/ena_netdev.c
drivers/net/ethernet/amazon/ena/ena_netdev.h