Re: [PATCH net-next] pppoe: drop PFC frames

Paolo Abeni <[email protected]> Tue, 7 Apr 2026 13:05:16 +0200
Newsgroups gmane.linux.network,gmane.linux.ppp,gmane.linux.kernel
Message-ID <[email protected]>
On 4/7/26 5:19 AM, [email protected] wrote:
> April 6, 2026 at 10:48 PM, Simon Horman wrote:
>> 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?

The helper LGTM, and could be re-used in ppp_generic.c, too.

/P