Convert ng_deflate to use new zlib.
Details
- Reviewers
mav ota_j.email.ne.jp glebius - Commits
- rS351418: Convert ng_deflate to use new zlib.
Test against mpd5 PPTP server with deflate enabled, watch the numbers reported.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I haven't looked into FreeBSD extension of zlib yet to see if this change is safe.
sys/netgraph/ng_deflate.c | ||
---|---|---|
489 ↗ | (On Diff #60573) | Z_PACKET_FLUSH is the FreeBSD only and specific implementation. |
I will take a closer look.
I've never used nor looked into details of this API.
Please allow me a bit extra time for review.
sys/netgraph/ng_deflate.c | ||
---|---|---|
667 ↗ | (On Diff #60875) | Does this fnflate() really do a work? |
sys/netgraph/ng_deflate.c | ||
---|---|---|
667 ↗ | (On Diff #60875) | Yes, this would pass the uncompressed data through inflate engine and update the dictionary, which will be used for later decompression (the first few packets are not compressible normally). |
The change looks reasonable based on PPP protocol and comparison to existing zlib code.
I didn't know ng_deflate was for ppp.
I was curious how others implemented and found that NetBSD, OpenBSD, and Linux uses Z_PACKET_FLUSH as well, interestingly.
I never looked at ppp implementation and didn't know all others have same base code along with modified zlib.
I am no longer sure if Z_PACKET_FLUSH was FreeBSD original implementation.
It will be nice if we can get another person familiar with netgraph/ppp.
No, it was not. Z_PACKET_FLUSH was from Paul Mackerras's PPP package, where the original PPP specific version of zlib was bundled. You can find additional history at Paul's git repository at https://github.com/paulusmack/ppp .
It will be nice if we can get another person familiar with netgraph/ppp.
Unfortunately, all reviewers didn't respond my private requests except Alexander who have gave me some hints on how to test the code.
I have so far only gently tested it against another FreeBSD -STABLE system with deflate enabled to make sure that two way communication with it still works.
Thank you for explanations.
I found and had looked at that git repo while reviewing this change.
However, I didn't have enough guts to look into each of repo history to figure out which one came from where.
That explains why all of ppp use Z_PACKET_FLUSH while really NONE uses Z_SYNC_FLUSH.