From: qingfang.deng@linux.dev
To: "Simon Horman" <horms@kernel.org>
Cc: linux-ppp@vger.kernel.org, "Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"Paul Mackerras" <paulus@ozlabs.org>,
"Jaco Kroon" <jaco@uls.co.za>,
"James Carlson" <carlsonj@workingcode.com>,
"Wojciech Drewek" <wojciech.drewek@intel.com>,
"Guillaume Nault" <gnault@redhat.com>
Subject: Re: [PATCH net-next] pppoe: drop PFC frames
Date: Tue, 07 Apr 2026 03:19:45 +0000 [thread overview]
Message-ID: <e3ada3f0bb0c389d592657b37c462944e633a0d6@linux.dev> (raw)
In-Reply-To: <20260406144828.GH395680@kernel.org>
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
prev parent reply other threads:[~2026-04-07 3:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-03 8:39 [PATCH net-next] pppoe: drop PFC frames Qingfang Deng
2026-04-06 14:48 ` Simon Horman
2026-04-07 3:19 ` qingfang.deng [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e3ada3f0bb0c389d592657b37c462944e633a0d6@linux.dev \
--to=qingfang.deng@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=carlsonj@workingcode.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gnault@redhat.com \
--cc=horms@kernel.org \
--cc=jaco@uls.co.za \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ppp@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=paulus@ozlabs.org \
--cc=wojciech.drewek@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox