svn commit: r243264 - head/sys/mips/cavium/octe

Juli Mallett jmallett at FreeBSD.org
Mon Nov 19 08:30:30 UTC 2012


Author: jmallett
Date: Mon Nov 19 08:30:29 2012
New Revision: 243264
URL: http://svnweb.freebsd.org/changeset/base/243264

Log:
  Prevent hang on ATCA-7220 when transmitting packets < 60 bytes.

Modified:
  head/sys/mips/cavium/octe/ethernet-tx.c

Modified: head/sys/mips/cavium/octe/ethernet-tx.c
==============================================================================
--- head/sys/mips/cavium/octe/ethernet-tx.c	Mon Nov 19 08:29:53 2012	(r243263)
+++ head/sys/mips/cavium/octe/ethernet-tx.c	Mon Nov 19 08:30:29 2012	(r243264)
@@ -116,6 +116,19 @@ int cvm_oct_xmit(struct mbuf *m, struct 
 		}
 	}
 
+#ifdef OCTEON_VENDOR_RADISYS
+	/*
+	 * The RSYS4GBE will hang if asked to transmit a packet less than 60 bytes.
+	 */
+	if (__predict_false(m->m_pkthdr.len < 60) &&
+	    cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_CUST_RADISYS_RSYS4GBE) {
+		static uint8_t pad[60];
+
+		if (!m_append(m, sizeof pad - m->m_pkthdr.len, pad))
+			printf("%s: unable to pad small packet.", __func__);
+	}
+#endif
+
 	/*
 	 * If the packet is not fragmented.
 	 */


More information about the svn-src-head mailing list