[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240103201021.2ixxndfqe622afnf@skbuf>
Date: Wed, 3 Jan 2024 22:10:21 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Sylvain Girard <sylvain.girard@...com>,
Andrew Lunn <andrew@...n.ch>,
Pascal EBERHARD <pascal.eberhard@...com>,
Richard Tresidder <rtresidd@...ctromag.com.au>,
Linus Walleij <linus.walleij@...aro.org>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, stable@...r.kernel.org
Subject: Re: [PATCH net v2 1/1] net: stmmac: Prevent DSA tags from breaking
COE on stmmac
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?
> +}
Powered by blists - more mailing lists