diff --git a/envoy/config/core/v3/udp_socket_config.proto b/envoy/config/core/v3/udp_socket_config.proto index 94acb421..00033eab 100644 --- a/envoy/config/core/v3/udp_socket_config.proto +++ b/envoy/config/core/v3/udp_socket_config.proto @@ -21,4 +21,11 @@ message UdpSocketConfig { // defaults to 1500 bytes. google.protobuf.UInt64Value max_rx_datagram_size = 1 [(validate.rules).uint64 = {lt: 65536 gt: 0}]; + + // Configures whether Generic Receive Offload (GRO) + // _ is preferred when reading from the + // UDP socket. The default is context dependent and is documented where UdpSocketConfig is used. + // This option affects performance but not functionality. If GRO is not supported by the operating + // system, non-GRO receive will be used. + google.protobuf.BoolValue prefer_gro = 2; } diff --git a/envoy/config/core/v4alpha/udp_socket_config.proto b/envoy/config/core/v4alpha/udp_socket_config.proto index cfe79024..5fa6c6ec 100644 --- a/envoy/config/core/v4alpha/udp_socket_config.proto +++ b/envoy/config/core/v4alpha/udp_socket_config.proto @@ -25,4 +25,11 @@ message UdpSocketConfig { // defaults to 1500 bytes. google.protobuf.UInt64Value max_rx_datagram_size = 1 [(validate.rules).uint64 = {lt: 65536 gt: 0}]; + + // Configures whether Generic Receive Offload (GRO) + // _ is preferred when reading from the + // UDP socket. The default is context dependent and is documented where UdpSocketConfig is used. + // This option affects performance but not functionality. If GRO is not supported by the operating + // system, non-GRO receive will be used. + google.protobuf.BoolValue prefer_gro = 2; } diff --git a/envoy/config/listener/v3/udp_listener_config.proto b/envoy/config/listener/v3/udp_listener_config.proto index 09236529..8ef1f834 100644 --- a/envoy/config/listener/v3/udp_listener_config.proto +++ b/envoy/config/listener/v3/udp_listener_config.proto @@ -36,7 +36,10 @@ message UdpListenerConfig { // [#comment:TODO(#12829): Remove this as an extension point.] core.v3.TypedExtensionConfig listener_config = 4; - // UDP socket configuration for the listener. + // UDP socket configuration for the listener. The default for + // :ref:`prefer_gro ` is false for + // listener sockets. If receiving a large amount of datagrams from a small number of sources, it + // may be worthwhile to enable this option after performance testing. core.v3.UdpSocketConfig downstream_socket_config = 5; // If the protocol in the listener socket address in :ref:`protocol diff --git a/envoy/config/listener/v4alpha/udp_listener_config.proto b/envoy/config/listener/v4alpha/udp_listener_config.proto index ee992623..8500c1f6 100644 --- a/envoy/config/listener/v4alpha/udp_listener_config.proto +++ b/envoy/config/listener/v4alpha/udp_listener_config.proto @@ -36,7 +36,10 @@ message UdpListenerConfig { // [#comment:TODO(#12829): Remove this as an extension point.] core.v4alpha.TypedExtensionConfig listener_config = 4; - // UDP socket configuration for the listener. + // UDP socket configuration for the listener. The default for + // :ref:`prefer_gro ` is false for + // listener sockets. If receiving a large amount of datagrams from a small number of sources, it + // may be worthwhile to enable this option after performance testing. core.v4alpha.UdpSocketConfig downstream_socket_config = 5; // If the protocol in the listener socket address in :ref:`protocol diff --git a/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto b/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto index 29b8207a..c154f02c 100644 --- a/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto +++ b/envoy/extensions/filters/udp/udp_proxy/v3/udp_proxy.proto @@ -72,6 +72,8 @@ message UdpProxyConfig { // limited to 1. repeated HashPolicy hash_policies = 5 [(validate.rules).repeated = {max_items: 1}]; - // UDP socket configuration for upstream sockets. + // UDP socket configuration for upstream sockets. The default for + // :ref:`prefer_gro ` is true for upstream + // sockets as the assumption is datagrams will be received from a single source. config.core.v3.UdpSocketConfig upstream_socket_config = 6; }