Re: [PATCH net-next] pppoe: drop PFC frames
From: qingfang . deng
Date: Mon Apr 06 2026 - 23:29:09 EST
Hi,
April 6, 2026 at 10:48 PM, Simon Horman wrote:
>
> Hi,
>
> I think it would be best to add/use a #define rather than
> open coding the magic value 0x01. And perhaps expanding
> the comment to note that skb->data[0] is the first byte
> of the PPP protocol would be nice too.
The field does not have a canonical name. As per RFC1661, the LSB of the
first octet is used to test if the protocol field is compressed, and the
same code snippet is used in ppp_generic.c.
I could instead add a helper function:
static inline bool ppp_skb_is_compressed_proto(const struct sk_buff *skb)
{
return skb->data[0] & 0x01;
}
What do you think?
Regards,
Qingfang