Date: Tue, 03 Sep 2019 14:05:46 -0000 From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r345586 - stable/12/sys/dev/cxgbe Message-ID: <201903271822.x2RIM9va038265@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Wed Mar 27 18:22:08 2019 New Revision: 345586 URL: https://svnweb.freebsd.org/changeset/base/345586 Log: MFC r339628: cxgbe(4): improve the accuracy of various TSO limits reported to the kernel. Sponsored by: Chelsio Communications Modified: stable/12/sys/dev/cxgbe/adapter.h stable/12/sys/dev/cxgbe/t4_main.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/dev/cxgbe/adapter.h ============================================================================== --- stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 18:03:34 2019 (r345585) +++ stable/12/sys/dev/cxgbe/adapter.h Wed Mar 27 18:22:08 2019 (r345586) @@ -116,6 +116,7 @@ enum { SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in desc */ TX_SGL_SEGS = 39, TX_SGL_SEGS_TSO = 38, + TX_SGL_SEGS_EO_TSO = 30, /* XXX: lower for IPv6. */ TX_WR_FLITS = SGE_MAX_WR_LEN / 8 }; Modified: stable/12/sys/dev/cxgbe/t4_main.c ============================================================================== --- stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 18:03:34 2019 (r345585) +++ stable/12/sys/dev/cxgbe/t4_main.c Wed Mar 27 18:22:08 2019 (r345586) @@ -63,6 +63,8 @@ __FBSDID("$FreeBSD$"); #ifdef RSS #include <net/rss_config.h> #endif +#include <netinet/in.h> +#include <netinet/ip.h> #if defined(__i386__) || defined(__amd64__) #include <machine/md_var.h> #include <machine/cputypes.h> @@ -1653,9 +1655,13 @@ cxgbe_vi_attach(device_t dev, struct vi_info *vi) ifp->if_hwassist = CSUM_TCP | CSUM_UDP | CSUM_IP | CSUM_TSO | CSUM_UDP_IPV6 | CSUM_TCP_IPV6; - ifp->if_hw_tsomax = 65536 - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN); - ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS; - ifp->if_hw_tsomaxsegsize = 65536; + ifp->if_hw_tsomax = IP_MAXPACKET; + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_TSO; +#ifdef RATELIMIT + if (is_ethoffload(vi->pi->adapter) && vi->nofldtxq != 0) + ifp->if_hw_tsomaxsegcount = TX_SGL_SEGS_EO_TSO; +#endif + ifp->if_hw_tsomaxsegsize = 0; ether_ifattach(ifp, vi->hw_addr); #ifdef DEV_NETMAP
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903271822.x2RIM9va038265>