Page MenuHomeFreeBSD

Add DSCP support for network QoS to iscsi target.
ClosedPublic

Authored by rscheff on Sep 10 2020, 12:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 7:00 PM
Unknown Object (File)
Sat, Dec 7, 10:47 PM
Unknown Object (File)
Sat, Dec 7, 10:46 PM
Unknown Object (File)
Sat, Dec 7, 10:46 PM
Unknown Object (File)
Sat, Dec 7, 10:46 PM
Unknown Object (File)
Sat, Dec 7, 10:46 PM
Unknown Object (File)
Sat, Dec 7, 10:46 PM
Unknown Object (File)
Sat, Dec 7, 10:46 PM
Subscribers

Details

Summary

In order to prioritize iSCSI traffic across a network,
DSCP can be used. In order not to rely on "ipfw setdscp"
or in-network reclassification, this adds the dscp value
directly to the portal group (where TCP sessions are accepted).

As the an incoming iSCSI session is first handled by ctld for
CHAP authentication and the socket - once found to match all
prerequisites - is then handed off to the in-kernel iscsi
driver without modification of the socket parameters, simply
setting up the socket here is sufficient to keep sending
outgoing iSCSI related traffic with the correct DSCP.

Test Plan

verify the IP Header DSCP value for both IPv4 and
IPv6 iSCSI traffic during CHAP authentication, and subsequent
iSCSI IOs (handled directly by the kernel driver).

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 33501
Build 30773: arc lint + arc unit

Event Timeline

rscheff created this revision.
  • prevent the ECN bits to be set.

I haven't written that part of the code, but I think you should add its support to the uclparse.c.

Otherwise it looks like nice functionality.

usr.sbin/ctld/ctld.c
2193

It looks weird to modify the configuration while applying it. I'd say either modify it while parsing or use local variable here.

  • adding uclparse and using temporary dscp variable when doing setsockopt
This revision is now accepted and ready to land.Sep 10 2020, 4:25 PM
  • uclparse hex values for dscp too
This revision now requires review to proceed.Sep 10 2020, 8:12 PM
  • shift TOS predefinitions and dscp field correctly around
This revision is now accepted and ready to land.Sep 27 2020, 6:51 PM
This revision was automatically updated to reflect the committed changes.