Extend the ENA admin interface to support error bound. Add error_bound to the PHC response structure. Introduce a feature version mechanism to indicate device supports error_bound, and add an error flag for error_bound retrieval failures. This enables the driver to retrieve error_bound information from the device alongside timestamps. Signed-off-by: Amit Bernstein Signed-off-by: Arthur Kiyanovski --- .../net/ethernet/amazon/ena/ena_admin_defs.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h b/drivers/net/ethernet/amazon/ena/ena_admin_defs.h index 898ecd9..2d132c4 100644 --- a/drivers/net/ethernet/amazon/ena/ena_admin_defs.h +++ b/drivers/net/ethernet/amazon/ena/ena_admin_defs.h @@ -128,12 +128,14 @@ enum ena_admin_get_stats_scope { ENA_ADMIN_ETH_TRAFFIC = 1, }; -enum ena_admin_phc_type { - ENA_ADMIN_PHC_TYPE_READLESS = 0, +enum ena_admin_phc_feature_version { + /* Readless with error_bound */ + ENA_ADMIN_PHC_FEATURE_VERSION_0 = 0, }; enum ena_admin_phc_error_flags { ENA_ADMIN_PHC_ERROR_FLAG_TIMESTAMP = BIT(0), + ENA_ADMIN_PHC_ERROR_FLAG_ERROR_BOUND = BIT(1), }; /* ENA SRD configuration for ENI */ @@ -1035,10 +1037,10 @@ struct ena_admin_queue_ext_feature_desc { }; struct ena_admin_feature_phc_desc { - /* PHC type as defined in enum ena_admin_get_phc_type, - * used only for GET command. + /* PHC version as defined in enum ena_admin_phc_feature_version, + * used only for GET command as max supported PHC version by the device. */ - u8 type; + u8 version; /* Reserved - MBZ */ u8 reserved1[3]; @@ -1224,7 +1226,10 @@ struct ena_admin_phc_resp { /* PHC timestamp (nsec) */ u64 timestamp; - u8 reserved2[12]; + u8 reserved2[8]; + + /* Timestamp error limit (nsec) */ + u32 error_bound; /* Bit field of enum ena_admin_phc_error_flags */ u32 error_flags; -- 2.47.3