Message ID | 20180417200059.30154-7-willemdebruijn.kernel@gmail.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Series | udp gso | expand |
On Tue, Apr 17, 2018 at 1:00 PM, Willem de Bruijn <willemdebruijn.kernel@gmail.com> wrote: > From: Willem de Bruijn <willemb@google.com> > > Virtual devices such as tunnels and bonding can handle large packets. > Only segment packets when reaching a physical or loopback device. > > Signed-off-by: Willem de Bruijn <willemb@google.com> > --- > include/linux/netdev_features.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h > index 35b79f47a13d..1e4883bb02a7 100644 > --- a/include/linux/netdev_features.h > +++ b/include/linux/netdev_features.h > @@ -80,6 +80,7 @@ enum { > > NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */ > NETIF_F_HW_TLS_RECORD_BIT, /* Offload TLS record */ > + NETIF_F_GSO_UDP_L4_BIT, /* UDP payload GSO (not UFO) */ Please add an entry for the new flag to net/core/ethtool.c:netdev_features_strings and a description to Documentation/networking/netdev-features.txt. > > /* > * Add your fresh new feature above and remember to update > @@ -147,6 +148,7 @@ enum { > #define NETIF_F_HW_ESP_TX_CSUM __NETIF_F(HW_ESP_TX_CSUM) > #define NETIF_F_RX_UDP_TUNNEL_PORT __NETIF_F(RX_UDP_TUNNEL_PORT) > #define NETIF_F_HW_TLS_RECORD __NETIF_F(HW_TLS_RECORD) > +#define NETIF_F_GSO_UDP_L4 __NETIF_F(GSO_UDP_L4) > > #define for_each_netdev_feature(mask_addr, bit) \ > for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) > @@ -216,6 +218,7 @@ enum { > NETIF_F_GSO_GRE_CSUM | \ > NETIF_F_GSO_IPXIP4 | \ > NETIF_F_GSO_IPXIP6 | \ > + NETIF_F_GSO_UDP_L4 | \ > NETIF_F_GSO_UDP_TUNNEL | \ > NETIF_F_GSO_UDP_TUNNEL_CSUM) > > -- > 2.17.0.484.g0c8726318c-goog >
On Tue, Apr 17, 2018 at 8:43 PM, Dimitris Michailidis <dmichail@google.com> wrote: > On Tue, Apr 17, 2018 at 1:00 PM, Willem de Bruijn > <willemdebruijn.kernel@gmail.com> wrote: >> From: Willem de Bruijn <willemb@google.com> >> >> Virtual devices such as tunnels and bonding can handle large packets. >> Only segment packets when reaching a physical or loopback device. >> >> Signed-off-by: Willem de Bruijn <willemb@google.com> >> --- >> include/linux/netdev_features.h | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h >> index 35b79f47a13d..1e4883bb02a7 100644 >> --- a/include/linux/netdev_features.h >> +++ b/include/linux/netdev_features.h >> @@ -80,6 +80,7 @@ enum { >> >> NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */ >> NETIF_F_HW_TLS_RECORD_BIT, /* Offload TLS record */ >> + NETIF_F_GSO_UDP_L4_BIT, /* UDP payload GSO (not UFO) */ > > Please add an entry for the new flag to > net/core/ethtool.c:netdev_features_strings > and a description to Documentation/networking/netdev-features.txt. Will do. I initially wrote this as a transparent kernel-internal feature, but indeed it should be observable and configurable.
diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h index 35b79f47a13d..1e4883bb02a7 100644 --- a/include/linux/netdev_features.h +++ b/include/linux/netdev_features.h @@ -80,6 +80,7 @@ enum { NETIF_F_GRO_HW_BIT, /* Hardware Generic receive offload */ NETIF_F_HW_TLS_RECORD_BIT, /* Offload TLS record */ + NETIF_F_GSO_UDP_L4_BIT, /* UDP payload GSO (not UFO) */ /* * Add your fresh new feature above and remember to update @@ -147,6 +148,7 @@ enum { #define NETIF_F_HW_ESP_TX_CSUM __NETIF_F(HW_ESP_TX_CSUM) #define NETIF_F_RX_UDP_TUNNEL_PORT __NETIF_F(RX_UDP_TUNNEL_PORT) #define NETIF_F_HW_TLS_RECORD __NETIF_F(HW_TLS_RECORD) +#define NETIF_F_GSO_UDP_L4 __NETIF_F(GSO_UDP_L4) #define for_each_netdev_feature(mask_addr, bit) \ for_each_set_bit(bit, (unsigned long *)mask_addr, NETDEV_FEATURE_COUNT) @@ -216,6 +218,7 @@ enum { NETIF_F_GSO_GRE_CSUM | \ NETIF_F_GSO_IPXIP4 | \ NETIF_F_GSO_IPXIP6 | \ + NETIF_F_GSO_UDP_L4 | \ NETIF_F_GSO_UDP_TUNNEL | \ NETIF_F_GSO_UDP_TUNNEL_CSUM)