From owner-svn-src-stable@freebsd.org Thu Jan 14 15:16:26 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 35192A81AA7; Thu, 14 Jan 2016 15:16:26 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 0C67B14E0; Thu, 14 Jan 2016 15:16:25 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0EFGOKY039828; Thu, 14 Jan 2016 15:16:24 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0EFGOSA039824; Thu, 14 Jan 2016 15:16:24 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201601141516.u0EFGOSA039824@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 Jan 2016 15:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293955 - in stable/10/sys/dev/sfxge: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 15:16:26 -0000 Author: arybchik Date: Thu Jan 14 15:16:24 2016 New Revision: 293955 URL: https://svnweb.freebsd.org/changeset/base/293955 Log: MFC r291924 sfxge: switch to TxQ creation specific flags It is better do not mix TxQ creation and receive event flags since only checksum flags are applicable to TxQ. Also it will allow to add a new TxQ creation specific flags. Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/common/efx.h stable/10/sys/dev/sfxge/common/efx_tx.c stable/10/sys/dev/sfxge/common/hunt_tx.c stable/10/sys/dev/sfxge/sfxge_tx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/common/efx.h ============================================================================== --- stable/10/sys/dev/sfxge/common/efx.h Thu Jan 14 15:15:01 2016 (r293954) +++ stable/10/sys/dev/sfxge/common/efx.h Thu Jan 14 15:16:24 2016 (r293955) @@ -2028,6 +2028,9 @@ efx_tx_fini( #define EFX_TXQ_MAX_BUFS 8 /* Maximum independent of EFX_BUG35388_WORKAROUND. */ +#define EFX_TXQ_CKSUM_IPV4 0x0001 +#define EFX_TXQ_CKSUM_TCPUDP 0x0002 + extern __checkReturn efx_rc_t efx_tx_qcreate( __in efx_nic_t *enp, Modified: stable/10/sys/dev/sfxge/common/efx_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/efx_tx.c Thu Jan 14 15:15:01 2016 (r293954) +++ stable/10/sys/dev/sfxge/common/efx_tx.c Thu Jan 14 15:16:24 2016 (r293955) @@ -921,9 +921,9 @@ falconsiena_tx_qcreate( EFX_SET_OWORD_FIELD(oword, FRF_BZ_TX_NON_IP_DROP_DIS, 1); EFX_SET_OWORD_FIELD(oword, FRF_BZ_TX_IP_CHKSM_DIS, - (flags & EFX_CKSUM_IPV4) ? 0 : 1); + (flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1); EFX_SET_OWORD_FIELD(oword, FRF_BZ_TX_TCP_CHKSM_DIS, - (flags & EFX_CKSUM_TCPUDP) ? 0 : 1); + (flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1); EFX_BAR_TBL_WRITEO(enp, FR_AZ_TX_DESC_PTR_TBL, etp->et_index, &oword, B_TRUE); Modified: stable/10/sys/dev/sfxge/common/hunt_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/common/hunt_tx.c Thu Jan 14 15:15:01 2016 (r293954) +++ stable/10/sys/dev/sfxge/common/hunt_tx.c Thu Jan 14 15:16:24 2016 (r293955) @@ -90,8 +90,10 @@ efx_mcdi_init_txq( MCDI_IN_POPULATE_DWORD_6(req, INIT_TXQ_IN_FLAGS, INIT_TXQ_IN_FLAG_BUFF_MODE, 0, - INIT_TXQ_IN_FLAG_IP_CSUM_DIS, (flags & EFX_CKSUM_IPV4) ? 0 : 1, - INIT_TXQ_IN_FLAG_TCP_CSUM_DIS, (flags & EFX_CKSUM_TCPUDP) ? 0 : 1, + INIT_TXQ_IN_FLAG_IP_CSUM_DIS, + (flags & EFX_TXQ_CKSUM_IPV4) ? 0 : 1, + INIT_TXQ_IN_FLAG_TCP_CSUM_DIS, + (flags & EFX_TXQ_CKSUM_TCPUDP) ? 0 : 1, INIT_TXQ_IN_FLAG_TCP_UDP_ONLY, 0, INIT_TXQ_IN_CRC_MODE, 0, INIT_TXQ_IN_FLAG_TIMESTAMP, 0); @@ -210,8 +212,10 @@ hunt_tx_qcreate( EFX_POPULATE_QWORD_4(desc, ESF_DZ_TX_DESC_IS_OPT, 1, ESF_DZ_TX_OPTION_TYPE, ESE_DZ_TX_OPTION_DESC_CRC_CSUM, - ESF_DZ_TX_OPTION_UDP_TCP_CSUM, (flags & EFX_CKSUM_TCPUDP) ? 1 : 0, - ESF_DZ_TX_OPTION_IP_CSUM, (flags & EFX_CKSUM_IPV4) ? 1 : 0); + ESF_DZ_TX_OPTION_UDP_TCP_CSUM, + (flags & EFX_TXQ_CKSUM_TCPUDP) ? 1 : 0, + ESF_DZ_TX_OPTION_IP_CSUM, + (flags & EFX_TXQ_CKSUM_IPV4) ? 1 : 0); EFSYS_MEM_WRITEQ(etp->et_esmp, 0, &desc); hunt_tx_qpush(etp, *addedp, 0); Modified: stable/10/sys/dev/sfxge/sfxge_tx.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge_tx.c Thu Jan 14 15:15:01 2016 (r293954) +++ stable/10/sys/dev/sfxge/sfxge_tx.c Thu Jan 14 15:16:24 2016 (r293955) @@ -1439,10 +1439,10 @@ sfxge_tx_qstart(struct sfxge_softc *sc, flags = 0; break; case SFXGE_TXQ_IP_CKSUM: - flags = EFX_CKSUM_IPV4; + flags = EFX_TXQ_CKSUM_IPV4; break; case SFXGE_TXQ_IP_TCP_UDP_CKSUM: - flags = EFX_CKSUM_IPV4 | EFX_CKSUM_TCPUDP; + flags = EFX_TXQ_CKSUM_IPV4 | EFX_TXQ_CKSUM_TCPUDP; break; default: KASSERT(0, ("Impossible TX queue"));