PERFORCE change 133914 for review

Kip Macy kmacy at FreeBSD.org
Tue Jan 22 21:08:00 PST 2008


http://perforce.freebsd.org/chv.cgi?CH=133914

Change 133914 by kmacy at kmacy:storage:toehead on 2008/01/23 05:07:25

	add some support code for passing bus addresses down the stack

Affected files ...

.. //depot/projects/toehead/sys/dev/cxgb/sys/mvec.h#5 edit

Differences ...

==== //depot/projects/toehead/sys/dev/cxgb/sys/mvec.h#5 (text+ko) ====

@@ -50,6 +50,8 @@
 
 #define mtomv(m)          ((struct mbuf_vec *)((m)->m_pktdat))
 #define M_IOVEC               0x100000 /* mbuf immediate data area is used for cluster ptrs */
+#define	EXT_PHYS	10	/* physical/bus address  */
+
 
 /*
  * duplication from mbuf.h - can't use directly because
@@ -181,12 +183,22 @@
 }
 
 struct mbuf *mi_collapse_mbuf(struct mbuf_iovec *mi, struct mbuf *m);
-struct mbuf *mi_collapse_sge(struct mbuf_iovec *mi, bus_dma_segment_t *seg);
 void *mcl_alloc(int seg_count, int *type);
 
 void mb_free_ext_fast(struct mbuf_iovec *mi, int type, int idx);
 
 static __inline void
+mi_collapse_sge(struct mbuf_iovec *mi, bus_dma_segment_t *seg)
+{
+	mi->mi_flags = 0;
+	mi->mi_base = (caddr_t)seg->ds_addr;
+	mi->mi_len = seg->ds_len;
+	mi->mi_size = 0;
+	mi->mi_type = EXT_PHYS;
+	mi->mi_refcnt = NULL;
+}
+
+static __inline void
 m_free_iovec(struct mbuf *m, int type)
 {
 	int i;


More information about the p4-projects mailing list