PERFORCE change 126455 for review

Hans Petter Selasky hselasky at c2i.net
Mon Sep 17 09:48:21 PDT 2007


On Sunday 16 September 2007, Kip Macy wrote:
> http://perforce.freebsd.org/chv.cgi?CH=126455
>
> Change 126455 by kmacy at kmacy_home:ethng on 2007/09/15 23:26:15
>
> 	skip busdma rx setup on x86
> 	increases rx throughput by about 15% on udp netperf recv

Really this should be done for all platforms. The mbuf m_data field should 
have a companion pointer for example m_databuffer of type "struct 
usbd_page_chache *" :

struct usbd_page_cache {
        struct usbd_page        *page_start;
        struct usbd_page        *page_end;
        struct usbd_page        *page_cur;
        uint32_t                page_offset_buf;
        uint32_t                page_offset_cur;
};

struct usbd_page {
        void                    *buffer;
        bus_size_t              physaddr;

#ifdef __FreeBSD__
        bus_dma_tag_t           tag;
        bus_dmamap_t            map;
        register_t              intr_temp;
#endif

#ifdef __NetBSD__
        bus_dma_tag_t           tag;
        bus_dmamap_t            map;
        bus_dma_segment_t       seg;
        register_t              intr_temp;
        int32_t                 seg_count;
#endif
        uint32_t                length;
};

Then based on the "tag" and "map" from the structures pointed to 
by "m_databuffer" you perform a flush/invalidate before setting up DMA.

What do you think Kip ?

--HPS


More information about the p4-projects mailing list