Re: [PATCH net-next] pppoe: drop PFC frames
[email protected] Tue, 07 Apr 2026 03:19:45 +0000
| Newsgroups | org.kernel.vger.linux-ppp,org.kernel.vger.linux-kernel,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
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