• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/usr.sbin/ctld/

Lines Matching refs:port

304 			log_errx(1, "%s: improper port element nesting (%s)",
426 struct port *cp;
432 struct cctl_port *port;
544 STAILQ_FOREACH(port, &devlist.port_list, links) {
545 if (strcmp(port->port_frontend, "ha") == 0)
548 if (port->pp == 0 && port->vp == 0) {
549 name = checked_strdup(port->port_name);
550 } else if (port->vp == 0) {
552 port->port_name, port->pp);
557 port->port_name, port->pp, port->vp);
562 if (port->cfiscsi_target == NULL) {
563 log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ",
564 port->port_id, name);
568 log_debugx("found new kernel port %u \"%s\"",
569 port->port_id, name);
571 pp = pport_new(conf, name, port->port_id);
579 if (port->cfiscsi_state != 1) {
580 log_debugx("CTL port %ju is not active (%d); ignoring",
581 (uintmax_t)port->port_id, port->cfiscsi_state);
585 targ = target_find(conf, port->cfiscsi_target);
588 log_debugx("found new kernel target %s for CTL port %ld",
589 port->cfiscsi_target, port->port_id);
591 targ = target_new(conf, port->cfiscsi_target);
598 if (port->ctld_portal_group_name == NULL)
600 pg = portal_group_find(conf, port->ctld_portal_group_name);
603 log_debugx("found new kernel portal group %s for CTL port %ld",
604 port->ctld_portal_group_name, port->port_id);
606 pg = portal_group_new(conf, port->ctld_portal_group_name);
612 pg->pg_tag = port->cfiscsi_portal_group_tag;
618 cp->p_ctl_port = port->port_id;
1009 kernel_port_add(struct port *port)
1015 struct target *targ = port->p_target;
1016 struct portal_group *pg = port->p_portal_group;
1020 /* Create iSCSI port. */
1021 if (port->p_portal_group || port->p_ioctl_port) {
1025 if (port->p_portal_group) {
1045 if (port->p_ioctl_port) {
1049 port->p_ioctl_pp);
1051 port->p_ioctl_vp);
1070 log_warnx("error returned from port creation request: %s",
1075 log_warnx("unknown port creation request status %d",
1086 port->p_ctl_port = nvlist_get_number(req.result_nvl, "port_id");
1088 } else if (port->p_pport) {
1089 port->p_ctl_port = port->p_pport->pp_ctl_port;
1095 entry.targ_port = port->p_ctl_port;
1104 lm.port = port->p_ctl_port;
1115 lm.port = port->p_ctl_port;
1123 /* Enable port */
1125 entry.targ_port = port->p_ctl_port;
1136 kernel_port_update(struct port *port, struct port *oport)
1139 struct target *targ = port->p_target;
1146 lm.port = port->p_ctl_port;
1166 kernel_port_remove(struct port *port)
1171 struct target *targ = port->p_target;
1172 struct portal_group *pg = port->p_portal_group;
1175 /* Disable port */
1177 entry.targ_port = port->p_ctl_port;
1184 /* Remove iSCSI or ioctl port. */
1185 if (port->p_portal_group || port->p_ioctl_port) {
1187 strlcpy(req.driver, port->p_ioctl_port ? "ioctl" : "iscsi",
1194 if (port->p_ioctl_port)
1196 port->p_ctl_port);
1218 log_warnx("error returned from port removal request: %s",
1223 log_warnx("unknown port removal request status %d",
1229 lm.port = port->p_ctl_port;