diff options
| author | Robert Watson <rwatson@FreeBSD.org> | 2015-01-02 19:06:27 +0000 |
|---|---|---|
| committer | Robert Watson <rwatson@FreeBSD.org> | 2015-01-02 19:06:27 +0000 |
| commit | fe522dc9e3cb4f717fdbd5e14bcaa4be66e27bcb (patch) | |
| tree | 216c4bebf15dd163fce34b9b53d9c0ae7d0c473f /sys/dev/cxgb | |
| parent | c78d63c6434e0899c999060917eaa9963528d322 (diff) | |
Notes
Diffstat (limited to 'sys/dev/cxgb')
| -rw-r--r-- | sys/dev/cxgb/ulp/tom/cxgb_listen.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_listen.c b/sys/dev/cxgb/ulp/tom/cxgb_listen.c index 94a219b20c3c0..e11bb25833730 100644 --- a/sys/dev/cxgb/ulp/tom/cxgb_listen.c +++ b/sys/dev/cxgb/ulp/tom/cxgb_listen.c @@ -442,26 +442,13 @@ static struct synq_entry * mbuf_to_synq_entry(struct mbuf *m) { int len = roundup(sizeof (struct synq_entry), 8); - uint8_t *buf; - int buflen; if (__predict_false(M_TRAILINGSPACE(m) < len)) { panic("%s: no room for synq_entry (%td, %d)\n", __func__, M_TRAILINGSPACE(m), len); } - if (m->m_flags & M_EXT) { - buf = m->m_ext.ext_buf; - buflen = m->m_ext.ext_size; - } else if (m->m_flags & M_PKTHDR) { - buf = &m->m_pktdat[0]; - buflen = MHLEN; - } else { - buf = &m->m_dat[0]; - buflen = MLEN; - } - - return ((void *)(buf + buflen - len)); + return ((void *)(M_START(m) + M_SIZE(m) - len)); } #ifdef KTR |
