diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fca419d..47a6e4bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [Unreleased] +### Added + +- Add `avoid_efx_ioctl` option to avoid sfc proprietary ioctl(). (SWPTP-1535) + - This prevents setting of the sync flags optionally used by Onload. + ### Fixed - Issue SWPTP-1506 diff --git a/src/sfptpd_clock.c b/src/sfptpd_clock.c index 29f2c450..6fd66723 100644 --- a/src/sfptpd_clock.c +++ b/src/sfptpd_clock.c @@ -801,7 +801,7 @@ static int renew_clock(struct sfptpd_clock *clock) /* Set the primary interface for the clock and get the PHC * supported flag and device index. */ clock->u.nic.primary_if = primary; - clock->u.nic.supports_sync_status_reporting = true; + clock->u.nic.supports_sync_status_reporting = !clock->cfg_avoid_efx; clock->u.nic.device_idx = phc_idx; clock->u.nic.supports_efx = supports_efx; @@ -2219,8 +2219,7 @@ int sfptpd_clock_set_sync_status(struct sfptpd_clock *clock, bool in_sync, goto finish; } - /* Update the sync status via a private IOCTL. - Ignore clock->cfg_avoid_efx because there is no alternative mechanism. */ + /* Update the sync status via a private IOCTL unless inhibited. */ memset(&sfc_req, 0, sizeof(sfc_req)); sfc_req.cmd = EFX_TS_SET_SYNC_STATUS; sfc_req.u.ts_set_sync_status.in_sync = in_sync? 1: 0; diff --git a/src/sfptpd_general_config.c b/src/sfptpd_general_config.c index a1721a3e..af5f7df4 100644 --- a/src/sfptpd_general_config.c +++ b/src/sfptpd_general_config.c @@ -257,12 +257,12 @@ static const sfptpd_config_option_t config_general_options[] = parse_assume_one_phc_per_nic, .dfl = SFPTPD_CONFIG_DFL_BOOL(SFPTPD_DEFAULT_ASSUME_ONE_PHC_PER_NIC)}, {"avoid_efx_ioctl", "", - "Specify whether to avoid private SIOCEFX ioctl for Solarflare " - "adapters where possible", + "Specify whether to avoid private SIOCEFX ioctl for Solarflare adapters. " + "This prevents use of the sync flag via Onload", 1, SFPTPD_CONFIG_SCOPE_GLOBAL, parse_avoid_efx_ioctl, .dfl = SFPTPD_CONFIG_DFL_BOOL(false), - .hidden = true}, + }, {"phc_diff_methods", "*", "Define the list of PHC diff methods used", ~1, SFPTPD_CONFIG_SCOPE_GLOBAL,