Page MenuHomeFreeBSD

ctld: Add abstractions to support multiple target protocols
Needs ReviewPublic

Authored by jhb on Fri, Jan 31, 8:16 PM.

Details

Reviewers
asomers
mav
trasz
Summary

This is a prerequisite for adding NVMe over Fabrics support.

A new target-level protocol type is associated with a 'struct
target_ops' which contains methods for various protocol-specific
options such as populating requests to add and remove ctl(4) ports.

While here, move some iSCSI-only functions out of ctld.c and kernel.c
into iscsi.c and make discovery.c, iscsi.c, and login.c which are all
iSCSI-specific conditional on MK_ISCSI.

Sponsored by: Chelsio Communications

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 62177
Build 59061: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Fri, Jan 31, 8:16 PM

Rebase after fixing previous patch

usr.sbin/ctld/ctld.h
116

Is there any reason why this couldn't be an enum?

139

Since it's actually allocating and returning a different string, this function isn't really a validator. How about "normalize_target_name" instead?

usr.sbin/ctld/kernel.c
572

Frankly, I think that all of these commented-out sections should just be deleted. It's highly likely that they don't all compile anymore.