From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37EF7C47073 for ; Wed, 3 Jan 2024 20:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+kANSQTLgbzARSLqQS4dnu30n2t2NK8GU9wUel5eGP0=; b=c07oVq/m3veGik nhVZ6PY7kCf3XbAHLgfHZ9TQvsAPC8yfs5g++lJAx9MkyvzHWshiNgjitLhwh9eB05XCatOsXKig4 vQSb0B2XC8Ev1NOoRviuMtqBPlxLDjYoSgc0trrahrujVeU25NmAtA5bcZ7aluXDM2P75x6mZmGcY HFpyREo/+e0z/rnDgUJG39/0VqLDRsfx5FDFaTecBQW1Xi4W19ZWnkcjhU+EsLKMWs/WwulmfN4by DIjRzpY4/DCvbS4PBt5TZB8e4w4ixCciIpnwz3gCCbk35wxC361Odf3g2/EMOPSd37rUqXSUNxuY1 Vu3TQ7fsKdxA4+vFNzig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rL7ZN-00C07t-2K; Wed, 03 Jan 2024 20:10:29 +0000 Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rL7ZK-00C07S-27 for linux-arm-kernel@lists.infradead.org; Wed, 03 Jan 2024 20:10:27 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-55539cac143so7676264a12.0 for ; Wed, 03 Jan 2024 12:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704312624; x=1704917424; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=TEWitAjG0rxRY6xuTFfAPPp0IKF7z0xEqu0WIKnmO8Q=; b=nghDaQiocOP2qXSWiPn9NLdN0Fjzt0HEPvgpAjWtNPQ0H9F3YjiPQkWi7xAIgU++PX R2hlThMV6UDuo5D2RG6PtIpPMmYvit6rt8WgrIuwBcMFQArR6Zr6SCtNT2W8a/wHiNAF caZrFJYJLCyaaCfCD2l00FJamuyOHimrO/tFdY85bqZKDg0GgHJvduZ7gfbuKop06gqu Hzx6GXeKsEUo8uOt9sZBoQ8BOA0Rei7QBq/Ehdr88cXWd93M+o0Gmzp9BG+FlCKEbrfc 39I3ajHDhmTmpsqWSz8EtZFdjjpLq+Bd0sLRd8uVdD5UpMAB5cQFzPh89sLIdYg8Xi01 2uvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704312624; x=1704917424; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TEWitAjG0rxRY6xuTFfAPPp0IKF7z0xEqu0WIKnmO8Q=; b=O8vdbe/MU3Qh/YxD3WgN48+q+c3i3eSc+tsNvWxNzHcKznTc16cRH8yuSMUBUbfGZ+ /eTrWtuUCf2tFd+OGviDTfXeyfC+guKtRGWB6Jq4xqfLC0+Qc2awlfe5Xnoton8o2qmK gf8AWDLQAyrdLyPDWmS1HbHz+YQhJqDyc5O6T10MdcbUiF9/UhPPP2/jET2LeFCPmdhp kyGaO33z/Cw/0YBUXKMn6f5pbkftF7VAqHRsDxukJbQYxcHjRexSyAR/VwSTddLAaIHq BCiyLACqOLWTQSHuOqTCH80S7qhGR8psRvm9BG58xQLECEv3AEIbGSheu/VFWzEJzejp dtow== X-Gm-Message-State: AOJu0Yy54Zkk31YxG8jptuIvEu72Cfh7eKDjGr9KEOE3BzrgLo+e/szj ZxBpEYhKBiw8osNQ2IqQX3o= X-Google-Smtp-Source: AGHT+IGJGoQUOiSvT4Z+HaGOUOb+1C6AsGCUQxkqJHEOh2dvB4IyhyPYb3StWVhA73AfEXnqgJITYg== X-Received: by 2002:a17:906:1db:b0:a26:8c3a:5133 with SMTP id 27-20020a17090601db00b00a268c3a5133mr7854783ejj.99.1704312623657; Wed, 03 Jan 2024 12:10:23 -0800 (PST) Received: from skbuf ([188.25.255.36]) by smtp.gmail.com with ESMTPSA id vp23-20020a17090712d700b00a27e4d34455sm3625721ejb.183.2024.01.03.12.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 12:10:23 -0800 (PST) Date: Wed, 3 Jan 2024 22:10:21 +0200 From: Vladimir Oltean To: Romain Gantois Cc: Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Miquel Raynal , Maxime Chevallier , Sylvain Girard , Andrew Lunn , Pascal EBERHARD , Richard Tresidder , Linus Walleij , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH net v2 1/1] net: stmmac: Prevent DSA tags from breaking COE on stmmac Message-ID: <20240103201021.2ixxndfqe622afnf@skbuf> References: <20240102162718.268271-1-romain.gantois@bootlin.com> <20240102162718.268271-1-romain.gantois@bootlin.com> <20240102162718.268271-2-romain.gantois@bootlin.com> <20240102162718.268271-2-romain.gantois@bootlin.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240102162718.268271-2-romain.gantois@bootlin.com> <20240102162718.268271-2-romain.gantois@bootlin.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240103_121026_700721_FAC90141 X-CRM114-Status: GOOD ( 10.77 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 02, 2024 at 05:27:15PM +0100, Romain Gantois wrote: > +/* Check if ethertype will trigger IP > + * header checks/COE in hardware > + */ > +static inline bool stmmac_has_ip_ethertype(struct sk_buff *skb) > +{ > + __be16 proto = eth_header_parse_protocol(skb); > + > + return (proto == htons(ETH_P_IP)) || (proto == htons(ETH_P_IPV6)) || > + (proto == htons(ETH_P_8021Q)); proto == htons(ETH_P_8021Q) means that the skb has an IP EtherType? What if an IP header does not follow after the VLAN header? > +} _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel