Re: [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to gre_rcv()

From: Jakub Kicinski
Date: Wed Mar 16 2022 - 00:53:22 EST


On Wed, 16 Mar 2022 12:41:45 +0800 Menglong Dong wrote:
> > On Mon, 14 Mar 2022 21:33:10 +0800 menglong8.dong@xxxxxxxxx wrote:
> > > + reason = SKB_DROP_REASON_NOT_SPECIFIED;
> > > if (!pskb_may_pull(skb, 12))
> > > goto drop;
> >
> > REASON_HDR_TRUNC ?
>
> I'm still not sure about such a 'pskb_pull' failure, whose reasons may be
> complex, such as no memory or packet length too small. I see somewhere
> return a '-NOMEM' when skb pull fails.
>
> So maybe such cases can be ignored? In my opinion, not all skb drops
> need a reason.

Ah, okay, I saw Dave's email as well. I wasn't sure if this omission
was intentional. But if it is, that's fine.