ARM network trouble after recent mbuf changes

Thomas Skibo ThomasSkibo at sbcglobal.net
Mon Aug 26 22:28:13 UTC 2013



On 8/26/13 2:11 PM, Andre Oppermann wrote:
>
> Can you try this patch see check if it makes a difference on the bitfield?
>

Actually, this works for me.  But, I'm worried that somewhere else 
something is going to trip over a struct pkthdr not being 64-bit 
aligned.  There are several 64-bit fields in there.


--Thomas

root at ashbury:/usr/src/sys/sys # svn diff mbuf.h
Index: mbuf.h
===================================================================
--- mbuf.h	(revision 254889)
+++ mbuf.h	(working copy)
@@ -94,7 +94,7 @@
  	int32_t		 mh_len;	/* amount of data in this mbuf */
  	uint32_t	 mh_type:8,	/* type of data in this mbuf */
  			 mh_flags:24;	/* flags; see below */
-};
+} __packed;

  /*
   * Packet tag structure (see below for details).
@@ -169,7 +169,7 @@
  			    (struct mbuf *, void *, void *);
  	void		*ext_arg1;	/* optional argument pointer */
  	void		*ext_arg2;	/* optional argument pointer */
-};
+} __packed;

  /*
   * The core of the mbuf object along with some shortcut defines for 
practical
@@ -187,7 +187,7 @@
  		} MH;
  		char	M_databuf[MLEN];		/* !M_PKTHDR, !M_EXT */
  	} M_dat;
-};
+} __packed;
  #define	m_next		m_hdr.mh_next
  #define	m_len		m_hdr.mh_len


-- 
--------
Thomas Skibo
ThomasSkibo at sbcglobal.net



More information about the freebsd-arm mailing list