Commit 4ad48d7f authored by Arthur Kiyanovski's avatar Arthur Kiyanovski Committed by Greg Kroah-Hartman
Browse files

net: ena: Add capabilities field with support for ENI stats capability



[ Upstream commit a2d5d6a7 ]

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: default avatarShay Agroskin <shayagr@amazon.com>
Signed-off-by: default avatarArthur Kiyanovski <akiyano@amazon.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Stable-dep-of: 2dc8b1e7 ("net: ena: Fix redundant device NUMA node override")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent e5ed2cd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment