From owner-svn-src-all@FreeBSD.ORG Mon Mar 31 01:55:02 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20CC3363; Mon, 31 Mar 2014 01:55:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C70E610; Mon, 31 Mar 2014 01:55:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2V1t1sb010932; Mon, 31 Mar 2014 01:55:01 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2V1sxXY010836; Mon, 31 Mar 2014 01:54:59 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201403310154.s2V1sxXY010836@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 31 Mar 2014 01:54:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r263957 - in head/sys: dev/age dev/alc dev/ale dev/bce dev/bge dev/fxp dev/jme dev/msk dev/nfe dev/sge pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2014 01:55:02 -0000 Author: yongari Date: Mon Mar 31 01:54:59 2014 New Revision: 263957 URL: http://svnweb.freebsd.org/changeset/base/263957 Log: Increase the number of TX DMA segments from 32 to 35. It turned out 32 is not enough to support a full sized TSO packet. While I'm here fix a long standing bug introduced in r169632 in bce(4) where it didn't include L2 header length of TSO packet in the maximum DMA segment size calculation. In collaboration with: rmacklem MFC after: 2 weeks Modified: head/sys/dev/age/if_agevar.h head/sys/dev/alc/if_alcvar.h head/sys/dev/ale/if_alevar.h head/sys/dev/bce/if_bcereg.h head/sys/dev/bge/if_bgereg.h head/sys/dev/fxp/if_fxpreg.h head/sys/dev/jme/if_jmevar.h head/sys/dev/msk/if_mskreg.h head/sys/dev/nfe/if_nfereg.h head/sys/dev/sge/if_sgereg.h head/sys/pci/if_rlreg.h Modified: head/sys/dev/age/if_agevar.h ============================================================================== --- head/sys/dev/age/if_agevar.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/age/if_agevar.h Mon Mar 31 01:54:59 2014 (r263957) @@ -42,7 +42,7 @@ #define AGE_TSO_MAXSEGSIZE 4096 #define AGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define AGE_MAXTXSEGS 32 +#define AGE_MAXTXSEGS 35 #define AGE_RX_BUF_ALIGN 8 #ifndef __NO_STRICT_ALIGNMENT #define AGE_RX_BUF_SIZE (MCLBYTES - AGE_RX_BUF_ALIGN) Modified: head/sys/dev/alc/if_alcvar.h ============================================================================== --- head/sys/dev/alc/if_alcvar.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/alc/if_alcvar.h Mon Mar 31 01:54:59 2014 (r263957) @@ -42,7 +42,7 @@ #define ALC_TSO_MAXSEGSIZE 4096 #define ALC_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define ALC_MAXTXSEGS 32 +#define ALC_MAXTXSEGS 35 #define ALC_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) #define ALC_ADDR_HI(x) ((uint64_t) (x) >> 32) Modified: head/sys/dev/ale/if_alevar.h ============================================================================== --- head/sys/dev/ale/if_alevar.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/ale/if_alevar.h Mon Mar 31 01:54:59 2014 (r263957) @@ -40,7 +40,7 @@ #define ALE_TSO_MAXSEGSIZE 4096 #define ALE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define ALE_MAXTXSEGS 32 +#define ALE_MAXTXSEGS 35 #define ALE_ADDR_LO(x) ((uint64_t) (x) & 0xFFFFFFFF) #define ALE_ADDR_HI(x) ((uint64_t) (x) >> 32) Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/bce/if_bcereg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -6309,8 +6309,8 @@ struct fw_info { #define BCE_TX_TIMEOUT 5 -#define BCE_MAX_SEGMENTS 32 -#define BCE_TSO_MAX_SIZE 65536 +#define BCE_MAX_SEGMENTS 35 +#define BCE_TSO_MAX_SIZE (65535 + sizeof(struct ether_vlan_header)) #define BCE_TSO_MAX_SEG_SIZE 4096 #define BCE_DMA_ALIGN 8 Modified: head/sys/dev/bge/if_bgereg.h ============================================================================== --- head/sys/dev/bge/if_bgereg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/bge/if_bgereg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -2852,7 +2852,7 @@ struct bge_gib { */ #define BGE_NSEG_JUMBO 4 -#define BGE_NSEG_NEW 32 +#define BGE_NSEG_NEW 35 #define BGE_TSOSEG_SZ 4096 /* Maximum DMA address for controllers that have 40bit DMA address bug. */ Modified: head/sys/dev/fxp/if_fxpreg.h ============================================================================== --- head/sys/dev/fxp/if_fxpreg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/fxp/if_fxpreg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -250,7 +250,7 @@ struct fxp_cb_ucode { /* * Number of DMA segments in a TxCB. */ -#define FXP_NTXSEG 32 +#define FXP_NTXSEG 35 struct fxp_tbd { uint32_t tb_addr; Modified: head/sys/dev/jme/if_jmevar.h ============================================================================== --- head/sys/dev/jme/if_jmevar.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/jme/if_jmevar.h Mon Mar 31 01:54:59 2014 (r263957) @@ -49,7 +49,7 @@ #define JME_RX_RING_ALIGN 16 #define JME_TSO_MAXSEGSIZE 4096 #define JME_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) -#define JME_MAXTXSEGS 32 +#define JME_MAXTXSEGS 35 #define JME_RX_BUF_ALIGN sizeof(uint64_t) #define JME_SSB_ALIGN 16 Modified: head/sys/dev/msk/if_mskreg.h ============================================================================== --- head/sys/dev/msk/if_mskreg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/msk/if_mskreg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -2338,7 +2338,7 @@ struct msk_stat_desc { #endif #define MSK_RX_BUF_ALIGN 8 #define MSK_JUMBO_RX_RING_CNT MSK_RX_RING_CNT -#define MSK_MAXTXSEGS 32 +#define MSK_MAXTXSEGS 35 #define MSK_TSO_MAXSGSIZE 4096 #define MSK_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) Modified: head/sys/dev/nfe/if_nfereg.h ============================================================================== --- head/sys/dev/nfe/if_nfereg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/nfe/if_nfereg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -40,7 +40,7 @@ (NFE_JUMBO_FRAMELEN - NFE_RX_HEADERS) #define NFE_MIN_FRAMELEN (ETHER_MIN_LEN - ETHER_CRC_LEN) -#define NFE_MAX_SCATTER 32 +#define NFE_MAX_SCATTER 35 #define NFE_TSO_MAXSGSIZE 4096 #define NFE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) Modified: head/sys/dev/sge/if_sgereg.h ============================================================================== --- head/sys/dev/sge/if_sgereg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/dev/sge/if_sgereg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -284,7 +284,7 @@ struct sge_desc { #define SGE_RX_RING_CNT 256 /* [8, 1024] */ #define SGE_TX_RING_CNT 256 /* [8, 8192] */ #define SGE_DESC_ALIGN 16 -#define SGE_MAXTXSEGS 32 +#define SGE_MAXTXSEGS 35 #define SGE_TSO_MAXSIZE (65535 + sizeof(struct ether_vlan_header)) #define SGE_TSO_MAXSEGSIZE 4096 #define SGE_RX_BUF_ALIGN sizeof(uint64_t) Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Mon Mar 31 01:04:40 2014 (r263956) +++ head/sys/pci/if_rlreg.h Mon Mar 31 01:54:59 2014 (r263957) @@ -776,7 +776,7 @@ struct rl_stats { #define RL_TX_DESC_CNT RL_8169_TX_DESC_CNT #define RL_RX_DESC_CNT RL_8169_RX_DESC_CNT #define RL_RX_JUMBO_DESC_CNT RL_RX_DESC_CNT -#define RL_NTXSEGS 32 +#define RL_NTXSEGS 35 #define RL_RING_ALIGN 256 #define RL_DUMP_ALIGN 64