Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nspring
Copy link

@nspring nspring commented Aug 25, 2021

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 [email protected]

@google-cla
Copy link

google-cla bot commented Aug 25, 2021

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).

📝 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.

Copy link
Collaborator

@nealcardwell nealcardwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, Neil! Good to hear from you. Still tuning receive windows after all these years! I love it! ;-)

And a very nice test!

For extra clarity, do you mind putting this in a directory called "window_clamp" rather than "clamp"?

And to help coordinate between your kernel patch and this test, do you mind putting in the commit message the title of the patch you have posted or are planning to post that will make this test pass?

Thanks!

@@ -190,6 +190,7 @@ struct int_symbol platform_symbols_table[] = {
{ TCP_TIMESTAMP, "TCP_TIMESTAMP" },
{ TCP_NOTSENT_LOWAT, "TCP_NOTSENT_LOWAT" },
{ TCP_INQ, "TCP_INQ" },
{ TCP_WINDOW_CLAMP, "TCP_WINDOW_CLAMP" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Do you mind putting this after TCP_DEFER_ACCEPT and before TCP_INFO? That's where we have it in our internal sources. (And somehow that line didn't make it upstream... sorry!)

@nealcardwell
Copy link
Collaborator

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!

Adds a test of TCP_WINDOW_CLAMP, including lowering, raising, and
lowering again the clamp while the connection is in progress,
including a test that ensures brief lowering before raising does
not have an unexpected consequence.

Requires a patch to tcp_set_window_clamp discussed as "tcp: enable mid
stream window clamp".

Signed-off-by: Neil Spring <[email protected]>
@nspring
Copy link
Author

nspring commented Aug 25, 2021

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.

dcaratti added a commit to dcaratti/packetdrill that referenced this pull request Sep 24, 2021
add coverage for ADD_ADDR retransmission
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.

2 participants