em(4) patch
Pyun YongHyeon
yongari at rndsoft.co.kr
Thu Apr 14 23:00:47 PDT 2005
On Thu, Apr 14, 2005 at 10:46:27PM -0700, John-Mark Gurney wrote:
> > With your changes JUMBO frames work here. This should also fix PR75794.
> > It would be really great if your changes could be comitted.
>
> I was working on trying to get some performance measurements by using
> if_re... But I haven't been able to get if_re to work on sparc64...
>
I don't have hardware that use re(4) so don't know current status of
re(4) on sparc64. :-(
> Though if em doesn't need realignment for normal frames, why do we need
> them for jumbo?
>
Look at: if_em.c(stock version) line 2605,
2592 if (mp == NULL) {
2593 mp = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR);
2594 if (mp == NULL) {
2595 adapter->mbuf_cluster_failed++;
2596 return(ENOBUFS);
2597 }
2598 mp->m_len = mp->m_pkthdr.len = MCLBYTES;
2599 } else {
2600 mp->m_len = mp->m_pkthdr.len = MCLBYTES;
2601 mp->m_data = mp->m_ext.ext_buf;
2602 mp->m_next = NULL;
2603 }
2604
2605 if (ifp->if_mtu <= ETHERMTU) {
2606 m_adj(mp, ETHER_ALIGN);
2607 }
2608
2609 rx_buffer = &adapter->rx_buffer_area[i];
If mtu is greater than ETHERMTU em(4) does not align it. When JUMBO
frame is used the frame would occupy several RX descriptors and it
can't use simple m_adj.
--
Regards,
Pyun YongHyeon
http://www.kr.freebsd.org/~yongari | yongari at freebsd.org
More information about the freebsd-sparc64
mailing list