[Midnightbsd-cvs] src [8817] trunk/sys: fix some flags and minor things related to transparent mode

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 23:39:03 EDT 2016


Revision: 8817
          http://svnweb.midnightbsd.org/src/?rev=8817
Author:   laffer1
Date:     2016-09-25 23:39:03 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
fix some flags and minor things related to transparent mode

Modified Paths:
--------------
    trunk/sys/dev/netmap/ixgbe_netmap.h
    trunk/sys/net/netmap.h

Modified: trunk/sys/dev/netmap/ixgbe_netmap.h
===================================================================
--- trunk/sys/dev/netmap/ixgbe_netmap.h	2016-09-26 03:38:14 UTC (rev 8816)
+++ trunk/sys/dev/netmap/ixgbe_netmap.h	2016-09-26 03:39:03 UTC (rev 8817)
@@ -63,9 +63,6 @@
  *	This is tricky, much better to use TDH for now.
  */
 SYSCTL_DECL(_dev_netmap);
-static int ix_write_len;
-SYSCTL_INT(_dev_netmap, OID_AUTO, ix_write_len,
-    CTLFLAG_RW, &ix_write_len, 0, "write rx len");
 static int ix_rx_miss, ix_rx_miss_bufs, ix_use_dd, ix_crcstrip;
 SYSCTL_INT(_dev_netmap, OID_AUTO, ix_crcstrip,
     CTLFLAG_RW, &ix_crcstrip, 0, "strip CRC on rx frames");
@@ -236,7 +233,7 @@
 	 * seems very expensive, so we interrupt once every half ring,
 	 * or when requested with NS_REPORT
 	 */
-	int report_frequency = kring->nkr_num_slots >> 1;
+	u_int report_frequency = kring->nkr_num_slots >> 1;
 
 	if (k > lim)
 		return netmap_ring_reinit(kring);
@@ -485,12 +482,9 @@
 	 * rxr->next_to_check is set to 0 on a ring reinit
 	 */
 	if (netmap_no_pendintr || force_update) {
-		/* XXX apparently the length field in advanced descriptors
-		 * does not include the CRC irrespective of the setting
-		 * of CRCSTRIP. The data sheets say differently.
-		 * Very strange.
-		 */
 		int crclen = ix_crcstrip ? 0 : 4;
+		uint16_t slot_flags = kring->nkr_slot_flags;
+
 		l = rxr->next_to_check;
 		j = netmap_idx_n2k(kring, l);
 
@@ -501,8 +495,7 @@
 			if ((staterr & IXGBE_RXD_STAT_DD) == 0)
 				break;
 			ring->slot[j].len = le16toh(curr->wb.upper.length) - crclen;
-			if (ix_write_len)
-				D("rx[%d] len %d", j, ring->slot[j].len);
+			ring->slot[j].flags = slot_flags;
 			bus_dmamap_sync(rxr->ptag,
 			    rxr->rx_buffers[l].pmap, BUS_DMASYNC_POSTREAD);
 			j = (j == lim) ? 0 : j + 1;

Modified: trunk/sys/net/netmap.h
===================================================================
--- trunk/sys/net/netmap.h	2016-09-26 03:38:14 UTC (rev 8816)
+++ trunk/sys/net/netmap.h	2016-09-26 03:39:03 UTC (rev 8817)
@@ -144,8 +144,11 @@
 				 * e.g. by generating an interrupt
 				 */
 #define	NS_FORWARD	0x0004	/* pass packet to the other endpoint
-				 * (host stack or device
+				 * (host stack or device)
 				 */
+#define	NS_NO_LEARN	0x0008
+#define	NS_PORT_SHIFT	8
+#define	NS_PORT_MASK	(0xff << NS_PORT_SHIFT)
 };
 
 /*



More information about the Midnightbsd-cvs mailing list