Bug 287348 - [exp-run] check SF_SYNC usage
Summary: [exp-run] check SF_SYNC usage
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Gleb Smirnoff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-06 21:52 UTC by Gleb Smirnoff
Modified: 2025-06-17 17:15 UTC (History)
1 user (show)

See Also:
glebius: exp-run?


Attachments
SF_SYNC removal patch (4.57 KB, patch)
2025-06-06 21:52 UTC, Gleb Smirnoff
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb Smirnoff freebsd_committer freebsd_triage 2025-06-06 21:52:41 UTC
Created attachment 261048 [details]
SF_SYNC removal patch

I'd like to see if there is any software in ports that uses this flag.  Should be sufficient to just delete SF_SYNC from socket.h.  However, a full patch removing the feature is attached.
Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2025-06-17 17:15:46 UTC
Thanks, Antoine!

The packetdrill is expected, it is our tool that test all things possible.

A note on sysutils/rocr. The port was added by jmd@ with a note in commit log "Hence, in the current absence of a working amdkfd on FreeBSD, these ports do not function yet".  The port was never improved after.  The Github repo the port fetches from is an outdated jmd@'s fork of ROCm/ROCR-Runtime. The SF_SYNC flag was added when jmd@ ported the code from Linux:

5c092e87 (J M Dieterich 2017-02-14 10:49:25 -0500  228) #ifdef __FreeBSD__
5c092e87 (J M Dieterich 2017-02-14 10:49:25 -0500  229)         int err = sendfile(in, d, size, 0, NULL, &written, SF_SYNC);
5c092e87 (J M Dieterich 2017-02-14 10:49:25 -0500  230) #else
^e9aac90 (James Edwards 2016-01-26 19:43:17 -0600  231)         written = sendfile(d, in, NULL, size);
5c092e87 (J M Dieterich 2017-02-14 10:49:25 -0500  232) #endif

This doesn't make any sense. There is no analog of SF_SYNC in Linux and never was. My guess flag was added without understanding its meaning.

Verdict: SF_SYNC has no use, as expected.