|
|
07334b |
From bc252caa54fcfb2e9fd0ddb01ebaa50192e85c38 Mon Sep 17 00:00:00 2001
|
|
|
07334b |
From: Alex Williamson <alex.williamson@redhat.com>
|
|
|
07334b |
Date: Wed, 21 Oct 2015 11:18:40 +0200
|
|
|
07334b |
Subject: Use spec compliant timeouts
|
|
|
07334b |
|
|
|
07334b |
Message-id: <20150428212403.31299.29391.stgit@gimli.home>
|
|
|
07334b |
Patchwork-id: 64951
|
|
|
07334b |
O-Subject: [RHEL7.2 ipxe PATCH 2/2] [dhcp][RHEL-only] Use spec compliant timeouts
|
|
|
07334b |
Bugzilla: 1196352
|
|
|
07334b |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
07334b |
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
07334b |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
07334b |
|
|
|
07334b |
Use local config to override iPXE's abbreviated DHCP timeouts using
|
|
|
07334b |
the recommended values for spec compliance. This matches the state
|
|
|
07334b |
of RHEL6 gPXE DHCP timeouts after bz968474 + bz1206042
|
|
|
07334b |
|
|
|
07334b |
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
07334b |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
07334b |
(cherry picked from commit 7038f41c0131d263de5165b416500009acdbf550)
|
|
|
07334b |
---
|
|
|
07334b |
src/config/local/.gitignore | 1 -
|
|
|
07334b |
src/config/local/dhcp.h | 62 +++++++++++++++++++++++++++++++++++++++++++++
|
|
|
07334b |
2 files changed, 62 insertions(+), 1 deletion(-)
|
|
|
07334b |
delete mode 100644 src/config/local/.gitignore
|
|
|
07334b |
create mode 100644 src/config/local/dhcp.h
|
|
|
07334b |
|
|
|
07334b |
diff --git a/src/config/local/dhcp.h b/src/config/local/dhcp.h
|
|
|
07334b |
new file mode 100644
|
|
|
07334b |
index 0000000..83df5b8
|
|
|
07334b |
--- /dev/null
|
|
|
07334b |
+++ b/src/config/local/dhcp.h
|
|
|
07334b |
@@ -0,0 +1,62 @@
|
|
|
07334b |
+/*
|
|
|
07334b |
+ * Downstream localization
|
|
|
07334b |
+ *
|
|
|
07334b |
+ * For RHEL, use spec compliant DHCP timeouts (bz1196352)
|
|
|
07334b |
+ */
|
|
|
07334b |
+
|
|
|
07334b |
+/*
|
|
|
07334b |
+ * PXE spec defines timeouts of 4, 8, 16, 32 seconds
|
|
|
07334b |
+ */
|
|
|
07334b |
+#undef DHCP_DISC_START_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_DISC_START_TIMEOUT_SEC 4
|
|
|
07334b |
+#undef DHCP_DISC_END_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_DISC_END_TIMEOUT_SEC 32
|
|
|
07334b |
+
|
|
|
07334b |
+/*
|
|
|
07334b |
+ * Elapsed time used for early break waiting for ProxyDHCP, this therefore
|
|
|
07334b |
+ * needs to be less than the cumulative time for the first 2 timeouts.
|
|
|
07334b |
+ */
|
|
|
07334b |
+#undef DHCP_DISC_PROXY_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_DISC_PROXY_TIMEOUT_SEC 11
|
|
|
07334b |
+
|
|
|
07334b |
+/*
|
|
|
07334b |
+ * Approximate PXE spec requirement using minimum timeout (0.25s) for
|
|
|
07334b |
+ * timeouts of 0.25, 0.5, 1, 2, 4
|
|
|
07334b |
+ */
|
|
|
07334b |
+#undef DHCP_REQ_START_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_REQ_START_TIMEOUT_SEC 0
|
|
|
07334b |
+#undef DHCP_REQ_END_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_REQ_END_TIMEOUT_SEC 4
|
|
|
07334b |
+
|
|
|
07334b |
+/*
|
|
|
07334b |
+ * Same as normal request phase, except non-fatal, so we extend the timer
|
|
|
07334b |
+ * to 8 and set the early timeout to an elapsed time value that causes a
|
|
|
07334b |
+ * break after the 4 second timeout. At least that's what we'd like to do,
|
|
|
07334b |
+ * but our timer operates at 18Hz and has a minimum resolution of 7 cycles.
|
|
|
07334b |
+ * Therefore the above quarter-second starting timeout looks more like
|
|
|
07334b |
+ * 0.39s, 0.78s, 1.56s, 3.11s, 6.22s. If we had an ideal timer, we could
|
|
|
07334b |
+ * set the timeout to 7s (0.25 + 0.5 + 1 + 2 + 4 = 7.75s) and exit without
|
|
|
07334b |
+ * failure when the timer rolls over to 8s. With our timer, we get 0.39 +
|
|
|
07334b |
+ * 0.78 + 1.56 + 3.11 = 5.84s. The next timeout would take us to 12.06s
|
|
|
07334b |
+ * (+6.22). That seems like a long time to wait for an optional reply, so
|
|
|
07334b |
+ * we reduce the early timeout to 5s to exit before the timer exceeds the
|
|
|
07334b |
+ * max and causes a failure. This still adds one extra cycle vs the
|
|
|
07334b |
+ * upstream defaults.
|
|
|
07334b |
+ */
|
|
|
07334b |
+#undef DHCP_PROXY_START_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_PROXY_START_TIMEOUT_SEC 0
|
|
|
07334b |
+#undef DHCP_PROXY_END_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_PROXY_END_TIMEOUT_SEC 8
|
|
|
07334b |
+#undef DHCP_REQ_PROXY_TIMEOUT_SEC
|
|
|
07334b |
+#define DHCP_REQ_PROXY_TIMEOUT_SEC 5
|
|
|
07334b |
+
|
|
|
07334b |
+/*
|
|
|
07334b |
+ * Same as above, retry each server using our approximation of standard
|
|
|
07334b |
+ * timeouts and exit before timer induced failure.
|
|
|
07334b |
+ */
|
|
|
07334b |
+#undef PXEBS_START_TIMEOUT_SEC
|
|
|
07334b |
+#define PXEBS_START_TIMEOUT_SEC 0
|
|
|
07334b |
+#undef PXEBS_END_TIMEOUT_SEC
|
|
|
07334b |
+#define PXEBS_END_TIMEOUT_SEC 8
|
|
|
07334b |
+#undef PXEBS_MAX_TIMEOUT_SEC
|
|
|
07334b |
+#define PXEBS_MAX_TIMEOUT_SEC 5
|
|
|
07334b |
--
|
|
|
07334b |
1.8.3.1
|
|
|
07334b |
|