Skip to content

Keep only mvfst dependents in AsyncUDPSocket - #1

Open
saubhik wants to merge 4 commits into
masterfrom
feature/trim-asyncudpsocket
Open

Keep only mvfst dependents in AsyncUDPSocket#1
saubhik wants to merge 4 commits into
masterfrom
feature/trim-asyncudpsocket

Conversation

@saubhik

@saubhik saubhik commented Sep 23, 2021

Copy link
Copy Markdown
Owner

This PR modifies AsyncUDPSocket to only keep the functionality required by mvfst.

mvfst uses everything except the following API:

// The following may not be required (requires some changes in some functions to remove these completely)
bool AsyncUDPSocket::setZeroCopy(bool enable)
int AsyncUDPSocket::getZeroCopyFlags()
void AsyncUDPSocket::releaseZeroCopyBuf(uint32_t id)
bool AsyncUDPSocket::isZeroCopyMsg(FOLLY_MAYBE_UNUSED const cmsghdr& cmsg)
void AsyncUDPSocket::processZeroCopyMsg(FOLLY_MAYBE_UNUSED const cmsghdr& cmsg)
----

// The following are removed completely
void AsyncUDPSocket::dontFragment(bool df)
AsyncUDPSocket::TXTime AsyncUDPSocket::getTXTime()
bool AsyncUDPSocket::setTXTime(TXTime txTime)
bool AsyncUDPSocket::setRxZeroChksum6(FOLLY_MAYBE_UNUSED bool bVal)
bool AsyncUDPSocket::setTxZeroChksum6(FOLLY_MAYBE_UNUSED bool bVal)
void AsyncUDPSocket::setTrafficClass(int tclass)

How to add changes to folly as a mvfst dep?

  • Update folly code in mvfst/_build/deps/folly/
  • In mvfst's build_helper.sh, comment out the following lines in setup_folly():
# git clone https://github.com/facebook/folly.git "$FOLLY_DIR"
# synch_dependency_to_commit "$FOLLY_DIR" "$MVFST_ROOT_DIR/build/deps/github_hashes/facebook/folly-rev.txt"
  • Run ./build_helper.sh
  • Run cd _build/build && make test

@saubhik

saubhik commented Sep 23, 2021

Copy link
Copy Markdown
Owner Author

mvfst builds successfully with the reduced async UDP socket API. No failed tests:

100% tests passed, 0 tests failed out of 1473

Total Test time (real) =  30.49 sec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant