Date: Wed, 23 Jan 2008 05:07:59 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133914 for review Message-ID: <200801230507.m0N57x75021804@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133914 Change 133914 by kmacy@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801230507.m0N57x75021804>