On Thu, Mar 21, 2019 at 9:43 AM Alan Maguire <alan.magu...@oracle.com> wrote: > > > > On Wed, 20 Mar 2019, Willem de Bruijn wrote: > > > From: Willem de Bruijn <will...@google.com> > > > > bpf_skb_adjust_room adjusts gso_size of gso packets to account for the > > pushed or popped header room. > > > > This is not allowed with UDP, where gso_size delineates datagrams. Add > > an option to avoid these updates and allow this call for datagrams. > > > > It can also be used with TCP, when MSS is known to allow headroom, > > e.g., through MSS clamping or route MTU. > > > > Link: https://patchwork.ozlabs.org/patch/1052497/ > > Signed-off-by: Willem de Bruijn <will...@google.com> > > --- > > include/uapi/linux/bpf.h | 4 ++++ > > net/core/filter.c | 36 +++++++++++++++++++++++++----------- > > 2 files changed, 29 insertions(+), 11 deletions(-) > > > > diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h > > index 4f5c918e6fcf4..0eda8f564a381 100644 > > --- a/include/uapi/linux/bpf.h > > +++ b/include/uapi/linux/bpf.h > > @@ -2593,6 +2593,10 @@ enum bpf_func_id { > > /* Current network namespace */ > > #define BPF_F_CURRENT_NETNS (-1L) > > > > +/* BPF_FUNC_skb_adjust_room flags. */ > > +#define BPF_F_ADJ_ROOM_FIXED_GSO (1ULL << 0) > > minor nit - could we add this flag to the documentation for > bpf_skb_adjust_room? Same suggestion for the encap flags in > patch 8 too. Thanks! > > Reviewed-by: Alan Maguire <alan.magu...@oracle.com>
Definitely, will do in v2. Thanks.