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?