Thread (8 messages) flat view 8 messages, 3 authors, 2021-06-16

Re: [PATCH net-next 1/2] net: marvell: Implement TC flower offload

From: Vladimir Oltean <olteanv@gmail.com>
Date: 2021-06-16 00:55:00
Also in: lkml

On Tue, Jun 15, 2021 at 03:54:43PM +0300, Vadym Kochan wrote:
+static int prestera_port_set_features(struct net_device *dev,
+				      netdev_features_t features)
+{
+	netdev_features_t oper_features = dev->features;
+	int err;
+
+	err = prestera_port_handle_feature(dev, features, NETIF_F_HW_TC,
+					   prestera_port_feature_hw_tc);
Why do you even make NETIF_F_HW_TC able to be toggled and not just fixed
to "on" in dev->features? If I understand correctly, you could then delete
a bunch of refcounting code whose only purpose is to allow that feature
to be disabled per port.
+
+	if (err) {
+		dev->features = oper_features;
+		return -EINVAL;
+	}
+
+	return 0;
+}
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help