Date: Thu, 18 Oct 2007 19:55:23 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127712 for review Message-ID: <200710181955.l9IJtN9Z098419@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127712 Change 127712 by kmacy@kmacy_home:ethng on 2007/10/18 19:54:32 add BUG_ON, dst_mtu, and skb_put analog Affected files ... .. //depot/projects/ethng/src/sys/sys/linux_compat.h#3 edit Differences ... ==== //depot/projects/ethng/src/sys/sys/linux_compat.h#3 (text+ko) ==== @@ -3,7 +3,7 @@ #define _SYS_LINUX_COMPAT_H_ #include <machine/bus.h> #include <sys/bus_dma.h> - +#include <sys/mbuf.h> typedef uint8_t u8; typedef uint16_t u16; @@ -59,4 +59,27 @@ #define cpu_to_be64 htobe64 #define container_of(p, stype, field) ((stype *)(((uint8_t *)(p)) - offsetof(stype, field))) + +/* + * mimic the interface to skb_put + */ +static __inline caddr_t +mbuf_put(struct mbuf *m, unsigned int len) +{ + caddr_t tmp = m->m_data; + + m->m_data += len; + m->m_len += len; + + return (tmp); +} + +#define dst_mtu(rt) ((rt)->rt_rmx.rmx_mtu) +#define BUG_ON(e) \ + do { \ + if (e) { \ + panic("BUG: %s %s:%d", #e, __FILE__, __LINE__); \ + } \ + } while (0) + #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710181955.l9IJtN9Z098419>