Date: Tue, 27 Jan 2026 18:44:15 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 9dd655a05bea - stable/14 - ctld: Add missing properties to the UCL parser Message-ID: <6979077f.e55b.44e84da7@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9dd655a05bea9d50617bfabe252cbccc9590b2a4 commit 9dd655a05bea9d50617bfabe252cbccc9590b2a4 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-02-26 15:12:25 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-01-27 18:15:57 +0000 ctld: Add missing properties to the UCL parser - Support for "foreign", "offload", and "tag" properties in portal group contexts. - Support for "ctl-lun" and "device-type" properties in LUN contexts. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D48936 (cherry picked from commit 67940b204f5829a72e7c47f92069fb06a7dad91f) --- usr.sbin/ctld/uclparse.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/usr.sbin/ctld/uclparse.c b/usr.sbin/ctld/uclparse.c index e8e026247b71..7c786afb1e93 100644 --- a/usr.sbin/ctld/uclparse.c +++ b/usr.sbin/ctld/uclparse.c @@ -634,6 +634,10 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) goto fail; } + if (strcmp(key, "foreign") == 0) { + portal_group_set_foreign(); + } + if (strcmp(key, "listen") == 0) { if (obj->type == UCL_STRING) { if (!portal_group_add_listen( @@ -676,6 +680,18 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) } } + if (strcmp(key, "offload") == 0) { + if (obj->type != UCL_STRING) { + log_warnx("\"offload\" property of " + "portal-group \"%s\" is not a string", + name); + goto fail; + } + + if (!portal_group_set_offload(ucl_object_tostring(obj))) + goto fail; + } + if (strcmp(key, "redirect") == 0) { if (obj->type != UCL_STRING) { log_warnx("\"listen\" property of " @@ -705,6 +721,17 @@ uclparse_portal_group(const char *name, const ucl_object_t *top) } } + if (strcmp(key, "tag") == 0) { + if (obj->type != UCL_INT) { + log_warnx("\"tag\" property of portal group " + "\"%s\" is not an integer", + name); + goto fail; + } + + portal_group_set_tag(ucl_object_toint(obj)); + } + if (strcmp(key, "dscp") == 0) { if (!uclparse_dscp("portal", name, obj)) goto fail; @@ -946,6 +973,28 @@ uclparse_lun(const char *name, const ucl_object_t *top) goto fail; } + if (strcmp(key, "device-type") == 0) { + if (obj->type != UCL_STRING) { + log_warnx("\"device-type\" property of lun " + "\"%s\" is not an integer", name); + goto fail; + } + + if (!lun_set_device_type(ucl_object_tostring(obj))) + goto fail; + } + + if (strcmp(key, "ctl-lun") == 0) { + if (obj->type != UCL_INT) { + log_warnx("\"ctl-lun\" property of lun " + "\"%s\" is not an integer", name); + goto fail; + } + + if (!lun_set_ctl_lun(ucl_object_toint(obj))) + goto fail; + } + if (strcmp(key, "options") == 0) { if (obj->type != UCL_OBJECT) { log_warnx("\"options\" property of lun "home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6979077f.e55b.44e84da7>
