Skip to content

Conversation

@agrawroh
Copy link
Member

@agrawroh agrawroh commented Dec 13, 2025

Description

This PR adds support for a new Network filter for Dynamic Modules. With this it should be possible to write new Network Filters similar to HTTP Filters in Go, RUST, etc.


Commit Message: dynamic_modules: add dynamic modules support for Network filters
Additional Description: Adds support for a new Network filter for Dynamic Modules.
Risk Level: Low
Testing: Added Unit + Integration Tests
Docs Changes: Added
Release Notes: Added

@repokitteh-read-only
Copy link

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #42605 was opened by agrawroh.

see: more, trace.

@repokitteh-read-only
Copy link

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/).
envoyproxy/api-shepherds assignee is @wbpcode
CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

🐱

Caused by: #42605 was opened by agrawroh.

see: more, trace.

@agrawroh agrawroh force-pushed the feat-dm-ntwrk branch 5 times, most recently from 7f04216 to 9dc4adc Compare December 13, 2025 14:15
@agrawroh agrawroh changed the title [POC][WIP] dynamic modules dynamic_modules: add dynamic modules support for Network filters Dec 14, 2025
@agrawroh agrawroh force-pushed the feat-dm-ntwrk branch 2 times, most recently from f5ee101 to fb3bdd9 Compare December 14, 2025 07:37
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@agrawroh agrawroh marked this pull request as ready for review December 14, 2025 07:58
@mathetake mathetake self-assigned this Dec 15, 2025
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
@wbpcode
Copy link
Member

wbpcode commented Dec 21, 2025

/lgtm api

@wbpcode
Copy link
Member

wbpcode commented Dec 21, 2025

I have quick check to the ABI, LGTM. Thanks for this great change.

* @param size is the pointer to the variable where the number of slices will be stored.
* @return true if the buffer is available, false otherwise.
*/
bool envoy_dynamic_module_callback_network_filter_get_read_buffer_slices_size(
Copy link
Member

Choose a reason for hiding this comment

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

i think we decided to stick with "chunks" for the buffer vector, so let's use it here too for consistency

Suggested change
bool envoy_dynamic_module_callback_network_filter_get_read_buffer_slices_size(
bool envoy_dynamic_module_callback_network_filter_get_read_buffer_chunks_size(

if (buffer == nullptr) {
return false;
}
*size = buffer->getRawSlices(std::nullopt).size();
Copy link
Member

Choose a reason for hiding this comment

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

this is not a comment for this PR but the ABI in general including HTTP: i think we should create a fast pass to return the vector size as well as directly store the chunks into the vector allocated in a dynamic module so that we could avoid getRawSlices being called twice -- i think it shouldn't be that hard to make change to the core

Copy link
Member

@mathetake mathetake left a comment

Choose a reason for hiding this comment

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

I am boarding the flight in a few minutes but looks good!! This is really exciting!

@agrawroh
Copy link
Member Author

I am boarding the flight in a few minutes but looks good!! This is really exciting!

Thanks, @mathetake! I'll go ahead and merge this and open a new PR to address the additional feedback you left. Thanks again for the reviews :)

@agrawroh agrawroh merged commit 1913192 into envoyproxy:main Dec 23, 2025
26 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.

4 participants