Lines Matching refs:port

283 			log_errx(1, "%s: improper port element nesting (%s)",
397 struct port *cp;
403 struct cctl_port *port;
515 STAILQ_FOREACH(port, &devlist.port_list, links) {
516 if (strcmp(port->port_frontend, "ha") == 0)
520 if (port->pp == 0 && port->vp == 0)
521 name = checked_strdup(port->port_name);
522 else if (port->vp == 0)
523 asprintf(&name, "%s/%d", port->port_name, port->pp);
525 asprintf(&name, "%s/%d/%d", port->port_name, port->pp,
526 port->vp);
528 if (port->cfiscsi_target == NULL) {
529 log_debugx("CTL port %u \"%s\" wasn't managed by ctld; ",
530 port->port_id, name);
534 log_debugx("found new kernel port %u \"%s\"",
535 port->port_id, name);
537 pp = pport_new(conf, name, port->port_id);
545 if (port->cfiscsi_state != 1) {
546 log_debugx("CTL port %ju is not active (%d); ignoring",
547 (uintmax_t)port->port_id, port->cfiscsi_state);
551 targ = target_find(conf, port->cfiscsi_target);
554 log_debugx("found new kernel target %s for CTL port %ld",
555 port->cfiscsi_target, port->port_id);
557 targ = target_new(conf, port->cfiscsi_target);
564 if (port->ctld_portal_group_name == NULL)
566 pg = portal_group_find(conf, port->ctld_portal_group_name);
569 log_debugx("found new kernel portal group %s for CTL port %ld",
570 port->ctld_portal_group_name, port->port_id);
572 pg = portal_group_new(conf, port->ctld_portal_group_name);
578 pg->pg_tag = port->cfiscsi_portal_group_tag;
584 cp->p_ctl_port = port->port_id;
908 kernel_port_add(struct port *port)
914 struct target *targ = port->p_target;
915 struct portal_group *pg = port->p_portal_group;
919 /* Create iSCSI port. */
920 if (port->p_portal_group) {
933 req.args[n].vallen = sizeof(port->p_ctl_port);
934 req.args[n].value = &port->p_ctl_port;
952 log_warnx("error returned from port creation request: %s",
957 log_warnx("unknown port creation request status %d",
961 } else if (port->p_pport) {
962 port->p_ctl_port = port->p_pport->pp_ctl_port;
968 entry.targ_port = port->p_ctl_port;
977 lm.port = port->p_ctl_port;
988 lm.port = port->p_ctl_port;
996 /* Enable port */
998 entry.targ_port = port->p_ctl_port;
1009 kernel_port_update(struct port *port, struct port *oport)
1012 struct target *targ = port->p_target;
1019 lm.port = port->p_ctl_port;
1039 kernel_port_remove(struct port *port)
1045 struct target *targ = port->p_target;
1046 struct portal_group *pg = port->p_portal_group;
1049 /* Disable port */
1051 entry.targ_port = port->p_ctl_port;
1058 /* Remove iSCSI port. */
1059 if (port->p_portal_group) {
1077 log_warnx("error returned from port removal request: %s",
1082 log_warnx("unknown port removal request status %d",
1088 lm.port = port->p_ctl_port;