Page MenuHomeFreeBSD

netsmb: absorb libmchain module
Needs ReviewPublic

Authored by mhorne on Feb 14 2023, 2:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 9 2024, 4:06 PM
Unknown Object (File)
Apr 3 2024, 12:05 AM
Unknown Object (File)
Dec 20 2023, 6:21 AM
Unknown Object (File)
Nov 18 2023, 10:31 AM
Unknown Object (File)
Nov 18 2023, 9:55 AM
Unknown Object (File)
Nov 18 2023, 8:26 AM
Unknown Object (File)
Jun 28 2023, 4:55 PM
Unknown Object (File)
May 6 2023, 5:46 PM

Details

Reviewers
emaste
allanjude
brooks
Group Reviewers
network
Summary

This API was taken from smbfs(5) and made into a small library [1].
After two decades it has seen very few changes, and smbfs remains the
only consumer. We should keep it this way, as the smbfs module itself is
under discussion for removal. Move the logic into the netsmb module.

Bump the minor version of the netsmb module. We can add a gone_in()
warning to stable branches.

[1] d8589bd5cbad

Test Plan

make tinderbox. Load the netsmb,smbfs modules successfully.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 49779
Build 46669: arc lint + arc unit

Event Timeline

Despite the library isn't used by anything other than netsmb it seems a good one to me. I see some patterns that are implemented differently in other parts of the kernel, e.g. in socket buffers. IMHO, better keep libmchain separate from netsmb and retire them one after another. Cause netsmb has a very little chance of coming back, while the mchain library potentially can come back.

Despite the library isn't used by anything other than netsmb it seems a good one to me. I see some patterns that are implemented differently in other parts of the kernel, e.g. in socket buffers. IMHO, better keep libmchain separate from netsmb and retire them one after another. Cause netsmb has a very little chance of coming back, while the mchain library potentially can come back.

Thanks for this input, ultimately this is exactly the kind of answer that I tagged network for. So it is useful, yet further adoption seems... unlikely? The lib has had its chance to catch on. In general we should not hesitate to eliminate stray/single-use APIs where possible (I know you are not suggesting otherwise). I am fine keeping it separate from netsmb, but I would still make the move to deprecate it now.

If it were to come back, my suggestion would be to swallow it into the regular/established mbuf API. Otherwise it will remain obscure.

Despite the library isn't used by anything other than netsmb it seems a good one to me. I see some patterns that are implemented differently in other parts of the kernel, e.g. in socket buffers. IMHO, better keep libmchain separate from netsmb and retire them one after another. Cause netsmb has a very little chance of coming back, while the mchain library potentially can come back.

Thanks for this input, ultimately this is exactly the kind of answer that I tagged network for. So it is useful, yet further adoption seems... unlikely? The lib has had its chance to catch on. In general we should not hesitate to eliminate stray/single-use APIs where possible (I know you are not suggesting otherwise). I am fine keeping it separate from netsmb, but I would still make the move to deprecate it now.

If it were to come back, my suggestion would be to swallow it into the regular/established mbuf API. Otherwise it will remain obscure.

No objection on deprecating it now. Just saying that deprecating netsmb separate from libmchain would be a better process than together. It will leave a clear record that libmchain is a generic mbuf library, not a part of SMB.

Note that netsmb in its current state is nonviable, but Illumos and Apple added smbv2/smbv3 support and that may be an update path for us.