Thread (23 messages) 23 messages, 6 authors, 2023-07-22

Re: [Enable Designware XGMAC VLAN Stripping Feature 2/2] net: stmmac: dwxgmac2: Add support for HW-accelerated VLAN Stripping

From: Krzysztof Kozlowski <krzk@kernel.org>
Date: 2023-07-21 16:27:32
Also in: lkml, netdev

On 21/07/2023 17:59, Florian Fainelli wrote:
quoted
quoted
quoted
+	/* Rx VLAN HW Stripping */
+	if (of_property_read_bool(np, "snps,rx-vlan-offload")) {
+		dev_info(&pdev->dev, "RX VLAN HW Stripping\n");
Why? Drop.
This is an dts option export to dts for user to choose whether or not they
Want a Hardware stripping or a software stripping.

May I know what is the reason to drop this?
Because the networking stack already exposes knobs for drivers to 
advertise and control VLAN stripping/insertion on RX/TX using ethtool 
and feature bits (NETIF_F_HW_VLAN_CTAG_RX, NETIF_F_HW_VLAN_CTAG_TX).

What you are doing here is encode a policy as a Device Tree property 
rather than describe whether the hardware supports a given feature and 
this is frowned upon.
That's even better reason...

Best regards,
Krzysztof


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help