On Thu, 8 Oct 2020 08:33:04 -0400
Willem de Bruijn wrote:
> On Thu, Oct 8, 2020 at 7:06 AM Jesper Dangaard Brouer
> wrote:
> >
> > On Wed, 7 Oct 2020 16:46:10 -0700
> > Maciej Żenczykowski wrote:
> >
> > > > static u32 __bpf_skb_max_len(const struct sk_buff *skb)
> > > > {
> > > > -
On Thu, Oct 8, 2020 at 7:06 AM Jesper Dangaard Brouer wrote:
>
> On Wed, 7 Oct 2020 16:46:10 -0700
> Maciej Żenczykowski wrote:
>
> > > static u32 __bpf_skb_max_len(const struct sk_buff *skb)
> > > {
> > > - return skb->dev ? skb->dev->mtu + skb->dev->hard_header_len :
> > > -
On Wed, 7 Oct 2020 16:46:10 -0700
Maciej Żenczykowski wrote:
> > static u32 __bpf_skb_max_len(const struct sk_buff *skb)
> > {
> > - return skb->dev ? skb->dev->mtu + skb->dev->hard_header_len :
> > - SKB_MAX_ALLOC;
> > + return IP_MAX_MTU;
> > }
>
> Shou
On 10/7/20 6:22 PM, Jesper Dangaard Brouer wrote:
[...]
Signed-off-by: Jesper Dangaard Brouer
(imported from commit 37f8552786cf46588af52b77829b730dd14524d3)
slipped in?
Multiple BPF-helpers that can manipulate/increase the size of the SKB uses
__bpf_skb_max_len() as the max-length. This function limit size against
the current net_device MTU (skb->dev->mtu).
When a BPF-prog grow the packet size, then it should not be limited to the
MTU. The MTU is a transmit limit