Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2009 16:57:35 +0000 (UTC)
From:      Pyun YongHyeon <yongari@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r197461 - head/sys/dev/de
Message-ID:  <200909241657.n8OGvZfA002365@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: yongari
Date: Thu Sep 24 16:57:35 2009
New Revision: 197461
URL: http://svn.freebsd.org/changeset/base/197461

Log:
  Use __NO_STRICT_ALIGNMENT to determine whether de(4) have to apply
  alignment fixup code for received frames on strict alignment
  architectures.

Modified:
  head/sys/dev/de/if_de.c
  head/sys/dev/de/if_devar.h

Modified: head/sys/dev/de/if_de.c
==============================================================================
--- head/sys/dev/de/if_de.c	Thu Sep 24 16:51:56 2009	(r197460)
+++ head/sys/dev/de/if_de.c	Thu Sep 24 16:57:35 2009	(r197461)
@@ -3488,7 +3488,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
 	    struct mbuf *m0;
 
 	    KASSERT(ms != NULL, ("no packet to accept"));
-#if defined(TULIP_COPY_RXDATA)
+#ifndef	__NO_STRICT_ALIGNMENT
 	    /*
 	     * Copy the data into a new mbuf that is properly aligned.  If
 	     * we fail to allocate a new mbuf, then drop the packet.  We will
@@ -3527,7 +3527,7 @@ tulip_rx_intr(tulip_softc_t * const sc)
 	     */
 	    ms = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
 
-#if defined(TULIP_COPY_RXDATA)
+#ifndef __NO_STRICT_ALIGNMENT
     skip_input:
 #endif
 	if (ms == NULL) {

Modified: head/sys/dev/de/if_devar.h
==============================================================================
--- head/sys/dev/de/if_devar.h	Thu Sep 24 16:51:56 2009	(r197460)
+++ head/sys/dev/de/if_devar.h	Thu Sep 24 16:57:35 2009	(r197461)
@@ -134,9 +134,6 @@ typedef struct {
  * architecture which can't handle unaligned accesses) because with
  * 100Mb/s cards the copying is just too much of a hit.
  */
-#if !defined(__i386__)
-#define	TULIP_COPY_RXDATA	1
-#endif
 
 #define	TULIP_DATA_PER_DESC	2032
 #define	TULIP_TXTIMER		4



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