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

Proposal: Set threaded to False in sr1. #4641

Merged
merged 2 commits into from
Feb 3, 2025

Conversation

polybassa
Copy link
Contributor

If the user doesn't specifiy threaded, we should set it to False in sr1 to eliminate the overhead of a thread creation

@gpotter2 What do you think?

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.64%. Comparing base (3cbb62e) to head (9e91011).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4641   +/-   ##
=======================================
  Coverage   81.64%   81.64%           
=======================================
  Files         359      359           
  Lines       86237    86238    +1     
=======================================
+ Hits        70405    70407    +2     
+ Misses      15832    15831    -1     
Files with missing lines Coverage Δ
scapy/supersocket.py 73.86% <100.00%> (+0.07%) ⬆️

... and 7 files with indirect coverage changes

@gpotter2
Copy link
Member

This was a hard choice but I don't think changing it is good idea. It misses more packets under heavy loads. This code should be entirely rewritten, but that's for another time

@polydroi
Copy link

I just had sr1 in mind, since it would only send one packet and immediately stop the send loop. My assumption here is that we would not see the same issue as we had on sr, since after sending we would have the main thread immediately executing the recv loop

@gpotter2
Copy link
Member

Hm yeah I see your point. For sr1 I guess it would make sense.

If the user doesn't specifiy threaded, we should set it to False in sr1 to eliminate the overhead of a thread creation
@polybassa polybassa force-pushed the gh_sr1_threaded_false branch from b022124 to 9e91011 Compare January 31, 2025 07:04
@polybassa polybassa requested a review from gpotter2 January 31, 2025 07:57
@gpotter2 gpotter2 merged commit 8eec6e8 into secdev:master Feb 3, 2025
24 checks passed
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.

3 participants