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

Fix #692 & #615: skb page refcounting, forwarded skb initialization #876

Merged
merged 1 commit into from
Dec 29, 2017

Conversation

krizhanovsky
Copy link
Contributor

  1. Fix Server failovering may cause crashes under load or during getting of perfstat  #692 in the kernel.

  2. ss_skb_init_for_xmit() initializes forwarded skbs;

  3. Protect tcp_v4_connect() -> tcp_connect() by the socket lock to let it
    finish it's operation before getting response (e.g. ACK) from the peer
    (crucial for loopback connections sending packets just by function calls);

  4. Add assertions to guarantee that socket lock is aquired by current CPU;

  5. Many replacements of BUG() assertions by WARN_ON_ONCE() for better
    reliability.

  6. Define TFW_CLASSIFIER_ACCSZ in dependence on CONFIG_DEBUG_LOCK_ALLOC
    and several other minor fixes and cleanups;

I reviewed UDP/datagram code as well and the patch introduces several
fixes applicable to datagrams (e.g. skb_morph()), so I believe #615 can be safely closed.

2. ss_skb_init_for_xmit() initializes forwarded skbs;

3. Protect tcp_v4_connect() -> tcp_connect() by the socket lock to let it
   finish it's operation before getting response (e.g. ACK) from the peer
   (crucial for loopback connections sending packets just by function calls);

4. Add assertions to guarantee that socket lock is aquired by current CPU;

5. Many replacements of BUG() assertions by WARN_ON_ONCE() for better
   reliability.

6. Define TFW_CLASSIFIER_ACCSZ in dependence on CONFIG_DEBUG_LOCK_ALLOC
   and several other minor fixes and cleanups;

I reviewed UDP/datagram code as well and the patch introduces several
fixes applicable to datagrams (e.g. skb_morph()), so I believe #615 can be safely closed.
@krizhanovsky krizhanovsky merged commit c148f33 into master Dec 29, 2017
* skb_gro_receive() drops reference to the SKB's header
* via the __skb_header_release(). So, to not break the
* things we must take reference back.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Frankly, I believe that original placement of this comment was better. This is a small piece of code, and it looks dense, nice, and very readable. The comment explains what happens in the logical block of code that follows it, and it's sufficient for understanding the block of code. Placing multi-line comment in the middle of it just dilutes this small block of code and makes it a bit more difficult to follow.

I know that this may be a matter of taste. :-) I believe the code in the kernel in general is written more like to what I describe above.

@krizhanovsky krizhanovsky deleted the ak-692-fix branch December 31, 2017 11:06
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.

Server failovering may cause crashes under load or during getting of perfstat
4 participants