Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Sep 2016 08:30:48 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305827 - head/sys/dev/cxgbe
Message-ID:  <201609150830.u8F8UmxS076057@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Thu Sep 15 08:30:47 2016
New Revision: 305827
URL: https://svnweb.freebsd.org/changeset/base/305827

Log:
  cxgbe(4): Use the interface's viid to calculate the PF/VF/VFValid fields
  to use in tx work requests.

Modified:
  head/sys/dev/cxgbe/t4_sge.c

Modified: head/sys/dev/cxgbe/t4_sge.c
==============================================================================
--- head/sys/dev/cxgbe/t4_sge.c	Thu Sep 15 08:26:59 2016	(r305826)
+++ head/sys/dev/cxgbe/t4_sge.c	Thu Sep 15 08:30:47 2016	(r305827)
@@ -3253,8 +3253,9 @@ alloc_nm_txq(struct vi_info *vi, struct 
 	nm_txq->nid = idx;
 	nm_txq->iqidx = iqidx;
 	nm_txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) |
-	    V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_VF_VLD(1) |
-	    V_TXPKT_VF(vi->viid));
+	    V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_PF(G_FW_VIID_PFN(vi->viid)) |
+	    V_TXPKT_VF(G_FW_VIID_VIN(vi->viid)) |
+	    V_TXPKT_VF_VLD(G_FW_VIID_VIVLD(vi->viid)));
 
 	snprintf(name, sizeof(name), "%d", idx);
 	oid = SYSCTL_ADD_NODE(&vi->ctx, children, OID_AUTO, name, CTLFLAG_RD,
@@ -3620,8 +3621,10 @@ alloc_txq(struct vi_info *vi, struct sge
 		    V_TXPKT_INTF(pi->tx_chan));
 	else
 		txq->cpl_ctrl0 = htobe32(V_TXPKT_OPCODE(CPL_TX_PKT) |
-		    V_TXPKT_INTF(pi->tx_chan) | V_TXPKT_VF_VLD(1) |
-		    V_TXPKT_VF(vi->viid));
+		    V_TXPKT_INTF(pi->tx_chan) |
+		    V_TXPKT_PF(G_FW_VIID_PFN(vi->viid)) |
+		    V_TXPKT_VF(G_FW_VIID_VIN(vi->viid)) |
+		    V_TXPKT_VF_VLD(G_FW_VIID_VIVLD(vi->viid)));
 	txq->tc_idx = -1;
 	txq->sdesc = malloc(eq->sidx * sizeof(struct tx_sdesc), M_CXGBE,
 	    M_ZERO | M_WAITOK);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609150830.u8F8UmxS076057>