]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: ena: Add capabilities field with support for ENI stats capability
authorArthur Kiyanovski <akiyano@amazon.com>
Fri, 7 Jan 2022 20:23:38 +0000 (20:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Jun 2024 11:39:51 +0000 (13:39 +0200)
commit4ad48d7f26bb1a68e65941646a71441d12d15ee3
tree80f789097bcd01ee40a772400a194f8f1a53f523
parente5ed2cd0550f8395d027d24d2b796f8a4e5d3a51
net: ena: Add capabilities field with support for ENI stats capability

[ Upstream commit a2d5d6a70fa5211e071747876fa6a7621c7257fd ]

This bitmask field indicates what capabilities are supported by the
device.

The capabilities field differs from the 'supported_features' field which
indicates what sub-commands for the set/get feature commands are
supported. The sub-commands are specified in the 'feature_id' field of
the 'ena_admin_set_feat_cmd' struct in the following way:

        struct ena_admin_set_feat_cmd cmd;

        cmd.aq_common_descriptor.opcode = ENA_ADMIN_SET_FEATURE;
        cmd.feat_common.feature_

The 'capabilities' field, on the other hand, specifies different
capabilities of the device. For example, whether the device supports
querying of ENI stats.

Also add an enumerator which contains all the capabilities. The
first added capability macro is for ENI stats feature.

Capabilities are queried along with the other device attributes (in
ena_com_get_dev_attr_feat()) during device initialization and are stored
in the ena_com_dev struct. They can be later queried using the
ena_com_get_cap() helper function.

Signed-off-by: Shay Agroskin <shayagr@amazon.com>
Signed-off-by: Arthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: 2dc8b1e7177d ("net: ena: Fix redundant device NUMA node override")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/amazon/ena/ena_admin_defs.h
drivers/net/ethernet/amazon/ena/ena_com.c
drivers/net/ethernet/amazon/ena/ena_com.h