From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 E067D2DC76C; Sat, 11 Apr 2026 03:56:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775879805; cv=none; b=MgzXvNpcSULmVNt4UQVCr/dbC6Yl/5J11C8wgbsapWsyLBpxiDynd0/9Eh3aiILZI4Ac+v9x4sOifhXjDwKpQmKZQH0A71doJ/GolBZyc8j77P2mveEwKugwbYdewN+FSWZQkiu/QbGEKVIAD9/m50q3JH0SaCxQgd88ymj+6v8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775879805; c=relaxed/simple; bh=gY9BX8ndo1Au+FLkia0CIopO9z3f3s85O6n/lIdCgn0=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=mlFPR2Q8i7g6zuCr5cOEUX+znwVCUFnyizx9n1RfxhHbDN07XKQfhr1rIpFKjd9jsrTNT8rWuPglNYGZ8rXTd2+7bZ/Y7MBmws1YTXObUEvSYFUJnHwajr15F4mNMNgVVUF/iUW3LxM1ERL95nlzrEEpNS5P/5Jvh3BIOKUPheo= 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=GfUBydho; arc=none smtp.client-ip=95.215.58.180 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="GfUBydho" Message-ID: <717da5ac-a020-4710-8ebb-6ed9d6e48bf4@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1775879801; 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=kdhw0jGWtJDqj6BYFvHj/GHFWDSmVSSZj7ntCKNRU8Q=; b=GfUBydhoGNgk4jsdYDiiN1CvIryl7zksbqLZP+kFxJN62lJuOoNkn5CSx2+1g1EncpWFAz b19sl/XeVRI2TOzZLPjEbyDhNDaa41rcws8gzNjl40x5P5tqVYIBcXoHwpNdQMBfhkYtww Qsc5x6dMb9wCwNdd/h5mQh1F8dvL/Zk= Date: Sat, 11 Apr 2026 11:56:30 +0800 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net v4 1/2] flow_dissector: do not dissect PPPoE PFC frames To: Simon Horman Cc: linux-ppp@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Guillaume Nault , Wojciech Drewek , Tony Nguyen , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Paul Mackerras , Jaco Kroon , James Carlson , Marcin Szycik References: <20260410033627.93786-1-qingfang.deng@linux.dev> <20260410171056.GD469338@kernel.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Qingfang Deng In-Reply-To: <20260410171056.GD469338@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Hi, On 4/11/2026 1:10 AM, Simon Horman wrote: > On Fri, Apr 10, 2026 at 11:36:20AM +0800, Qingfang Deng wrote: >> @@ -1361,7 +1376,7 @@ bool __skb_flow_dissect(const struct net *net, >> struct pppoe_hdr hdr; >> __be16 proto; >> } *hdr, _hdr; >> - u16 ppp_proto; >> + __be16 ppp_proto; > > I'm unclear of the relationship between changing the type of ppp_proto > and the problem described in the patch description. And it > is creating a log of churn in this patch. I suggest dropping it. The intention is to restore the original behavior before the blamed commit. If you find it too verbose for a fix, I can drop it and then repost that part later to net-next. >> @@ -1374,27 +1389,19 @@ bool __skb_flow_dissect(const struct net *net, >> break; >> } >> >> - /* least significant bit of the most significant octet >> - * indicates if protocol field was compressed >> - */ >> - ppp_proto = ntohs(hdr->proto); >> - if (ppp_proto & 0x0100) { >> - ppp_proto = ppp_proto >> 8; >> - nhoff += PPPOE_SES_HLEN - 1; >> - } else { >> - nhoff += PPPOE_SES_HLEN; >> - } > > Could we go for something like this? > > ppp_proto = ntohs(hdr->proto); > nhoff += PPPOE_SES_HLEN; > > /* Explanation of what is going on */ > if (ppp_proto & 0x0100) > ppp_proto = some invalid value like 0 > I think it is redundant. ppp_proto_is_valid() already requires uncompressed frames. >> + ppp_proto = hdr->proto; >> + nhoff += PPPOE_SES_HLEN; >> >> - if (ppp_proto == PPP_IP) { >> + if (ppp_proto == htons(PPP_IP)) { >> proto = htons(ETH_P_IP); >> fdret = FLOW_DISSECT_RET_PROTO_AGAIN; >> - } else if (ppp_proto == PPP_IPV6) { >> + } else if (ppp_proto == htons(PPP_IPV6)) { >> proto = htons(ETH_P_IPV6); >> fdret = FLOW_DISSECT_RET_PROTO_AGAIN; >> - } else if (ppp_proto == PPP_MPLS_UC) { >> + } else if (ppp_proto == htons(PPP_MPLS_UC)) { >> proto = htons(ETH_P_MPLS_UC); >> fdret = FLOW_DISSECT_RET_PROTO_AGAIN; >> - } else if (ppp_proto == PPP_MPLS_MC) { >> + } else if (ppp_proto == htons(PPP_MPLS_MC)) { >> proto = htons(ETH_P_MPLS_MC); >> fdret = FLOW_DISSECT_RET_PROTO_AGAIN; >> } else if (ppp_proto_is_valid(ppp_proto)) {