Thread (9 messages) 9 messages, 4 authors, 2016-09-30

RE: [PATCH RFC 1/3] net: Add dev_set_env_hdr_len to accept envelope frames

flat view

From: Mintz, Yuval <hidden>
Date: 2016-09-27 14:39:18

quoted hunk ↗ jump to hunk
+/* return envelope header length */
+static inline int netif_get_env_hdr_len(struct net_device *dev) {
+	if (dev->netdev_ops->ndo_set_env_hdr_len)
+		return dev->env_hdr_len;
+
+	if (netif_reduces_vlan_mtu(dev))
+		return 0;
+
+	return 4; /* VLAN_HLEN */
+}
Why claim that `4' is the default?
What's the benefit of propagating this value to userspace if
driver doesn't actually support it?

Assuming this *is* a good default [meaning your analysis indicated
basically every driver has at least so many octets reserved]
perhaps we should consider initializing the env_hdr_len in some
common function [e.g., in setup_ether() next to the mtu] to this value?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help