google / packetdrill

The official Google release of packetdrill
GNU General Public License v2.0
897 stars 221 forks source link

packetdrill: add test of tcp window clamp socket option #56

Open nspring opened 3 years ago

nspring commented 3 years ago

Adds a test of TCP_WINDOW_CLAMP, including lowering, raising, and lowering again the clamp while the connection is in progress.

Requires a patch to tcp_set_window_clamp, since prior linux ignores this field unless set before the connection exchanges data.

Signed-off-by: Neil Spring ntspring@fb.com

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

nealcardwell commented 3 years ago

When I look at: https://github.com/google/packetdrill/pull/56/commits it says:
nspring wants to merge 3 commits into google:master from nspring:window_clamp

Can you please squash/fixup the 3 commits into a single commit? Thanks!

nspring commented 3 years ago

Gotcha - commits squashed, file/directory renamed, and a bit more test code added to exercise a scenario Eric Dumazet pointed out in the discussion on the kernel patch. I'm not quite sure the patch is perfect yet; maybe it's too conservative when raising the clamp.

I'm really happy you thought the test was good. I wonder if you can help me with two things though.

  1. BSD? if run without linux, will the test explode because window clamp is not defined?
  2. Am I being too specific about the advertised window values on every ack? I don't care about precise intermediate advertised windows, only that it eventually reaches the right value and maybe that it doesn't increase or decrease when it shouldn't. I lean toward including them to document what's happening, but don't want an off-by-one rounding error to make someone else have to update the test.

Still tuning receive windows after all these years!

Low hanging fruit! Nice to be able to work together (even if indirectly) again; this is a sweet project.