• Arthur Kiyanovski's avatar
    net: ena: Add capabilities field with support for ENI stats capability · a2d5d6a7
    Arthur Kiyanovski authored
    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>
    a2d5d6a7
ena_com.h 30.8 KB