svn commit: r293955 - in stable/10/sys/dev/sfxge: . common

Andrew Rybchenko arybchik at FreeBSD.org
Thu Jan 14 15:16:26 UTC 2016


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"));


More information about the svn-src-all mailing list