Bug 6 - Port to FreeBSD and Darwin
Summary: Port to FreeBSD and Darwin
Status: CONFIRMED
Alias: None
Product: passt
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux
: Normal feature
Assignee: nobody
URL:
Depends on:
Blocks:
 
Reported: 2021-10-23 10:01 UTC by Stefano Brivio
Modified: 2022-10-26 11:41 UTC (History)
1 user (show)

See Also:


Attachments

Description Stefano Brivio 2021-10-23 10:01:53 UTC
Find replacements for Linux-specific syscalls and TCP socket options, get passt and pasta to work with FreeBSD and Darwin.
Comment 1 c 2022-04-13 12:48:17 UTC
Out of curiosity, is there anyone who has started looking into this ticket?

I’m a macOS user, but unfortunately I’m not proficient in C and I’m not very familiar with the nooks and crannies of the macOS kernel.

Do we perhaps have a list of the syscalls that need to be replaced/worked-around?
Comment 2 Stefano Brivio 2022-05-18 23:59:34 UTC
Carl, sorry for the delay. Due to the issue you mentioned with Bugzilla, I never received a notification for your comment -- by the way, I think I just fixed it on this instance, it appears to be the issue reported at:
  https://bugzilla.redhat.com/show_bug.cgi?id=1852414

...and I'm using this very comment to test the fix.

About your question itself: nobody started looking into this as far as I know. I don't actually foresee particular issues with syscalls, those should probably be just tried out carefully watching for failures.

The most critical point in my opinion will be related to querying parameters of a TCP connection with the TCP_INFO socket option. I'm not sure if this comment in the iperf3 codebase is accurate and up to date:
  https://github.com/esnet/iperf/blob/e919e8c21baf653930952a2a2e9ad10bb691e625/src/tcp_info.c#L36

...probably a first task would be to have a look at what information is exported via TCP_INFO there, to get an idea of the effort we'll need to infer any missing parameter. Personally, I would play with iperf3 (dropping ifdefs) to see what we can get there. See tcp.c (tcp_update_seqack_wnd() in particular) for the bits of information we need in passt.
Comment 3 c 2022-06-09 19:38:51 UTC
Thank you for the info Stefano.

I’m afraid I can’t devote any time for this at the time being. But hopefully in the future! And if I do so I might ping you again.

Note You need to log in before you can comment on or make changes to this bug.