From 59150e914165ff290237ce23d3a65d4e78da19e1 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Sat, 29 Apr 2017 08:28:59 +0000 Subject: [PATCH] Propagate IFCAP_LRO from trunk to vlan interface. False positive here cost nothing, while false negative may lead to some confusions. MFC after: 2 weeks Sponsored by: iXsystems, Inc. --- sys/net/if_vlan.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 3d312ae2a54..dbfac38f9bf 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1590,6 +1590,16 @@ vlan_capabilities(struct ifvlan *ifv) hwa |= p->if_hwassist & CSUM_TSO; } + /* + * If the parent interface can do LRO and checksum offloading on + * VLANs, then guess it may do LRO on VLANs. False positive here + * cost nothing, while false negative may lead to some confusions. + */ + if (p->if_capabilities & IFCAP_VLAN_HWCSUM) + cap |= p->if_capabilities & IFCAP_LRO; + if (p->if_capenable & IFCAP_VLAN_HWCSUM) + ena |= p->if_capenable & IFCAP_LRO; + /* * If the parent interface can offload TCP connections over VLANs then * propagate its TOE capability to the VLAN interface.