--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+options {
+ prefetch 11;
+};
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+options {
+ prefetch 2 7;
+};
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+view foo {
+ prefetch 11;
+};
--- /dev/null
+/*
+ * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+ *
+ * SPDX-License-Identifier: MPL-2.0
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, you can obtain one at https://mozilla.org/MPL/2.0/.
+ *
+ * See the COPYRIGHT file distributed with this work for additional
+ * information regarding copyright ownership.
+ */
+
+view foo {
+ prefetch 9 13;
+};
}
}
+ obj = NULL;
+ (void)cfg_map_get(options, "prefetch", &obj);
+ if (obj != NULL) {
+ const cfg_obj_t *trigger = cfg_tuple_get(obj, "trigger");
+ const cfg_obj_t *eligible = cfg_tuple_get(obj, "eligible");
+ uint32_t tvalue = cfg_obj_asuint32(trigger);
+
+ if (tvalue > 10) {
+ cfg_obj_log(obj, ISC_LOG_ERROR,
+ "prefetch '%u' out of range (0..10)",
+ tvalue);
+ if (result == ISC_R_SUCCESS) {
+ result = ISC_R_RANGE;
+ }
+ }
+
+ if (!cfg_obj_isvoid(eligible)) {
+ uint32_t evalue = cfg_obj_asuint32(eligible);
+ if (evalue < tvalue + 6) {
+ cfg_obj_log(obj, ISC_LOG_ERROR,
+ "prefetch eligibility '%u' must be "
+ "at least six seconds longer than "
+ "the trigger value '%u'",
+ evalue, tvalue);
+ if (result == ISC_R_SUCCESS) {
+ result = ISC_R_RANGE;
+ }
+ }
+ }
+ }
+
if (aclctx != NULL) {
cfg_aclconfctx_detach(&aclctx);
}
trigger = (cfg_obj_t *)cfg_tuple_get(effectiveobj, "trigger");
INSIST(cfg_obj_isuint32(trigger));
- if (cfg_obj_asuint32(trigger) > 10) {
- trigger->value.uint32 = 10;
- }
eligible = (cfg_obj_t *)cfg_tuple_get(effectiveobj, "eligible");
if (cfg_obj_isvoid(eligible)) {
}
INSIST(cfg_obj_isuint32(eligible));
- if (cfg_obj_asuint32(eligible) < cfg_obj_asuint32(trigger) + 6) {
- eligible->value.uint32 = cfg_obj_asuint32(trigger) + 6;
- }
}
static void