From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-173.mta1.migadu.com (out-173.mta1.migadu.com [95.215.58.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 505E534DB74 for ; Tue, 7 Apr 2026 03:20:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775532003; cv=none; b=s9h4bwY/SYAjAaL2QjqVNdbV60H8dD+L5cZQrvnRTXN5tRIWV3/wLKPgTtpI4feNQrX2CaDBzHyYe1tBM1zi9wqwc6p3CUQvhw2fU0z8NoqPNERtG0NtlT1jiItc4tbdzMtcI9KhEjbSvoE/TSEmaURiUzbczPZfUavlMfaSZXU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775532003; c=relaxed/simple; bh=Qoc9FcsWY0971Mtxw9re92jKrcBSoFbO9WY3rC0dWAM=; h=MIME-Version:Date:Content-Type:From:Message-ID:Subject:To:Cc: In-Reply-To:References; b=J1SgzKzhm4EBNEPZDLsDsrvgTv16VjujoUNFu66w1rWA4AYLOqrZzyW7hNkljVsfHaZIaloZ2q1yk51XD/v0xa6c0jDqTHuzkVLLEIq84b1S5LDgBEgGRYbrrv5O6WpBKpBb9IQH9y/sKN5RB+7wZ13QMYBcZ2P5M7eNsjYko+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=U6yLraf8; arc=none smtp.client-ip=95.215.58.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="U6yLraf8" Precedence: bulk X-Mailing-List: linux-ppp@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1775531990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q3AInkdi6HcxeRmbGw4wszTC0bpMLALoEye9TJbgSw4=; b=U6yLraf8ZRVDW9ugsvvSN+oW6/LAKe+N2WbcSslZPfUGjTdAmROE0d/BvsJpNoBgUYDC+R SKDeXyqLvaPE7bhHN463+P2ql1fb3ec8VfG1CCKZMkK73ZCiakwAXyL88MIp5kLnWyzUXG z7+Gyza4Vh11bKoA6Ski6dJcF0wbFxY= Date: Tue, 07 Apr 2026 03:19:45 +0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: qingfang.deng@linux.dev Message-ID: TLS-Required: No Subject: Re: [PATCH net-next] pppoe: drop PFC frames To: "Simon Horman" Cc: linux-ppp@vger.kernel.org, "Andrew Lunn" , "David S. Miller" , "Eric Dumazet" , "Jakub Kicinski" , "Paolo Abeni" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Paul Mackerras" , "Jaco Kroon" , "James Carlson" , "Wojciech Drewek" , "Guillaume Nault" In-Reply-To: <20260406144828.GH395680@kernel.org> References: <20260403083926.68320-1-qingfang.deng@linux.dev> <20260406144828.GH395680@kernel.org> X-Migadu-Flow: FLOW_OUT Hi, April 6, 2026 at 10:48 PM, Simon Horman wrote: >=20 >=20Hi, >=20 >=20I 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= =20 first=20octet is used to test if the protocol field is compressed, and th= e=20 same=20code 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