diff options
| author | Michael Brown | 2006-06-01 16:33:52 +0200 |
|---|---|---|
| committer | Michael Brown | 2006-06-01 16:33:52 +0200 |
| commit | 48fb6c6dc2f75e57b79eaeb2e63790e315529f7f (patch) | |
| tree | af45c48f86e57ba05fba9f9b6ba964f0557d461e /src/include | |
| parent | Make DBG_DISCARD correct (diff) | |
| download | ipxe-48fb6c6dc2f75e57b79eaeb2e63790e315529f7f.tar.gz ipxe-48fb6c6dc2f75e57b79eaeb2e63790e315529f7f.tar.xz ipxe-48fb6c6dc2f75e57b79eaeb2e63790e315529f7f.zip | |
Updated retry timer mechanism to incorporate smoothed RTT estimation.
AoE now uses the retry timer mechanism.
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/retry.h | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/include/gpxe/retry.h b/src/include/gpxe/retry.h index 8a9e2cf6f..8f197bc36 100644 --- a/src/include/gpxe/retry.h +++ b/src/include/gpxe/retry.h @@ -9,28 +9,27 @@ #include <gpxe/list.h> -/** Effective maximum retry count for exponential backoff calculation */ -#define BACKOFF_LIMIT 5 - /** A retry timer */ struct retry_timer { /** List of active timers */ struct list_head list; - /** Base timeout (in ticks) */ - unsigned int base; - /** Retry count */ - unsigned int retries; - /** Expiry time (in ticks) */ - unsigned long expiry; + /** Timeout value (in ticks) */ + unsigned long timeout; + /** Start time (in ticks) */ + unsigned long start; /** Timer expired callback * * @v timer Retry timer + * @v fail Failure indicator + * + * The timer will already be stopped when this method is + * called. The failure indicator will be True if the retry + * timeout has already exceeded @c MAX_TIMEOUT. */ - void ( * expired ) ( struct retry_timer *timer ); + void ( * expired ) ( struct retry_timer *timer, int over ); }; extern void start_timer ( struct retry_timer *timer ); -extern void reset_timer ( struct retry_timer *timer ); extern void stop_timer ( struct retry_timer *timer ); #endif /* _GPXE_RETRY_H */ |
