Date: Tue, 23 Mar 2010 21:43:01 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r205540 - stable/7/sys/dev/msk Message-ID: <201003232143.o2NLh1L8095675@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: yongari Date: Tue Mar 23 21:43:01 2010 New Revision: 205540 URL: http://svn.freebsd.org/changeset/base/205540 Log: MFC r204361-204362: r204361: Reuse the configured LE for VLAN if new LE was created for TSO. Only old controllers need to create new LE for TSO. This change makes TSO work over VLANs. r204362: Add TSO support on VLANs. Controller requires VLAN hardware tagging to make TSO work over VLANs. Modified: stable/7/sys/dev/msk/if_msk.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/msk/if_msk.c ============================================================================== --- stable/7/sys/dev/msk/if_msk.c Tue Mar 23 21:39:33 2010 (r205539) +++ stable/7/sys/dev/msk/if_msk.c Tue Mar 23 21:43:01 2010 (r205540) @@ -1006,11 +1006,6 @@ msk_ioctl(struct ifnet *ifp, u_long comm if ((mask & IFCAP_RXCSUM) != 0 && (IFCAP_RXCSUM & ifp->if_capabilities) != 0) ifp->if_capenable ^= IFCAP_RXCSUM; - if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && - (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) { - ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; - msk_setvlan(sc_if, ifp); - } if ((mask & IFCAP_VLAN_HWCSUM) != 0 && (IFCAP_VLAN_HWCSUM & ifp->if_capabilities) != 0) ifp->if_capenable ^= IFCAP_VLAN_HWCSUM; @@ -1022,6 +1017,16 @@ msk_ioctl(struct ifnet *ifp, u_long comm else ifp->if_hwassist &= ~CSUM_TSO; } + if ((mask & IFCAP_VLAN_HWTSO) != 0 && + (IFCAP_VLAN_HWTSO & ifp->if_capabilities) != 0) + ifp->if_capenable ^= IFCAP_VLAN_HWTSO; + if ((mask & IFCAP_VLAN_HWTAGGING) != 0 && + (IFCAP_VLAN_HWTAGGING & ifp->if_capabilities) != 0) { + ifp->if_capenable ^= IFCAP_VLAN_HWTAGGING; + if ((IFCAP_VLAN_HWTAGGING & ifp->if_capenable) == 0) + ifp->if_capenable &= ~IFCAP_VLAN_HWTSO; + msk_setvlan(sc_if, ifp); + } if (ifp->if_mtu > ETHERMTU && (sc_if->msk_flags & MSK_FLAG_JUMBO_NOCSUM) != 0) { ifp->if_hwassist &= ~(MSK_CSUM_FEATURES | CSUM_TSO); @@ -1561,7 +1566,7 @@ msk_attach(device_t dev) * this workaround does not work so disable checksum offload * for VLAN interface. */ - ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING; + ifp->if_capabilities |= IFCAP_VLAN_HWTAGGING | IFCAP_VLAN_HWTSO; /* * Enable Rx checksum offloading for VLAN taggedd frames * if controller support new descriptor format. @@ -2688,7 +2693,7 @@ msk_encap(struct msk_if_softc *sc_if, st } /* Check if we have a VLAN tag to insert. */ if ((m->m_flags & M_VLANTAG) != 0) { - if (tso == 0) { + if (tx_le == NULL) { tx_le = &sc_if->msk_rdata.msk_tx_ring[prod]; tx_le->msk_addr = htole32(0); tx_le->msk_control = htole32(OP_VLAN | HW_OWNER |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003232143.o2NLh1L8095675>