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

Clean up UnixNetProcessor entanglements. #9825

Merged
merged 1 commit into from
Jun 15, 2023

Conversation

jpeach
Copy link
Contributor

@jpeach jpeach commented Jun 12, 2023

The NetProcessor class sometimes downcasts itself to a UnixNetProcessor because it implicitly knows that it is a singleton and that UnixNetProcessor is the actual implementation. We can remove this oddity by simply making the relevant NetProcessor operations abstract and moving the implementations to UnixNetProcessor.

While we are doing this, we can remove some unused member variables, make createNetAccept protected (only subclasses of UnixNetProcessor should call it), remove unnecessary casting, and add a missing lock to a naVec traversal.

@jpeach jpeach force-pushed the cleanup-net-processor branch 2 times, most recently from 43731ac to 9e9a817 Compare June 12, 2023 06:17
@jpeach
Copy link
Contributor Author

jpeach commented Jun 12, 2023

[approve ci autest]

@randall randall added this to the 10.0.0 milestone Jun 12, 2023
@bryancall bryancall requested a review from moonchen June 12, 2023 22:17
@ywkaras
Copy link
Contributor

ywkaras commented Jun 13, 2023

This may incur the wrath of @zwoop .

@jpeach jpeach requested a review from zwoop June 14, 2023 00:00
@jpeach
Copy link
Contributor Author

jpeach commented Jun 14, 2023

This may incur the wrath of @zwoop .

Added him to reviewers.

ywkaras
ywkaras previously approved these changes Jun 14, 2023
iocore/net/UnixNetProcessor.cc Show resolved Hide resolved
iocore/net/UnixNetProcessor.cc Outdated Show resolved Hide resolved
iocore/net/UnixNetProcessor.cc Outdated Show resolved Hide resolved
iocore/net/UnixNetProcessor.cc Outdated Show resolved Hide resolved
The NetProcessor class sometimes downcasts itself to a UnixNetProcessor
because it implicitly knows that it is a singleton and that
UnixNetProcessor is the actual implementation. We can remove this oddity
by simply making the relevant NetProcessor operations abstract and moving
the implementations to UnixNetProcessor.

While we are doing this, we can remove some unused member variables,
make createNetAccept protected (only subclasses of UnixNetProcessor
should call it), remove unnecessary casting, and add a missing lock
to a naVec traversal.

Signed-off-by: James Peach <jpeach@apache.org>
@jpeach
Copy link
Contributor Author

jpeach commented Jun 15, 2023

[approve ci autest]

@jpeach
Copy link
Contributor Author

jpeach commented Jun 15, 2023

[approve ci]

@jpeach jpeach merged commit baaf77f into apache:master Jun 15, 2023
16 checks passed
@jpeach jpeach deleted the cleanup-net-processor branch June 15, 2023 22:24
cmcfarlen pushed a commit to cmcfarlen/trafficserver that referenced this pull request Jun 3, 2024
* asf/master: (90 commits)
  doc: fix the internal libraries section formatting (apache#9879)
  Add max thread count options to CMake build (apache#9883)
  Add yaml libs reference to HTTP proxy test suite. Closes apache#9882 (apache#9885)
  Add transparent proxy support to CMake build (apache#9884)
  Check for symbol IP_TOS in CMake build (apache#9870)
  RAT license fix: renamed_records.out -> .gold (apache#9876)
  Add traffic_wccp to CMake build (apache#9867)
  cleanup cast warning with reinterpret_cast (apache#9866)
  Fixes Coverity 1513058, introduced with apache#9643 (apache#9860)
  add some missing libs for clang (apache#9865)
  Add support for libunwind in CMake build (apache#9862)
  Add option to build regression tests (apache#9863)
  Fix crash on config reload with BoringSSL (apache#9840)
  Check for SO_PEERCRED in CMake build (apache#9855)
  Check for SO_MARK in CMake build (apache#9854)
  Clean up UnixNetProcessor entanglements. (apache#9825)
  Remove unneeded DEBUG conditionals. (apache#9849)
  Add option to enable fast SDK in CMake build (apache#9853)
  Add support for POSIX Cap in CMake build (apache#9852)
  WCCP: remove ts::Buffer (apache#9824)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants